:root {
    --electrostar-primary: #2563eb;
    --electrostar-secondary: #1e40af;
    --electrostar-accent: #10b981;
    --electrostar-dark: #1f2937;
    --electrostar-gray-dark: #374151;
    --electrostar-gray: #6b7280;
    --electrostar-gray-light: #9ca3af;
    --electrostar-light: #f9fafb;
    --electrostar-white: #ffffff;
    --success-green: #10b981;
    --error-red: #ef4444;
    --warning-orange: #f59e0b;
}

/* Reset and Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--electrostar-light);
    color: var(--electrostar-dark);
    line-height: 1.6;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

/* Container */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 32px 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Header */
.header {
    text-align: center;
    padding: 32px 0 24px 0;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 0;
}

.logo {
    height: 48px;
    margin-bottom: 20px;
    user-select: none;
}

.header-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.header-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--electrostar-dark);
    margin-bottom: 8px;
}

.header-subtitle {
    font-size: 16px;
    color: var(--electrostar-gray);
    margin: 0;
}

/* Material Icons */
.material-symbols-outlined {
    font-family: 'Material Symbols Outlined';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
    user-select: none;
    vertical-align: middle;
}

/* Utility Classes */
.mr-1 { margin-right: 4px; }
.mr-2 { margin-right: 8px; }
.mr-3 { margin-right: 12px; }
.mr-4 { margin-right: 16px; }
.ml-2 { margin-left: 8px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.hidden { display: none; }

/* Progress Container */
.progress-container {
    margin-bottom: 32px;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 24px;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: #e5e7eb;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #d1d5db;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--electrostar-primary), var(--electrostar-accent));
    border-radius: 6px;
    transition: width 0.4s ease;
    width: 20%;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

.progress-text {
    text-align: center;
    margin-top: 12px;
    font-size: 16px;
    color: var(--electrostar-gray);
    font-weight: 600;
}

/* Animations */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading state */
.loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Step Content */
.step-content {
    display: none;
}

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

/* Cards */
.card {
    background: var(--electrostar-white);
    border-radius: 16px;
    padding: 32px;
    border: 1px solid #e5e7eb;
    margin-bottom: 24px;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.card:hover {
    border-color: #9ca3af;
    box-shadow: 0 4px 20px rgba(156, 163, 175, 0.1);
}

/* Sub-cards - like cards but without the large margin-bottom */
.sub-card {
    background: var(--electrostar-white);
    border-radius: 16px;
    padding: 32px;
    border: 1px solid #e5e7eb;
    margin-bottom: 16px;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.sub-card:hover {
    border-color: #9ca3af;
    box-shadow: 0 4px 20px rgba(156, 163, 175, 0.1);
}

.card-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--electrostar-dark);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
}

/* Add bottom border to card-title elements that are followed by form content */
.form-section .card-title,
.card-title:not(:last-child) {
    padding-bottom: 8px;
    border-bottom: 1px solid #e5e7eb;
}

/* Eligibility Grid */
.eligibility-grid {
    margin: 24px 0;
}

.eligibility-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--electrostar-primary);
    margin-bottom: 20px;
    display: none; /* Hidden on desktop */
    align-items: center;
}

.eligibility-items {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.eligibility-card {
    background: var(--electrostar-white);
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px 16px;
    text-align: center;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.eligibility-card:hover {
    border-color: var(--electrostar-accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.1);
}

/* Mobile dropdown positioning fixes */
@media (max-width: 768px) {
    /* Make the dropdown position relative to the input, not the form-group */
    .form-input {
        position: relative;
    }
    
    /* Reposition suggestions dropdown on mobile - more specific selector */
    .form-group .suggestions-list,
    .form-group #suggestions-list,
    .form-group .dirigeant-suggestions,
    .form-group #dirigeant-suggestions {
        position: absolute !important;
        top: calc(100% - 60px) !important; /* Position above the help text and button */
        left: 0 !important;
        right: 0 !important;
        z-index: 9999 !important; /* Very high z-index for mobile */
        background: white !important;
        border: 1px solid #d1d5db !important; /* Subtle border */
        border-radius: 8px !important;
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25) !important; /* Stronger shadow */
        max-height: 200px !important; /* Shorter on mobile to avoid keyboard overlap */
    }
    
    /* Ensure form-group has relative positioning */
    .form-group {
        position: relative !important;
    }
}

/* Disable hover effects on mobile */
@media (max-width: 768px) {
    .eligibility-card:hover {
        border-color: transparent !important;
        transform: none !important;
        box-shadow: none !important;
    }
}

.eligibility-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--electrostar-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px auto;
}

.eligibility-icon .material-symbols-outlined {
    color: white;
    font-size: 24px;
}

.eligibility-card h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--electrostar-dark);
    margin-bottom: 6px;
    line-height: 1.3;
}

.eligibility-card p {
    font-size: 13px;
    color: var(--electrostar-gray);
    margin: 0;
    line-height: 1.4;
}

/* Info Box */
.info-box {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05), rgba(16, 185, 129, 0.05));
    border: 1px solid var(--electrostar-primary);
    border-radius: 12px;
    padding: 24px;
    margin: 24px 0;
}

.info-box-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--electrostar-primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

.info-steps {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.info-step {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.info-step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--electrostar-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
}

.info-step-content {
    flex: 1;
}

.info-step-content strong {
    color: var(--electrostar-dark);
    font-size: 16px;
    display: block;
    margin-bottom: 4px;
}

.info-step-content p {
    color: var(--electrostar-gray);
    font-size: 14px;
    margin: 0;
}

/* Alert Messages */
.alert {
    padding: 16px;
    border-radius: 12px;
    margin: 16px 0;
    display: flex;
    align-items: center;
}

.alert-success {
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid #e0e7ff;
    color: #1e40af;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--error-red);
    color: var(--error-red);
}

.alert strong {
    color: inherit;
}

/* Buttons */
.btn {
    padding: 16px 24px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 140px;
}

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

.btn-primary:hover:not(:disabled) {
    background: var(--electrostar-secondary);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.btn-success {
    background: var(--electrostar-accent);
    color: white;
}

.btn-success:hover:not(:disabled) {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-secondary {
    background: #f8fafc;
    color: var(--electrostar-gray);
    border: 1px solid #e5e7eb;
}

.btn-secondary:hover:not(:disabled) {
    background: #f1f5f9;
    color: var(--electrostar-dark);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

.btn-link {
    background: none;
    border: none;
    color: var(--electrostar-primary);
    text-decoration: none;
    cursor: pointer;
    padding: 4px 0;
    font-size: 14px;
    display: flex;
    align-items: center;
    transition: color 0.2s ease;
}

.btn-link:hover {
    color: var(--electrostar-secondary);
    text-decoration: underline;
}

.manual-edit-toggle {
    margin-top: 8px;
    text-align: center;
}

/* Validation Message */
.validation-message {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 12px 16px;
    margin: 20px 0;
    color: #dc2626;
    font-size: 14px;
    animation: slideIn 0.3s ease-out;
}

.validation-message .material-symbols-outlined {
    font-size: 20px;
    color: #dc2626;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Navigation */
.navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-top: 16px;
}

/* Footer */
.footer {
    padding: 24px 0;
    text-align: center;
    border-top: 1px solid #e5e7eb;
    flex-shrink: 0;
    font-size: 12px;
    margin-top: auto;
    color: var(--electrostar-gray);
}

@media (max-width: 768px) {
    .footer {
        display: none;
    }
}

.support-link {
    color: var(--electrostar-primary);
    text-decoration: none;
    font-weight: 500;
}

.support-link:hover {
    text-decoration: underline;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .container {
        padding: 12px 12px 80px 12px; /* Add bottom padding for sticky navigation */
        gap: 4px;
    }

    .header {
        padding: 8px 0 12px 0 !important;
        display: flex !important;
        align-items: center;
        justify-content: center;
        gap: 10px;
        text-align: left !important;
        flex-direction: row !important;
        margin-bottom: 6px;
    }

    .logo {
        height: 28px !important;
        margin-bottom: 0 !important;
        flex-shrink: 0;
    }

    .header-content {
        gap: 4px !important;
        flex-direction: column;
        align-items: flex-start;
    }

    .header-title {
        font-size: 17px !important;
        margin-bottom: 2px !important;
    }

    .header-subtitle {
        font-size: 13px;
    }

    .progress-container {
        margin-bottom: 12px;
        padding: 0 12px;
        border-bottom: none;
    }
    
    .progress-container::after {
        content: '';
        display: block;
        height: 1px;
        background: #e5e7eb;
        margin: 6px 0 0 0;
    }

    .progress-bar {
        height: 8px;
    }

    .progress-text {
        font-size: 13px;
        margin-top: 8px;
    }

    .card {
        padding: 16px;
        margin-bottom: 100px; /* Extra margin for sticky navigation buttons */
    }

    .sub-card {
        padding: 16px;
        margin-bottom: 16px; /* No large margin for sub-cards */
    }

    .card-title {
        font-size: 16px;
        margin-bottom: 12px;
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 8px;
        line-height: 1.3;
    }

    .eligibility-grid {
        background: linear-gradient(135deg, rgba(16, 185, 129, 0.05), rgba(16, 185, 129, 0.08));
        border: 1px solid var(--electrostar-accent);
        border-radius: 8px;
        padding: 12px;
        margin: 16px 0;
    }

    .eligibility-title {
        font-size: 14px;
        font-weight: 600;
        color: #047857;
        margin-bottom: 8px;
        display: flex;
        align-items: center;
    }

    .eligibility-items {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .eligibility-card {
        background: transparent;
        border: none;
        border-radius: 0;
        padding: 0;
        display: flex;
        align-items: center;
        gap: 8px;
        text-align: left;
        box-shadow: none;
    }
    
    .eligibility-card .eligibility-icon {
        margin: 0;
        flex-shrink: 0;
        width: 26px;
        height: 26px;
    }
    
    .eligibility-card .eligibility-icon .material-symbols-outlined {
        font-size: 14px;
    }
    
    .eligibility-card .eligibility-text {
        flex: 1;
    }
    
    .eligibility-card h3 {
        font-size: 16px;
        margin-bottom: 1px;
        line-height: 1.2;
        font-weight: 600;
    }
    
    .eligibility-card p {
        display: block;
        font-size: 11px;
        color: var(--electrostar-gray);
        margin: 0;
        line-height: 1.3;
    }

    /* Compact company search dropdown on mobile */
    .suggestions-list, 
    #suggestions-list,
    #product-suggestions-list {
        max-height: 250px !important; /* Reduce height to avoid keyboard */
        font-size: 12px;
        top: calc(100% - 50px) !important; /* Move up to avoid being behind help text */
        z-index: 9999 !important; /* Higher z-index */
        border: 1px solid #d1d5db !important; /* Subtle border */
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2) !important; /* Stronger shadow */
    }
    
    .suggestion-item {
        padding: 6px 10px !important;
    }
    
    .company-header {
        padding: 6px 10px 4px 10px !important;
        font-size: 12px !important;
        font-weight: 500;
    }
    
    .establishment {
        padding: 6px 10px !important;
    }
    
    .siret-line {
        margin-bottom: 2px !important;
        gap: 4px;
    }
    
    .siret {
        font-size: 10px !important;
        padding: 1px 3px !important;
    }
    
    .address-line {
        font-size: 10px !important;
        line-height: 1.2;
    }
    
    .headquarters-badge {
        font-size: 9px !important;
        padding: 1px 3px !important;
    }

    /* Step 2 mobile improvements - professional section separation */
    .form-section {
        margin-bottom: 16px !important;
        padding: 12px;
        background: #fafbfc;
        border: 1px solid #e5e7eb;
        border-radius: 8px;
    }
    
    .form-section .card-title {
        margin-bottom: 12px;
        font-size: 18px;
        padding-bottom: 8px;
        border-bottom: 2px solid #e5e7eb;
        color: var(--electrostar-dark);
    }
    
    .form-group {
        margin-bottom: 0px !important;
    }
    
    .form-row {
        gap: 8px;
        margin-bottom: 10px;
    }
    
    .form-help {
        margin-top: 2px;
        margin-bottom: 4px;
    }
    
    .manual-edit-toggle {
        margin-top: 4px;
    }
    
    .dirigeant-search-container {
        margin-bottom: 10px !important;
    }

    .info-box {
        margin: 16px 0;
        padding: 12px;
    }

    .info-box-title {
        font-size: 14px;
        margin-bottom: 8px;
    }

    .info-steps {
        gap: 8px;
    }

    .info-step {
        gap: 8px;
    }

    .info-step-number {
        width: 24px;
        height: 24px;
        font-size: 11px;
        flex-shrink: 0;
    }

    .info-step-content h4 {
        font-size: 13px;
        margin-bottom: 1px;
        line-height: 1.2;
    }

    .info-step-content p {
        font-size: 11px;
        line-height: 1.3;
        margin: 0;
    }

    .navigation {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        flex-direction: row;
        gap: 12px;
        margin: 0;
        background: white;
        border-top: 1px solid #e5e7eb;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
        z-index: 1000;
        /* Add safe area padding for Android navigation buttons */
        padding: 16px 12px calc(16px + env(safe-area-inset-bottom, 0px)) 12px;
        /* Fallback for older browsers */
        padding: 16px 12px calc(16px + constant(safe-area-inset-bottom, 0px)) 12px;
    }

    .btn {
        flex: 1;
        padding: 14px 16px;
        font-size: 14px;
    }

    .progress-text {
        font-size: 14px;
    }

    /* Stack most form rows on mobile except postal code and city */
    .form-row:not(#company-location-fields):not(:has(.country-code-input)) {
        flex-direction: column;
        gap: 0;
    }
    
    /* Ensure company postal code and city stay in columns on mobile when visible */
    #company-location-fields.form-row:not([style*="display: none"]) {
        display: flex !important;
        flex-direction: row !important;
        gap: 12px;
    }
    
    #company-location-fields .form-group:first-child {
        flex: 0 0 120px; /* Slightly smaller on mobile */
        max-width: 120px;
    }
    
    #company-location-fields .form-group:last-child {
        flex: 1;
        min-width: 150px;
    }

    /* Step 3 Mobile Optimizations */
    
    /* Eligibility info section - make it more compact */
    .eligibility-info {
        background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), rgba(59, 130, 246, 0.08));
        border: 1px solid #e0e7ff;
        border-radius: 8px;
        padding: 12px;
        margin: 12px 0;
    }
    
    .eligibility-highlight {
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 12px !important;
        color: #047857;
        margin-bottom: 6px;
        line-height: 1.3 !important;
        padding: 6px;
    }
    
    .eligibility-highlight .material-symbols-outlined {
        font-size: 18px;
        flex-shrink: 0;
    }
    
    .eligibility-info p {
        font-size: 12px;
        color: var(--electrostar-gray-dark);
        margin: 0;
        line-height: 1.3;
    }

    /* Employee count section - compact and user-friendly */
    .employee-count-container {
        display: flex;
        flex-direction: column;
        gap: 12px;
        align-items: center;
    }
    
    .employee-counter {
        justify-content: center;
        align-items: center;
        background: #f8fafc;
        border: 1px solid #e2e8f0;
        border-radius: 8px;
        padding: 4px;
        max-width: 180px;
    }
    
    .employee-counter .quantity-btn {
        width: 36px;
        height: 36px;
        border-radius: 6px;
        border: none;
        background: white;
        color: var(--electrostar-primary);
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
        transition: all 0.2s ease;
    }
    
    .employee-counter .quantity-btn:active {
        transform: scale(0.95);
        background: var(--electrostar-primary);
        color: white;
    }
    
    .employee-input {
        width: 90px !important;
        height: 44px;
        text-align: center;
        font-weight: 600;
        font-size: 18px;
        background: #ffffff;
        color: var(--electrostar-dark);
        border-radius: 8px;
        transition: all 0.3s ease;
        cursor: text;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
        padding: 0 8px;
    }
    
    .employee-input:hover {
        border-color: #9ca3af;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        transform: translateY(-1px);
    }
    
    .employee-input:focus {
        outline: none;
        border-color: var(--electrostar-primary);
        background: #ffffff;
        box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15), 0 4px 12px rgba(37, 99, 235, 0.1);
        transform: translateY(-1px);
    }
    }
    
    .employee-summary {
        display: flex;
        gap: 16px;
        justify-content: center;
        width: 100%;
        background: rgba(37, 99, 235, 0.05);
        border-radius: 8px;
        padding: 12px 16px;
        margin-top: 4px;
        align-items: center;
        text-align: center;
    }
    
    .summary-item {
        text-align: center;
        flex: 1;
    }
    
    .summary-label {
        display: block;
        font-size: 13px !important;
        color: var(--electrostar-gray);
        text-transform: uppercase;
        letter-spacing: 0.5px;
        margin-bottom: 2px;
        font-weight: 500;
    }
    
    .summary-value {
        display: block;
        font-weight: 700;
        color: var(--electrostar-dark);
    }
    
    .summary-item.highlight .summary-value {
        color: var(--electrostar-accent);
    }

    /* Referral code section - streamlined */
    .referral-code-description {
        font-size: 12px;
        margin-bottom: 12px;
        line-height: 1.4;
        color: var(--electrostar-gray-dark);
    }
    
    .optional-badge {
        font-size: 9px;
        padding: 1px 4px;
        margin-left: 4px;
        flex-shrink: 0;
    }

    /* Alert section - more compact */
    .alert {
        padding: 12px;
        margin: 12px 0 24px 0;
        border-radius: 8px;
        font-size: 13px;
    }
    
    .alert .material-symbols-outlined {
        font-size: 18px;
        flex-shrink: 0;
        margin-right: 8px;
    }
    
    .alert strong {
        font-size: 14px;
        display: block;
        margin-bottom: 2px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .eligibility-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
    
    .eligibility-card {
        padding: 18px 14px;
    }
    
    .eligibility-card h3 {
        font-size: 14px;
    }
    
    .eligibility-card p {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 12px;
    }

    .header-title {
        font-size: 20px;
    }
}

/* Country Code Input with Flag */
.country-code-input {
    position: relative;
    display: flex;
    align-items: center;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 0;
    width: 130px; /* Fixed width for 3-4 characters */
    flex-shrink: 0; /* Prevent shrinking */
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.country-code-input:hover {
    border-color: #9ca3af;
}

.country-code-input:focus-within {
    border-color: #3b82f6;
    box-shadow: 0 0 0 1px #3b82f6;
}

.country-flag {
    width: 28px;
    height: 20px;
    border-radius: 4px;
    margin: 8px 0 8px 12px;
    border: 1px solid #d1d5db;
    object-fit: cover;
    flex-shrink: 0;
    transition: opacity 0.2s ease;
    background: white;
}

.country-flag.loading {
    opacity: 0.5;
}

.country-code-input .form-input {
    flex: 1;
    margin: 0;
    border: none;
    background: transparent;
    padding: 12px 12px 12px 8px; /* Reduced right padding */
    box-shadow: none;
    outline: none;
    min-width: 0; /* Allow input to shrink */
    text-align: center; /* Center the country code text */
    font-size: 14px;
}

.country-code-input .form-input:focus {
    border: none;
    box-shadow: none;
    outline: none;
}

/* Reduce gap specifically for phone number row */
.form-row:has(.country-code-input) {
    gap: 8px; /* Much smaller gap for phone number row */
}

.form-row:has(.country-code-input) .form-group:first-child {
    flex: none; /* Country code takes only needed space */
    width: 130px;
}

.form-row:has(.country-code-input) .form-group:last-child {
    flex: 1; /* Phone takes remaining space */
}

/* Ensure the container gets invalid state */
.country-code-input.invalid {
    border-color: var(--error-red);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.country-code-input.invalid .form-input {
    background: transparent;
}

/* Make sure error message appears below the container, not inside */
.country-code-input + .field-error {
    margin-top: 4px;
}

/* Product Selection Cards */
.selected-product {
    margin-top: 16px;
    padding: 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.product-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 16px;
}

.product-info h5 {
    margin: 0 0 8px 0;
    color: #1e293b;
    font-weight: 600;
}

.product-info p {
    margin: 4px 0;
    color: #64748b;
    font-size: 14px;
}

.product-price {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
}

.price-label {
    font-weight: 500;
    color: #475569;
}

.price-value {
    font-weight: 600;
    color: #059669;
    margin-left: 8px;
}

/* Quantity Controls */
.quantity-controls {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.quantity-label {
    font-weight: 500;
    color: #475569;
}

.quantity-input-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.quantity-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #d1d5db;
    background: white;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: #374151;
    transition: all 0.2s ease;
}

.quantity-btn:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.quantity-btn:active {
    background: #e5e7eb;
}

.quantity-btn:disabled {
    background: #f9fafb;
    border-color: #e5e7eb;
    color: #9ca3af;
    cursor: not-allowed;
    opacity: 0.6;
}

.quantity-btn:disabled:hover {
    background: #f9fafb;
    border-color: #e5e7eb;
}

.quantity-display {
    min-width: 60px;
    text-align: center;
    font-weight: 600;
    color: #1e293b;
    font-size: 16px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 6px 8px;
    background: white;
}

.quantity-input {
    min-width: 60px;
    text-align: center;
    font-weight: 600;
    color: #1e293b;
    font-size: 16px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 6px 8px;
    background: white;
}

.quantity-input:focus {
    outline: none;
    border-color: var(--electrostar-primary);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

/* Billing Address Toggle */
#billing-address-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

#billing-address-section h4 {
    margin: 0 0 16px 0;
    color: #1e293b;
    font-size: 16px;
    font-weight: 600;
}

/* Search Suggestions */
.search-suggestions,
.suggestions-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-height: 200px;
    overflow-y: auto;
    display: none;
}

.suggestion-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background-color: #f8fafc;
}

.suggestion-item[data-product-id]:hover,
.suggestion-title {
    font-weight: 500;
    color: #1e293b;
    margin-bottom: 4px;
}

.suggestion-subtitle {
    font-size: 13px;
    color: #64748b;
}

/* Search container positioning */
.search-container {
    position: relative;
}

/* Form Styling */
.form-section {
    margin-bottom: 32px;
}

.form-section:last-child {
    margin-bottom: 0;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--electrostar-dark);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    padding-bottom: 8px;
    border-bottom: 1px solid #e5e7eb;
}

.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0; /* Remove bottom margin from form-groups inside form-rows */
}


.form-group label {
    display: flex;
    align-items: center;
    font-weight: 600;
    color: var(--electrostar-dark);
    margin-bottom: 6px;
    font-size: 14px;
}

.form-input,
.form-select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    background: var(--electrostar-white);
    color: var(--electrostar-dark);
    transition: all 0.2s ease;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: var(--electrostar-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-input.invalid,
.form-select.invalid {
    border-color: var(--error-red);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.required {
    color: var(--error-red);
    font-weight: 600;
    margin-left: 2px;
}

.field-error {
    color: var(--error-red);
    font-size: 12px;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.field-error::before {
    content: "⚠";
    font-size: 12px;
}

.form-input::placeholder {
    color: var(--electrostar-gray-light);
}

.form-help {
    font-size: 12px;
    color: var(--electrostar-gray);
    margin-top: 4px;
    margin-bottom: 0;
}

/* Phone Input Group */
.form-row .form-group[style*="flex: 2"] {
    flex: 2;
}

/* Suggestions List */
.suggestions-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--electrostar-white);
    border: 1px solid #d1d5db;
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    max-height: 300px;
    overflow-y: auto;
    display: none;
}

.form-group {
    position: relative;
}

.suggestion-item {
    padding: 0;
    background: var(--electrostar-white);
    border-bottom: 1px solid #f3f4f6;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.suggestion-item:hover {
    background: #f8fafc;
}

.suggestion-item:first-child {
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.suggestion-item:last-child {
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    border-bottom: none;
}

.company-header {
    font-weight: 600;
    color: var(--electrostar-dark);
    padding: 12px 16px 8px 16px;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
    font-size: 14px;
}

.suggestion-item.clickable-suggestion {
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.suggestion-item.clickable-suggestion:hover {
    background: #f0f9ff;
    border-left-color: var(--electrostar-primary);
    /* Removed transform: translateX(2px) to prevent overflow/scrolling */
}

.suggestion-item.clickable-suggestion:hover .company-header {
    background: #f0f9ff;
}

.suggestion-item.clickable-suggestion:hover .establishment {
    background: #f0f9ff;
}

/* Company Search Loading Spinner */
.company-search-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 16px;
    color: var(--electrostar-gray);
    font-size: 14px;
}

.search-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #f3f4f6;
    border-top: 2px solid var(--electrostar-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 8px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.establishment {
    padding: 12px 16px;
}

.siret-line {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.siret {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    background: #e0f2fe;
    color: #0369a1;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.headquarters-badge {
    background: var(--success-green);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.headquarters-badge::before {
    content: "★";
    font-size: 10px;
}

.address-line {
    color: var(--electrostar-gray);
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.address-line::before {
    content: "📍";
    font-size: 12px;
}

.suggestion-error {
    padding: 16px;
    text-align: center;
    color: var(--error-red);
    font-size: 14px;
    background: #fef2f2;
}

.suggestion-company-name {
    font-weight: 600;
    color: var(--electrostar-dark);
}

.suggestion-details {
    font-size: 12px;
    color: var(--electrostar-gray);
    margin-top: 2px;
}

/* Dirigeant Search */
.dirigeant-search-container {
    margin-bottom: 20px;
}

.dirigeant-count {
    font-size: 12px;
    color: var(--electrostar-gray);
    font-weight: normal;
    background: var(--electrostar-primary);
    color: white;
    padding: 2px 6px;
    border-radius: 12px;
    margin-left: 8px;
}

.dirigeant-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--electrostar-white);
    border: 1px solid #d1d5db;
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    max-height: 250px;
    overflow-y: auto;
}

.dirigeant-suggestion {
    padding: 12px 16px;
    border-bottom: 1px solid #f3f4f6;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.dirigeant-suggestion:hover {
    background: #f0f9ff;
}

.dirigeant-suggestion:last-child {
    border-bottom: none;
}

.dirigeant-name {
    font-weight: 600;
    color: var(--electrostar-dark);
    font-size: 14px;
}

.dirigeant-position {
    color: var(--electrostar-gray);
    font-size: 12px;
    margin-top: 2px;
}

.dirigeant-no-results {
    padding: 16px;
    text-align: center;
    color: var(--electrostar-gray);
    font-size: 14px;
    font-style: italic;
}

/* Alert Info */
.alert-info {
    background: rgba(37, 99, 235, 0.1);
    border: 1px solid var(--electrostar-primary);
    color: var(--electrostar-primary);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading state */
.loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Product Styles */
.product-suggestion {
    padding: 16px;
    border-bottom: 1px solid #e5e7eb;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.product-suggestion:hover {
    background-color: #f9fafb;
}

.product-suggestion:last-child {
    border-bottom: none;
}

.product-suggestion .product-name {
    font-weight: 600;
    color: var(--electrostar-dark);
    margin-bottom: 4px;
    font-size: 14px;
}

.product-suggestion .product-description {
    color: var(--electrostar-gray);
    font-size: 13px;
    margin-bottom: 6px;
    line-height: 1.4;
}

.product-suggestion .product-price {
    font-weight: 600;
    color: var(--electrostar-accent);
    font-size: 14px;
}

.subsidy-note {
    font-weight: 400;
    color: var(--electrostar-gray);
    font-size: 12px;
}

/* Selected Product Display */
.selected-product {
    margin-top: 24px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 2px solid var(--electrostar-primary);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.1);
    position: relative;
}

.selected-product::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--electrostar-primary), var(--electrostar-accent));
}

.selected-product h4 {
    margin: 0 0 20px 0;
    color: var(--electrostar-primary);
    font-size: 18px;
    font-weight: 700;
    padding: 24px 24px 0 24px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.selected-product h4::before {
    content: '✓';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: var(--electrostar-primary);
    color: white;
    border-radius: 50%;
    font-size: 14px;
    font-weight: bold;
}

.product-card {
    padding: 0 24px 24px 24px;
    background: transparent;
    border: none;
    box-shadow: none;
}

.product-info {
    margin-bottom: 20px;
}

.product-info h5 {
    font-size: 20px;
    font-weight: 600;
    color: var(--electrostar-dark);
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.product-info p {
    color: #64748b;
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 16px 0;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #f1f5f9;
    border-radius: 10px;
    border-left: 4px solid var(--electrostar-accent);
}

.price-label {
    font-size: 14px;
    font-weight: 500;
    color: #475569;
}

.price-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--electrostar-accent);
}

.quantity-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.quantity-label {
    font-size: 16px;
    font-weight: 600;
    color: var(--electrostar-dark);
}

.quantity-input-group {
    display: flex;
    align-items: center;
    gap: 2px;
    background: white;
    border-radius: 10px;
    border: 2px solid #e2e8f0;
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.quantity-input-group:focus-within {
    border-color: var(--electrostar-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.quantity-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: #f8fafc;
    color: var(--electrostar-primary);
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-btn:hover {
    background: var(--electrostar-primary);
    color: white;
}

.quantity-btn:active {
    transform: scale(0.95);
}

.quantity-input {
    width: 60px;
    height: 40px;
    border: none;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: var(--electrostar-dark);
    background: white;
    outline: none;
}

.quantity-input::-webkit-outer-spin-button,
.quantity-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.quantity-input[type=number] {
    -moz-appearance: textfield;
    appearance: textfield;
}

/* Responsive design for selected product */
@media (max-width: 768px) {
    .selected-product h4 {
        font-size: 16px;
        padding: 20px 20px 0 20px;
    }
    
    .product-card {
        padding: 0 20px 20px 20px;
    }
    
    .product-info h5 {
        font-size: 18px;
    }
    
    .quantity-controls {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
        text-align: center;
    }
    
    .quantity-input-group {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .selected-product {
        margin-top: 16px;
        border-radius: 12px;
    }
    
    .selected-product h4 {
        font-size: 15px;
        padding: 16px 16px 0 16px;
    }
    
    .product-card {
        padding: 0 16px 16px 16px;
    }
    
    .quantity-controls {
        padding: 16px;
    }
    
    .quantity-btn {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    
    /* Step 3: Employee Counter Mobile Styles */
    .eligibility-info {
        background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), rgba(59, 130, 246, 0.08));
        border: 1px solid #e0e7ff;
        border-radius: 8px;
        padding: 12px;
        margin: 16px 0 !important;
    }
    
    .eligibility-highlight {
        font-size: 16px;
        padding: 12px;
        margin-bottom: 12px;
    }
    
    .employee-count-container {
        gap: 16px;
    }
    
    .employee-summary {
        gap: 16px;
        padding: 16px;
        border-radius: 8px;
        background: #fafbfc;
        border: 1px solid #e5e7eb;
    }
    
    .summary-item {
        text-align: center;
    }
    
    .summary-label {
        font-size: 12px;
        margin-bottom: 2px;
    }
    
    .summary-value {
        font-size: 20px;
        font-weight: 700;
    }
    
    .employee-input {
        width: 100px;
        font-size: 16px;
        font-weight: 600;
    }
    
    .alert-success {
        margin: 16px 0;
        padding: 12px;
        font-size: 14px;
    }
    
    .quantity-input {
        width: 50px;
        height: 36px;
        font-size: 15px;
    }
}

.product-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
}

.product-info .product-name {
    font-weight: 600;
    color: var(--electrostar-dark);
    margin-bottom: 6px;
    font-size: 16px;
}

.product-info .product-description {
    color: var(--electrostar-gray);
    font-size: 14px;
    margin-bottom: 6px;
    line-height: 1.4;
}

.product-info .product-price {
    font-size: 13px;
    color: var(--electrostar-gray);
}

.product-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.qty-btn {
    width: 36px;
    height: 36px;
    border: 1px solid #d1d5db;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: var(--electrostar-dark);
}

.qty-btn:hover:not(:disabled) {
    background: #f3f4f6;
    border-color: var(--electrostar-primary);
}

.qty-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.quantity-display {
    font-size: 16px;
    font-weight: 600;
    color: var(--electrostar-dark);
    min-width: 20px;
    text-align: center;
}

.product-total {
    padding: 16px 20px;
    background: #f0fdf4;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.total-label {
    color: var(--electrostar-gray-dark);
    font-weight: 500;
    font-size: 14px;
}

.total-amount {
    color: var(--electrostar-accent);
    font-weight: 700;
    font-size: 18px;
}

/* OVERRIDE: Keep postal code and city on same line with automatic wrapping */
#company-location-fields.form-row {
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
    align-items: flex-start;
}

/* Only apply flex display when the element is visible (not display: none) */
#company-location-fields.form-row:not([style*="display: none"]) {
    display: flex !important;
}

#company-location-fields .form-group {
    flex: 1;
    min-width: 120px;
    margin-bottom: 0;
}

#company-location-fields .form-group:first-child {
    flex: 0 0 140px; /* Postal code: fixed width */
    max-width: 140px;
}

#company-location-fields .form-group:last-child {
    flex: 1; /* City: takes remaining space */
    min-width: 200px;
}

/* Employee Counter Styles */
.eligibility-info {
    text-align: center;
    margin-bottom: 32px;
}

.eligibility-highlight {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 18px;
    color: #374151;
    margin-bottom: 16px;
    padding: 16px;
    background: rgba(59, 130, 246, 0.08);
    border-radius: 12px;
    border: 1px solid #e0e7ff;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.employee-count-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
    align-items: center;
}

.employee-counter {
    justify-self: center;
}

.employee-summary {
    display: flex;
    gap: 32px;
    padding: 20px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    width: 100%;
    max-width: 400px;
    justify-content: center;
}

.summary-item {
    text-align: center;
}

.summary-label {
    display: block;
    font-size: 14px;
    color: var(--electrostar-gray);
    margin-bottom: 4px;
}

.summary-value {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: var(--electrostar-dark);
}

.summary-item.highlight .summary-value {
    color: #1e40af;
    font-weight: 600;
}

/* Employee input specific styling */
.employee-input {
    width: 140px; /* Wider to accommodate large numbers like 999,999,999 */
    height: 48px;
    text-align: center;
    font-weight: 600;
    border: 2px solid #d1d5db;
    background: #ffffff;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: text;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    padding: 0 12px;
    font-size: 18px;
    color: var(--electrostar-dark);
}

.employee-input:hover {
    border-color: #9ca3af;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.employee-input:focus {
    outline: none;
    border-color: var(--electrostar-primary);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15), 0 4px 12px rgba(37, 99, 235, 0.1);
    transform: translateY(-1px);
}

/* Referral Code Styles */
.optional-badge {
    background: var(--electrostar-gray-light);
    color: white;
    font-size: 12px;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: auto;
}

.referral-code-description {
    color: var(--electrostar-gray);
    font-size: 14px;
    margin: 0 0 16px 0;
}

.referral-code-input-group {
    display: flex;
    gap: 0;
    align-items: stretch;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    overflow: hidden;
    background: white;
    transition: all 0.2s ease;
}

.referral-code-input-group:focus-within {
    border-color: var(--electrostar-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.referral-code-input-group .form-group {
    flex: 1;
    margin-bottom: 0;
}

.referral-input {
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    border: none;
    border-radius: 0;
    outline: none;
    box-shadow: none;
    background: transparent;
}

.referral-input:focus {
    border: none;
    box-shadow: none;
    outline: none;
}

.referral-activate-btn {
    min-width: 100px;
    border-radius: 0;
    border: none;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    white-space: nowrap;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
}

.referral-status-container {
    margin-top: 16px;
}

.referral-status {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    border-radius: 8px;
    font-size: 14px;
}

.referral-status.loading {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    color: var(--electrostar-primary);
}

/* .referral-status.success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: var(--success-green);
} */

.referral-status.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: var(--error-red);
}

.referral-status .material-symbols-outlined {
    font-size: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}

.referral-status .loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid var(--electrostar-primary);
    border-radius: 50%;
    margin-right: 8px;
    flex-shrink: 0;
    background: rgba(59, 130, 246, 0.1);
}

.referral-status div {
    flex: 1;
}

.referral-status strong {
    display: block;
    margin-bottom: 4px;
}

.referral-status p {
    margin: 0;
    opacity: 0.9;
}

/* Mobile adjustments for referral code */
@media (max-width: 768px) {
    .referral-code-input-group {
        flex-direction: column;
        gap: 0;
        border-radius: 8px;
        margin-top: 4px;
    }
    
    .referral-activate-btn {
        width: 100%;
        justify-content: center;
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.2);
        border-radius: 0;
        padding: 12px;
        font-weight: 600;
    }
    
    .referral-input {
        border-radius: 0;
        padding: 12px;
        font-size: 14px;
    }
    
    .referral-input::placeholder {
        font-size: 13px;
        color: var(--electrostar-gray-light);
    }
    
    .optional-badge {
        font-size: 8px;
        padding: 1px 3px;
        margin-left: 2px;
    }
}

/* Loading animation for spinning hourglass */
@keyframes spin-submit {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.spinning {
    animation: spin-submit 1s linear infinite;
}

/* Confirmation page styles */
.confirmation-content {
    text-align: center;
}

.success-message h2 {
    color: #22c55e;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.success-message p {
    color: #6b7280;
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.confirmation-details {
    background: #f8fafc;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: 600;
    color: #374151;
}

.detail-value {
    font-family: monospace;
    color: #6b7280;
    background: #ffffff;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    border: 1px solid #d1d5db;
}

.next-steps {
    text-align: left;
    margin: 2rem 0;
}

.next-steps h3 {
    display: flex;
    align-items: center;
    color: #374151;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.next-steps ol {
    color: #6b7280;
    padding-left: 1.5rem;
}

.next-steps li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.contact-info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 2rem;
}

.contact-info p {
    margin: 0;
    color: #1d4ed8;
    font-size: 0.95rem;
}

/* Submission error styles */
.submission-error {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    font-weight: 500;
}

.submission-error .material-symbols-outlined {
    color: #dc2626;
    font-size: 1.25rem;
}

/* Responsive confirmation styles */
@media (max-width: 768px) {
    .confirmation-details {
        padding: 1rem;
    }
    
    .detail-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .detail-value {
        width: 100%;
        text-align: center;
    }
    
    .success-message h2 {
        font-size: 1.25rem;
    }
    
    .success-message p {
        font-size: 1rem;
    }
}

/* Success & Celebration Animations */
.celebration-container {
    position: relative;
    padding: 2rem;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    border-radius: 16px;
    margin-bottom: 2rem;
    overflow: hidden;
    animation: celebrationPulse 2s ease-in-out infinite alternate;
}

@keyframes celebrationPulse {
    0% { box-shadow: 0 0 20px rgba(34, 197, 94, 0.3); }
    100% { box-shadow: 0 0 40px rgba(34, 197, 94, 0.6); }
}

.celebration-icon {
    font-size: 4rem !important;
    color: white;
    margin-bottom: 1rem;
    animation: bounce 1s ease-in-out infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-20px); }
    60% { transform: translateY(-10px); }
}

@keyframes colorChange {
    0% { color: var(--electrostar-dark); }
    33% { color: #f59e0b; }
    66% { color: #e11d48; }
    100% { color: var(--electrostar-dark); }
}

/* Referral Success Specific Styles */
.referral-celebration {
    position: relative;
    padding: 2rem;
    background: linear-gradient(135deg, var(--electrostar-accent), #22c55e);
    border-radius: 16px;
    margin-bottom: 2rem;
    overflow: hidden;
    text-align: center;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.2);
    transition: all 0.3s ease;
}

.referral-celebration:hover {
    box-shadow: 0 8px 30px rgba(16, 185, 129, 0.25);
    transform: translateY(-2px);
}

@keyframes celebrationPulse {
    0% { box-shadow: 0 4px 20px rgba(16, 185, 129, 0.15); }
    100% { box-shadow: 0 8px 30px rgba(16, 185, 129, 0.25); }
}

/* Compact version */
.referral-celebration.compact {
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.referral-celebration.animated .celebration-content {
    animation: fadeInScale 0.8s ease-out;
}

@keyframes fadeInScale {
    0% { 
        opacity: 0; 
        transform: scale(0.9); 
    }
    100% { 
        opacity: 1; 
        transform: scale(1); 
    }
}

.celebration-content {
    color: white;
}

.celebration-header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    gap: 0.75rem;
}

.celebration-header .celebration-icon {
    font-size: 2rem;
    animation: bounce 1s ease-in-out infinite;
    color: var(--electrostar-dark);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.celebration-header .celebration-icon.color-changing {
    animation: bounce 1s ease-in-out infinite, colorChange 3s ease-in-out infinite;
}

.referral-success-title {
    font-size: 1.4rem;
    font-weight: bold;
    margin: 0;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.compact .referral-success-title {
    font-size: 1.2rem;
}

.referral-success-message {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 1rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    color: var(--electrostar-dark);
}

.compact .referral-success-message {
    padding: 0.75rem;
}

.referral-benefit {
    font-weight: bold;
    color: var(--electrostar-primary);
    background: linear-gradient(135deg, var(--electrostar-primary), var(--electrostar-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    font-size: 1.1em;
    letter-spacing: 0.5px;
}

.success-item {
    display: flex;
    align-items: center;
    color: white;
    font-weight: 500;
    gap: 0.75rem;
}

.success-item .material-symbols-outlined {
    font-size: 1.25rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    padding: 0.4rem;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--electrostar-accent);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.compact .success-item .material-symbols-outlined {
    width: 2rem;
    height: 2rem;
    font-size: 1rem;
    padding: 0.3rem;
}

.success-text {
    flex: 1;
    text-align: left;
}

.success-item strong {
    display: block;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.compact .success-item strong {
    font-size: 0.95rem;
}

.success-item p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.95;
    line-height: 1.3;
}

.compact .success-item p {
    font-size: 0.85rem;
}

.celebration-title {
    color: white;
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.celebration-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.referral-success-message {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
    color: var(--electrostar-dark);
}

.success-item {
    display: flex;
    align-items: center;
    color: white;
    font-weight: 500;
}

.success-item .material-symbols-outlined {
    margin-right: 1rem;
    font-size: 1.5rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    padding: 0.5rem;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.success-item div {
    flex: 1;
}

.success-item strong {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.success-item p {
    margin: 0;
    font-size: 0.95rem;
    opacity: 0.9;
    line-height: 1.4;
}

.benefits-activation {
    background: rgba(255, 255, 255, 0.95);
    color: #1f2937;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    border-left: 4px solid #fbbf24;
}

/* Urgent Action Required Styles */
.urgent-action-required {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    border: 2px solid #ef4444;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 2rem 0;
    animation: urgentPulse 1.5s ease-in-out infinite;
}

@keyframes urgentPulse {
    0%, 100% { border-color: #ef4444; box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    50% { border-color: #dc2626; box-shadow: 0 0 0 8px rgba(239, 68, 68, 0.1); }
}

.urgent-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    color: #dc2626;
}

.urgent-icon {
    font-size: 2rem !important;
    margin-right: 0.5rem;
    animation: urgentShake 0.5s ease-in-out infinite;
}

@keyframes urgentShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-2px); }
    75% { transform: translateX(2px); }
}

.urgent-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.urgent-content {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

.signature-requirement,
.email-action {
    display: flex;
    align-items: flex-start;
    background: white;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #ef4444;
}

.signature-requirement .material-symbols-outlined,
.email-action .material-symbols-outlined {
    margin-right: 1rem;
    color: #ef4444;
    font-size: 1.5rem !important;
    margin-top: 0.25rem;
}

.signature-requirement strong,
.email-action strong {
    color: #dc2626;
    font-size: 1.1rem;
}

.signature-requirement p,
.email-action p {
    margin: 0.5rem 0 0 0;
    color: #374151;
    line-height: 1.5;
}

/* Timeline Steps */
.timeline-steps {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.timeline-steps li {
    padding: 0.75rem 0;
    font-size: 1rem;
    border-left: 3px solid #e5e7eb;
    padding-left: 1rem;
    margin-bottom: 0.5rem;
    position: relative;
}

.timeline-steps li.completed {
    border-left-color: #22c55e;
    color: #16a34a;
    font-weight: 500;
}

.timeline-steps li.current {
    border-left-color: #3b82f6;
    background: #eff6ff;
    padding: 1rem;
    border-radius: 0 8px 8px 0;
    font-weight: 600;
    color: #1e40af;
    animation: currentStepHighlight 2s ease-in-out infinite;
}

@keyframes currentStepHighlight {
    0%, 100% { background: #eff6ff; }
    50% { background: #dbeafe; }
}

.timeline-steps li.pending {
    color: #6b7280;
}

/* Enhanced contact info styling */
.contact-info {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 2rem;
    display: flex;
    align-items: flex-start;
}

.contact-info .material-symbols-outlined {
    margin-right: 1rem;
    color: #3b82f6;
    font-size: 1.5rem !important;
    margin-top: 0.25rem;
}

.contact-info strong {
    color: #1f2937;
}

.contact-info p {
    margin: 0.5rem 0 0 0 !important;
    color: #4b5563 !important;
    line-height: 1.5;
    font-size: 0.95rem !important;
}

/* Success message */
.success-message {
    text-align: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.success-message h2 {
    color: #22c55e;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.success-message p {
    color: #6b7280;
    font-size: 1.1rem;
    margin-bottom: 0;
}

/* New professional confirmation styles */
.next-steps-section {
    background: linear-gradient(135deg, #eff6ff, #f0f9ff);
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    padding: 1.5rem;
    margin: 0 0 2rem 0;
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.1);
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.next-steps-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.25rem;
    color: #1e40af;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #dbeafe;
}

.next-steps-header .material-symbols-outlined {
    margin-right: 0.75rem;
    font-size: 1.5rem;
    color: #3b82f6;
    background: #dbeafe;
    border-radius: 50%;
    padding: 0.5rem;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.next-steps-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: #1e40af;
}

.next-steps-content {
    display: grid;
    gap: 1rem;
}

.step-info {
    display: flex;
    align-items: flex-start;
    background: white;
    padding: 1rem;
    border-radius: 8px;
    border-left: 3px solid #3b82f6;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    animation: fadeInUp 0.6s ease-out both;
}

.step-info:first-child {
    animation-delay: 0.4s;
}

.step-info:nth-child(2) {
    animation-delay: 0.5s;
}

.step-info .material-symbols-outlined {
    margin-right: 1rem;
    color: #3b82f6;
    font-size: 1.5rem;
    margin-top: 0.125rem;
    flex-shrink: 0;
    background: #eff6ff;
    border-radius: 50%;
    padding: 0.5rem;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-info-content {
    flex: 1;
}

.step-info strong {
    color: #1e40af;
    font-size: 1rem;
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.step-info p {
    margin: 0;
    color: #475569;
    line-height: 1.5;
    font-size: 0.9rem;
}

.process-timeline {
    margin: 2rem 0;
}

.process-timeline h3 {
    display: flex;
    align-items: center;
    color: #374151;
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.process-timeline .timeline-steps {
    list-style: none;
    padding: 0;
    margin: 0;
}

.process-timeline .timeline-steps li {
    display: flex;
    align-items: center;
    padding: 1rem;
    margin-bottom: 0.75rem;
    border-radius: 8px;
    border-left: 4px solid #e5e7eb;
    background: #fafafa;
}

.process-timeline .timeline-steps li.completed {
    border-left-color: #22c55e;
    background: #f0fdf4;
}

.process-timeline .timeline-steps li.current {
    border-left-color: #3b82f6;
    background: #f0f9ff;
    font-weight: 500;
    color: #1e40af;
}

.process-timeline .timeline-steps li.pending {
    color: #6b7280;
}

.process-timeline .timeline-steps li .material-symbols-outlined {
    margin-right: 1rem;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.process-timeline .timeline-steps li.completed .material-symbols-outlined {
    color: #22c55e;
}

.process-timeline .timeline-steps li.current .material-symbols-outlined {
    color: #3b82f6;
}

.process-timeline .timeline-steps li.pending .material-symbols-outlined {
    color: #9ca3af;
}

/* Mobile responsive adjustments for new styles */
@media (max-width: 640px) {
    .celebration-container,
    .referral-celebration {
        padding: 1.5rem;
    }
    
    .referral-celebration.compact {
        padding: 1rem;
    }
    
    .celebration-icon {
        font-size: 3rem !important;
    }
    
    .celebration-header .celebration-icon {
        font-size: 1.5rem;
    }
    
    .celebration-header {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .celebration-title,
    .referral-success-title {
        font-size: 1.5rem;
    }
    
    .compact .referral-success-title {
        font-size: 1.1rem;
    }
    
    .referral-success-message {
        padding: 1rem;
    }
    
    .success-item {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .success-item .material-symbols-outlined {
        margin: 0 auto;
    }
    
    .success-text {
        text-align: center;
    }
    
    .referral-success-message {
        padding: 1rem;
    }
    
    .success-item {
        flex-direction: column;
        text-align: center;
    }
    
    .success-item .material-symbols-outlined {
        margin: 0 auto 0.5rem auto;
    }
    
    .urgent-header h3 {
        font-size: 1.1rem;
    }
    
    .signature-requirement,
    .email-action {
        flex-direction: column;
        text-align: center;
    }
    
    .signature-requirement .material-symbols-outlined,
    .email-action .material-symbols-outlined {
        margin: 0 auto 0.5rem auto;
    }
    
    .timeline-steps li.current {
        padding: 0.75rem;
    }
    
    .contact-info {
        flex-direction: column;
        text-align: center;
    }
    
    .contact-info .material-symbols-outlined {
        margin: 0 auto 0.5rem auto;
    }
    
    .next-steps-section {
        padding: 1.25rem;
        margin: 0 0 1.5rem 0;
    }
    
    .next-steps-header {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
        padding-bottom: 1rem;
    }
    
    .next-steps-header .material-symbols-outlined {
        margin: 0 auto;
    }
    
    .next-steps-content {
        gap: 0.75rem;
    }
    
    .step-info {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
    }
    
    .step-info .material-symbols-outlined {
        margin: 0 auto 0.75rem auto;
    }
    
    .step-info-content {
        text-align: center;
    }
    
    .process-timeline .timeline-steps li {
        flex-direction: column;
        text-align: center;
        padding: 0.75rem;
    }
    
    .process-timeline .timeline-steps li .material-symbols-outlined {
        margin: 0 auto 0.5rem auto;
    }
}

/* Error Modal Styles */
.error-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.error-modal.show {
    opacity: 1;
    visibility: visible;
}

.error-modal.closing {
    opacity: 0;
}

.error-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.error-modal-content {
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.error-modal.show .error-modal-content {
    transform: scale(1);
}

.error-modal-header {
    padding: 1.5rem 1.5rem 1rem 1.5rem;
    text-align: center;
    border-bottom: 1px solid #e2e8f0;
}

.error-modal-header .error-icon {
    font-size: 3rem;
    color: #e11d48;
    margin-bottom: 0.5rem;
    display: block;
}

.error-modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--electrostar-dark);
}

.error-modal-body {
    padding: 1.5rem;
    text-align: center;
}

.error-modal-body p {
    margin: 0;
    color: var(--electrostar-gray-dark);
    line-height: 1.5;
}

.error-modal-footer {
    padding: 1rem 1.5rem 1.5rem 1.5rem;
    text-align: center;
}

.error-modal-close {
    background: var(--electrostar-primary);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.75rem 2rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
}

.error-modal-close:hover {
    background: #1d4ed8;
}

.error-modal-close:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.3);
}

/* Mobile specific adjustments */
@media (max-width: 480px) {
    .error-modal-backdrop {
        padding: 0.5rem;
    }
    
    .error-modal-content {
        max-width: none;
        margin: 0;
        border-radius: 12px;
    }
    
    .error-modal-header,
    .error-modal-body,
    .error-modal-footer {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}
