/* Modern Business Formation Funnel Styles */
/* Based on Material Design principles with custom brand colors */

:root {
    /* Brand Colors */
    --bs-primary: #1a0a5c;
    --bs-primary-rgb: 26, 10, 92;
    --bs-secondary: #ef4000;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #17a2b8;
    --bs-form-valid-border-color: #1a0a5c;

    /* Neutral Colors */
    --white: #ffffff;
    --light-gray: #f8f9fa;
    --medium-gray: #6c757d;
    --dark-gray: #495057;
    --border-color: #dee2e6;

    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 3rem;

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 300ms ease;
    --transition-slow: 500ms ease;

    --bs-btn-disabled-bg: rgba(var(--bs-primary-rgb), 0.5);
    --bs-btn-disabled-border-color: rgba(var(--bs-primary-rgb), 0.5);
}

/* Reset and Base Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--dark-gray);
    background-color: var(--light-gray);
}

/* Progress Container */
.progress-container {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 1000;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95) !important;
}

.progress-wrapper {
    max-width: 400px;
}

.progress {
    background-color: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(90deg, var(--bs-primary), var(--bs-secondary));
    transition: width var(--transition-normal);
}

/* Step Indicator */
.step-indicator {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    margin: var(--space-xl) auto;
    padding: 0 var(--space-md);
    position: relative;
    max-width: 700px;
    width: 100%;
}

.step-indicator .step {
    text-align: center;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    flex: 1;
    min-width: 80px;
    max-width: 120px;
}

.step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--border-color);
    color: var(--medium-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    position: relative;
    z-index: 2;
    transition: all var(--transition-normal);
    border: 3px solid transparent;
    margin-bottom: var(--space-xs);
    margin-left: auto;
    margin-right: auto;
}

.step.active .step-circle {
    background-color: var(--bs-secondary);
    color: var(--white);
    font-weight: 900;
}

.step-label {
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    color: var(--medium-gray);
    transition: color var(--transition-normal);
    line-height: 1.2;
    max-width: 100%;
    word-wrap: break-word;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
    hyphens: auto;
    width: 100%;
    padding: 0 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.step.active .step-label {
    color: var(--bs-secondary);
    font-weight: 600;
}

.step.completed .step-label {
    color: var(--bs-primary);
}

.step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 20px;
    left: calc(50% + 20px);
    width: calc(100% - 40px);
    height: 2px;
    background-color: var(--border-color);
    z-index: 1;
    transition: background-color var(--transition-normal);
}

.step.completed::after {
    background-color: var(--bs-primary);
}

/* Form Steps Container */
.form-steps-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.form-step {
    display: none;
    -webkit-animation: fadeIn 0.5s ease-in-out;
    animation: fadeIn 0.5s ease-in-out;
}

.form-step.active {
    display: block;
}

@-webkit-keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Card Styles */
.form-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: var(--space-xl);
    margin-bottom: var(--space-lg);
    border: 1px solid var(--border-color);
}

/* Typography */
.step-title {
    font-size: var(--font-size-3xl);
    font-weight: 700;
    color: var(--bs-primary);
    text-align: center;
    margin-bottom: var(--space-sm);
    letter-spacing: -0.02em;
}

.step-subtitle {
    font-size: var(--font-size-lg);
    color: var(--medium-gray);
    text-align: center;
    margin-bottom: var(--space-xl);
    line-height: 1.5;
}

/* Form Elements */
.form-group {
    margin-bottom: var(--space-lg);
}

.form-label {
    font-weight: 600;
    color: var(--dark-gray);
    margin-bottom: var(--space-sm);
    font-size: var(--font-size-sm);
}

.form-control {
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    font-size: var(--font-size-base);
    transition: all var(--transition-normal);
    background-color: var(--white);
}

.form-control:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 3px rgba(26, 10, 92, 0.1);
    outline: none;
}

.form-control.is-invalid {
    border-color: var(--danger-color);
}

.form-control.is-valid {
    border-color: var(--bs-primary);
}

.form-control.is-valid,
.was-validated .form-control:valid {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%21a0a5c' d='M2.3 6.73.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
}

/* Phone Input Styling */
.iti {
    width: 100%;
}

.iti__flag-container {
    border-right: 2px solid var(--border-color);
}

.iti__selected-flag {
    background-color: transparent;
    padding: 12px 16px;
}

.iti__country-list {
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

/* Selection Cards */
.selection-grid {
    display: grid;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.selection-card {
    background: var(--white);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.selection-card:hover {
    border-color: var(--bs-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.selection-card.active {
    border-color: var(--bs-primary);
    background: linear-gradient(135deg, rgba(26, 10, 92, 0.05), rgba(239, 64, 0, 0.05));
    box-shadow: var(--shadow-lg);
}

.selection-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--bs-primary), var(--bs-secondary));
    transform: scaleX(0);
    transition: transform var(--transition-normal);
}

.selection-card.active::before {
    transform: scaleX(1);
}

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--bs-primary), var(--bs-secondary));
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-md);
    font-size: 20px;
}

.card-title {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--dark-gray);
    margin-bottom: var(--space-sm);
}

.card-description {
    font-size: var(--font-size-sm);
    color: var(--medium-gray);
    line-height: 1.5;
}

/* Sub-type Container Focus Effect */
.sub-selection {
    transition: all 0.4s ease;
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin-top: var(--space-lg);
}

.sub-selection.subtype-focused {
    background: linear-gradient(135deg, rgba(26, 10, 92, 0.03), rgba(239, 64, 0, 0.03));
    border: 2px solid rgba(26, 10, 92, 0.2);
    box-shadow: 0 0 20px rgba(26, 10, 92, 0.1);
    animation: pulseSubtype 1.5s ease-in-out;
}

@keyframes pulseSubtype {
    0% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(26, 10, 92, 0.1);
    }

    50% {
        transform: scale(1.02);
        box-shadow: 0 0 30px rgba(26, 10, 92, 0.2);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(26, 10, 92, 0.1);
    }
}

/* Sub-type Cards */
.sub-type-card {
    min-width: 250px;
    flex: 1;
}

.sub-type-card .card-title {
    font-size: var(--font-size-base);
    margin-bottom: var(--space-xs);
}

.sub-type-card .card-description {
    font-size: var(--font-size-xs);
}

/* Responsive sub-type grid */
#childrenGrid {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    #childrenGrid {
        flex-direction: column;
    }

    .sub-type-card {
        min-width: 100%;
    }

    .sub-selection {
        padding: var(--space-md);
    }
}

/* Company Input Validation */
.form-control:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.2rem rgba(26, 10, 92, 0.25);
}

.form-control.is-valid {
    border-color: var(--bs-primary);
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8.5 8.5'%3e%3cpath fill='%21a0a5c' d='m8.5 1.6-1.6-1.6L3.5 3.4 1.1 1 0 2.1l3.5 3.5z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

/* State / Model Selection */
.model-search-container,
.state-search-container {
    position: relative;
    margin-bottom: var(--space-lg);
}

.model-search-input,
.state-search-input {
    padding-left: 48px;
    font-size: var(--font-size-lg);
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--medium-gray);
    font-size: 18px;
}

.model-grid,
.states-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--space-md);
    max-height: 400px;
    overflow-y: auto;
    padding: var(--space-sm) 0;
}

.model-card,
.state-card {
    background: var(--white);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
}

.model-card:hover,
.state-card:hover {
    border-color: var(--bs-primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.model-card.active,
.state-card.active,
.model-card.selected,
.state-card.selected {
    border-color: var(--bs-primary);
    background: rgba(26, 10, 92, 0.05);
}

.model-card.active i {
    color: var(--bs-primary);
    background: var(--bs-secondary);
    transition: all .5s ease;
}

.model-card.popular {
    border-color: var(--bs-secondary);
}

.model-card.popular:hover {
    border-color: var(--bs-secondary);
    box-shadow: 0 4px 12px rgba(239, 64, 0, 0.2);
}

.popular-badge {
    position: absolute;
    top: -8px;
    right: var(--space-md);
    background: var(--bs-secondary);
    color: var(--white);
    padding: 4px 12px;
    border-radius: var(--radius-lg);
    font-size: var(--font-size-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.model-name,
.state-name {
    font-weight: 600;
    color: var(--dark-gray);
    margin-bottom: var(--space-xs);
    display: flex;
    align-items: center;
    flex-direction: column;
    flex-wrap: wrap;
    align-content: center;
    justify-content: center;
    gap: 16px;
}

.model-name i {
    background: var(--bs-primary);
    padding: 15px;
    font-size: 30px;
    border-radius: 15px;
    color: var(--bs-light);
}

.model-description {
    color: var(--medium-gray);
    font-size: var(--font-size-sm);
    margin-bottom: var(--space-sm);
    line-height: 1.5;
}

.model-category {
    margin-top: var(--space-sm);
    padding-top: var(--space-sm);
    border-top: 1px solid var(--border-color);
}

.loading-placeholder {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

.no-results {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

.state-features {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
    margin-top: var(--space-sm);
}

.state-feature {
    background: var(--light-gray);
    color: var(--dark-gray);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: var(--font-size-xs);
    font-weight: 500;
}

.state-price {
    font-weight: 700;
    color: var(--bs-primary);
    font-size: var(--font-size-lg);
    margin-top: var(--space-sm);
}

/* Package Selection */
.package-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: var(--space-xl);
    background: var(--light-gray);
    border-radius: var(--radius-lg);
    padding: 4px;
}

.package-tab {
    flex: 1;
    max-width: 200px;
    padding: 12px 24px;
    border: none;
    background: transparent;
    color: var(--medium-gray);
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: all var(--transition-normal);
    cursor: pointer;
}

.package-tab.active {
    background: var(--white);
    color: var(--bs-primary);
    box-shadow: var(--shadow-sm);
}

.package-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.package-card {
    background: var(--white);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    position: relative;
    transition: all var(--transition-normal);
    cursor: pointer;
}

.package-card:hover {
    border-color: var(--bs-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.package-card.selected {
    border-color: var(--bs-primary);
    border-width: 2px;
    background: linear-gradient(135deg, rgba(26, 10, 92, 0.08), rgba(239, 64, 0, 0.08));
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.package-card.selected .btn {
    background-color: var(--bs-primary) !important;
    border-color: var(--bs-primary) !important;
    color: white !important;
}

.package-card.recommended {
    border-color: var(--bs-secondary);
    position: relative;
}

.package-card.recommended::before {
    content: 'Most Popular';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bs-secondary);
    color: var(--white);
    padding: 4px 16px;
    border-radius: 20px;
    font-size: var(--font-size-xs);
    font-weight: 600;
    z-index: 2;
}

.popular-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bs-secondary);
    color: var(--white);
    padding: 4px 16px;
    border-radius: 20px;
    font-size: var(--font-size-xs);
    font-weight: 600;
    z-index: 2;
    text-align: center;
}

.package-price {
    font-size: var(--font-size-3xl);
    font-weight: 700;
    color: var(--bs-primary);
    margin-bottom: var(--space-sm);
}

.package-features {
    list-style: none;
    padding: 0;
    margin: var(--space-lg) 0;
}

.package-features li {
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--border-color);
    position: relative;
    padding-left: 24px;
}

.package-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: bold;
}

.package-features li:last-child {
    border-bottom: none;
}

/* Add-on Styles */
.addon-item {
    background: var(--white);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    transition: all var(--transition-normal);
    margin-bottom: var(--space-sm);
}

.addon-item:hover {
    border-color: var(--bs-primary);
}

.addon-item .form-check-input:checked+.form-check-label {
    color: var(--bs-primary);
}

.addon-item .form-check-input:checked~* {
    color: var(--bs-primary);
}

.addon-checkbox {
    width: 18px;
    height: 18px;
    margin-right: var(--space-sm);
}

.addon-checkbox:checked {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
}

.addon-checkbox:focus {
    box-shadow: 0 0 0 0.2rem rgba(26, 10, 92, 0.25);
}

/* Buttons */
.btn {
    border-radius: var(--radius-md);
    padding: 12px 24px;
    font-weight: 600;
    font-size: var(--font-size-base);
    transition: all var(--transition-normal);
    border: 2px solid transparent;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
}

.btn-primary {
    background: var(--bs-primary);
    color: var(--white);
    border-color: var(--bs-primary);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: var(--bs-secondary);
    border-color: var(--bs-secondary);
    color: var(--white);
}

.btn-secondary {
    background: var(--white);
    color: var(--bs-primary);
    border-color: var(--bs-primary);
}

.btn-secondary:hover {
    background: var(--bs-primary);
    color: var(--white);
}

.btn-outline-secondary {
    background: transparent;
    color: var(--medium-gray);
    border-color: var(--border-color);
}

.btn-outline-secondary:hover {
    background: var(--light-gray);
    border-color: var(--medium-gray);
    color: var(--dark-gray);
}

.btn-lg {
    padding: 16px 32px;
    font-size: var(--font-size-lg);
}

.btn-sm {
    padding: 8px 16px;
    font-size: var(--font-size-sm);
}

/* Navigation Buttons */
.form-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: var(--space-xl);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border-color);
}

/* Payment Section */
.payment-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.payment-method {
    background: var(--white);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    cursor: pointer;
    transition: all var(--transition-normal);
    text-align: center;
}

.payment-method:hover {
    border-color: var(--bs-primary);
}

.payment-method.active {
    border-color: var(--bs-primary);
    background: rgba(26, 10, 92, 0.05);
}

.payment-icons {
    display: flex;
    justify-content: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.payment-icons img {
    height: 24px;
    opacity: 0.7;
    transition: opacity var(--transition-normal);
}

.payment-method.active .payment-icons img {
    opacity: 1;
}

/* Order Summary */
.order-summary {
    background: var(--white);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
    box-shadow: var(--shadow-sm);
}

.order-summary h5 {
    color: var(--bs-primary);
    font-weight: 600;
    margin-bottom: var(--space-lg);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: var(--space-sm);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm) 0;
    border-bottom: 1px solid #f0f0f0;
}

.summary-row:last-child {
    border-bottom: none;
    padding-top: var(--space-md);
    margin-top: var(--space-sm);
    border-top: 2px solid var(--border-color);
}

.summary-row span {
    font-size: var(--font-size-base);
}

.summary-row strong {
    font-weight: 600;
    color: var(--bs-primary);
    font-size: var(--font-size-lg);
}

/* Payment Forms */
.payment-form {
    background: var(--white);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    margin-bottom: var(--space-lg);
}

.payment-form .form-group {
    margin-bottom: var(--space-lg);
}

.payment-form .form-label {
    font-weight: 600;
    color: var(--bs-primary);
    margin-bottom: var(--space-sm);
    display: block;
}

.payment-form .form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: var(--font-size-base);
    transition: all var(--transition-fast);
    background: var(--white);
}

.payment-form .form-control:focus {
    outline: none;
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 3px rgba(26, 10, 92, 0.1);
}

.payment-form .form-control.is-invalid {
    border-color: var(--danger-color);
}

.payment-form .form-control.is-valid {
    border-color: var(--bs-primary);
}

/* Stripe Elements Styling */
#card-element {
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--white);
    transition: all var(--transition-fast);
}

#card-element:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 3px rgba(26, 10, 92, 0.1);
}

#card-element.StripeElement--invalid {
    border-color: var(--danger-color);
}

#card-element.StripeElement--complete {
    border-color: var(--bs-primary);
}

#card-errors {
    color: var(--danger-color);
    font-size: var(--font-size-sm);
    margin-top: var(--space-xs);
    display: none;
}

/* PayPal Button Container */
#paypal-button-container {
    margin-top: var(--space-md);
    min-height: 50px;
}

/* Terms and Conditions */
.form-check {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
}

.form-check-input {
    margin-top: 4px;
    width: 18px;
    height: 18px;
    accent-color: var(--bs-primary);
}

.form-check-label {
    font-size: var(--font-size-sm);
    line-height: 1.5;
    color: var(--dark-gray);
}

.form-check-label a {
    color: var(--bs-primary);
    text-decoration: none;
}

.form-check-label a:hover {
    text-decoration: underline;
}

/* Complete Order Button */
#completeOrderBtn {
    background: linear-gradient(135deg, var(--bs-primary), var(--bs-secondary));
    border: none;
    color: var(--white);
    padding: 16px 32px;
    border-radius: var(--radius-lg);
    font-size: var(--font-size-lg);
    font-weight: 600;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

#completeOrderBtn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

#completeOrderBtn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

#completeOrderBtn:active {
    transform: translateY(0);
}

/* Loading States */
.payment-loading {
    pointer-events: none;
}

.payment-loading .payment-method {
    opacity: 0.5;
}

.payment-loading .payment-form {
    opacity: 0.5;
}

/* Error States */
.payment-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    padding: var(--space-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
    font-size: var(--font-size-sm);
}

/* Success States */
.payment-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
    padding: var(--space-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
    font-size: var(--font-size-sm);
}

/* Responsive Design for Payment Methods */
@media (max-width: 768px) {
    .payment-methods {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }

    .payment-form {
        padding: var(--space-lg);
    }

    .payment-form .row {
        flex-direction: column;
    }

    .payment-form .col-md-6 {
        width: 100%;
        margin-bottom: var(--space-md);
    }

    #completeOrderBtn {
        width: 100%;
        padding: 16px;
        font-size: var(--font-size-base);
    }
}

/* Toast Notifications for Payment */
.toast-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--white);
    border-left: 4px solid var(--success-color);
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    max-width: 400px;
    -webkit-animation: slideInRight var(--transition-normal);
    animation: slideInRight var(--transition-normal);
}

.toast-notification.error {
    border-left-color: var(--danger-color);
}

.toast-notification.error i {
    color: var(--danger-color);
}

.toast-notification.success i {
    color: var(--success-color);
}

.toast-notification i {
    font-size: var(--font-size-lg);
}

@-webkit-keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .step-indicator {
        margin: var(--space-lg) auto;
        padding: 0 var(--space-sm);
    }

    .step {
        min-width: 60px;
    }

    .step-circle {
        width: 35px;
        height: 35px;
        font-size: 12px;
    }

    .step-circle i {
        font-size: 14px;
    }

    .step-label {
        font-size: 10px;
        margin-top: 4px;
    }

    .step:not(:last-child)::after {
        top: 17px;
        left: calc(50% + 17px);
        width: calc(100% - 34px);
    }

    .form-card {
        padding: 15px;
        margin: 0 var(--space-sm);
    }

    .step-title {
        font-size: var(--font-size-2xl);
    }

    .selection-grid {
        grid-template-columns: 1fr;
    }

    .states-grid {
        grid-template-columns: 1fr;
    }

    .package-grid {
        grid-template-columns: 1fr;
    }

    .form-navigation {
        flex-direction: column;
        gap: var(--space-md);
    }

    .package-tabs {
        flex-direction: column;
    }

    .payment-methods {
        grid-template-columns: 1fr;
    }

    .form-steps-container {
        padding: 0px !important;
    }
}

@media (max-width: 576px) {
    .step-indicator {
        padding: 0 var(--space-xs);
    }

    .step {
        min-width: 50px;
    }

    .step-circle {
        width: 30px;
        height: 30px;
        font-size: 10px;
    }

    .step-circle i {
        font-size: 12px;
    }

    .step-label {
        font-size: 9px;
        line-height: 1.1;
    }

    .step:not(:last-child)::after {
        top: 15px;
        left: calc(50% + 15px);
        width: calc(100% - 30px);
    }

    .progress-container .col-auto:last-child {
        display: none;
    }

    .form-card {
        margin: 0;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    .btn {
        width: 100%;
    }

    .form-navigation .btn {
        width: 100%;
    }
}

/* Additional Step Indicator Refinements */
.step-indicator .step {
    text-align: center;
}

.step-circle {
    margin-left: auto;
    margin-right: auto;
}

.step-label {
    width: 100%;
    padding: 0 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Ensure proper spacing and alignment on all screen sizes */
@media (min-width: 769px) {
    .step-label {
        white-space: normal;
        overflow: visible;
        text-overflow: unset;
    }
}

/* For very small screens, use shorter labels */
@media (max-width: 480px) {
    .step[data-step="1"] .step-label::after {
        content: "Contact";
    }

    .step[data-step="2"] .step-label::after {
        content: "Type";
    }

    .step[data-step="3"] .step-label::after {
        content: "Model";
    }

    .step[data-step="4"] .step-label::after {
        content: "State";
    }

    .step[data-step="5"] .step-label::after {
        content: "Package";
    }

    .step[data-step="6"] .step-label::after {
        content: "Payment";
    }

    .step-label {
        font-size: 0;
    }

    .step-label::after {
        font-size: 9px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        -webkit-animation-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        -webkit-animation-iteration-count: 1 !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    :root {
        --border-color: #000;
        --medium-gray: #000;
    }

    .form-control {
        border-width: 3px;
    }

    .selection-card {
        border-width: 3px;
    }
}

/* Focus indicators for keyboard navigation */
.btn:focus,
.form-control:focus,
.selection-card:focus {
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(26, 10, 92, 0.2);
}

/* Print styles */
@media print {

    .progress-container,
    .form-navigation,
    footer {
        display: none !important;
    }

    .form-step {
        display: block !important;
    }

    body {
        background: white !important;
    }
}

/* Email Availability Validation Styles */
.email-validation-feedback {
    margin-top: 0.5rem;
    min-height: 20px;
}

.email-validation-feedback .spinner-border-sm {
    width: 0.875rem;
    height: 0.875rem;
    border-width: 0.1em;
}

/* Email input states */
#email.checking-email {
    border-color: var(--info-color);
    background-image: none;
    padding-right: calc(1.5em + 0.75rem);
}

#email.email-available {
    border-color: var(--bs-primary);
    background-color: #f8fff9;
}

#email.email-unavailable {
    border-color: var(--danger-color);
    background-color: #fff8f8;
}

/* Loading animation for email input */
#email.checking-email {
    position: relative;
}

#email.checking-email::after {
    content: '';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 2px solid var(--info-color);
    border-top: 2px solid transparent;
    border-radius: 50%;
    -webkit-animation: spin 1s linear infinite;
    animation: spin 1s linear infinite;
}

@-webkit-keyframes spin {
    0% {
        transform: translateY(-50%) rotate(0deg);
    }

    100% {
        transform: translateY(-50%) rotate(360deg);
    }
}

@keyframes spin {
    0% {
        transform: translateY(-50%) rotate(0deg);
    }

    100% {
        transform: translateY(-50%) rotate(360deg);
    }
}

/* Email validation feedback animations */
.email-validation-feedback>div {
    transition: all var(--transition-fast);
    opacity: 1;
}

.email-validation-feedback>div.d-none {
    opacity: 0;
    transform: translateY(-5px);
}

/* Next button disabled state for email validation */
.next-step.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

/* Success and error message styling */
.email-validation-feedback .text-success {
    display: flex;
    align-items: center;
    font-weight: 500;
}

.email-validation-feedback .text-danger {
    display: flex;
    align-items: center;
    font-weight: 500;
}

.email-validation-feedback .text-info {
    display: flex;
    align-items: center;
    font-weight: 500;
}

/* Icons in validation messages */
.email-validation-feedback .fas {
    font-size: 0.875rem;
    margin-right: 0.25rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .email-validation-feedback {
        margin-top: 0.375rem;
    }

    .email-validation-feedback small {
        font-size: 0.75rem;
    }
}


.form-control.is-valid:focus,
.was-validated .form-control:valid:focus {
    border-color: var(--bs-form-valid-border-color);
    box-shadow: 0 0 0 .25rem rgba(var(--bs-primary-rgb), .25) !important;
}

.form-check-input:checked {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
}

.form-check-input:focus {
    border-color: var(--bs-primary);
    outline: 0;
    box-shadow: 0 0 0 .25rem rgba(var(--bs-primary-rgb), .25);
}
