
    /* Root Variables - UPDATED WITH NEW BLUE COLOR */
:root {
    --primary-color: #2E5652;
    --secondary-color: #97D1CB;
    --purple-color: #1A1A47;
    --burgundy-color: #1A1A47;
    --dark-color: #1A1A47;
    --green-color: #97D1CB;
}

/* Base font family - Roboto for body */
body {
    font-family: 'Roboto', Arial, Helvetica, sans-serif;
    background-color: white;
    margin: 0;
    padding: 0;
    font-size: 1.2rem;
}

/* All headings use Anth Bold */
h1, h2, h3, h4, h5, h6,
.section-heading,
.step-title,
.welcome-title,
.benefit-title {
    font-family: 'Roboto', Arial Black, sans-serif !important;
    font-weight: 700 !important;
}

/* Updated CMC Notice - Full width background with constrained content */
.cmc-notice {
    background: #1A1A47;
    padding: 20px 0;
    text-align: center;
    font-size: 13px;
    color: white;
    line-height: 1.6;
    font-family: 'Roboto', sans-serif;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-top: 0;
    margin-bottom: 0;
}

.cmc-notice-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;  /* Add horizontal padding for content */
}

.cmc-notice p {
    color: white;
    margin: 0;
    padding: 0.25rem 0;
    font-family: 'Roboto', sans-serif;
}

/* Mobile CMC notice - slightly bigger font */
@media (max-width: 600px) {
    .cmc-notice {
        font-size: 12px !important;
        padding: 12px 0;
        line-height: 1.5;
        width: 100%;
        margin-left: 0;
        position: relative;
        left: 0;
        right: 0;
    }

    .cmc-notice-container {
        padding: 0 15px;
        max-width: 100%;
    }

    .cmc-notice p {
        font-size: 12px !important;
        padding: 0;
        margin: 0;
    }
}


/* Updated header with navy background */
.site-header {
    background: #1A1A47;
    padding: 20px 0;
    border-bottom: 2px solid #f1f1f2;
}

/* Header container for desktop - logo left, tagline right */
.header-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo sizing - 70% of previous size (was 450px, now 315px) */
.logo-link img {
    max-width: 315px;
    height: auto;
}

/* Header tagline - desktop: right aligned */
.header-tagline {
    font-family: 'Roboto', Arial Black, sans-serif;
    color: #DAE9EE;
    font-size: 1.4rem;
    margin: 0;
    text-align: right;
}

/* Mobile header - stacked layout */
@media (max-width: 768px) {
    .site-header {
        padding: 12px 0;
        margin-bottom: 0;
    }

    .header-container {
        padding: 0 15px;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        max-width: 100%;
        gap: 8px;
    }

    .belmond-logo {
        max-width: 70%;
        width: auto;
        height: auto;
    }

    .header-tagline {
        text-align: center;
        font-size: 1.1rem;
    }

    .logo-link {
        display: block;
        width: 100%;
        text-align: center;
    }

    .logo-link img {
        max-width: 90%;
        width: auto;
        height: auto;
        margin: 0 auto;
        display: block;
    }
}


/* Updated Footer Styles */
.footer-subfooter {
    background: #E4EEF0;
    padding: 20px 0;
    text-align: center;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-top: 40px;
    margin-bottom: 0;
}

.footer-subfooter p {
    color: #1A1A47;
    font-size: 13px;
    line-height: 1.6;
    margin: 0;
    padding: 5px 20px;
    font-family: 'Roboto', sans-serif;
}

.site-footer {
    background: #1A1A47;
    color: white;
    padding: 40px 0 20px;
    font-family: 'Roboto', sans-serif;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-top: 0;
    margin-bottom: 0;
}


.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
    font-size: 13px;
    line-height: 1.8;
    font-family: 'Roboto', sans-serif;
    color: white;
}

.footer-content p {
    margin-bottom: 15px;
    color: white;
    font-family: 'Roboto', sans-serif;
}

.footer-tagline {
    font-size: 26px;
    font-weight: 600;
    color: white;
    margin: 30px 0;
    letter-spacing: 2px;
    font-family: 'Roboto', Arial Black, sans-serif;
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.2);
}

.footer-links a {
    color: white;
    text-decoration: none;
    font-size: 12px;
    text-transform: uppercase;
    transition: color 0.3s;
    font-family: 'Roboto', sans-serif;
}

.footer-links a:hover {
    color: #97D1CB;
}

.copyright {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.2);
    color: white;
}

/* Main container - MUCH MORE CENTERED WITH LARGER MARGINS */
.container {
    max-width: 800px;  /* Reduced from 95% to fixed width */
    margin: 0 auto;
    padding: 20px;
    background-color: white;
}

/* Mobile: Reduce horizontal padding */
@media (max-width: 600px) {
    .container {
        padding: 8px;
    }

    .form-section {
        padding: 10px 8px !important;
    }

    /* STEP 6 SPECIFIC FIXES */

    /* Remove padding from main section divs to align with headers */
    #step6 .form-section > div[style*="padding: 24px"] {
        padding: 8px !important;
    }

    /* Align consent boxes with header - remove side padding */
    #step6 .consent-section-styled {
        padding: 8px !important;
        margin: 10px 0 !important;
    }

    /* Inner white boxes - minimal padding */
    #step6 div[style*="padding: 20px; background: white"],
    #step6 div[style*="padding: 20px; background: #ffffff"],
    #step6 div[style*="padding: 25px; background: white"],
    #step6 div[style*="padding: 15px; background: white"] {
        padding: 8px !important;
    }

    /* Framed inner boxes (like the consent checkboxes) */
    #step6 div[style*="padding: 20px; background: #f8f9fa"],
    #step6 div[style*="padding: 15px; background: #f8f9fa"] {
        padding: 8px !important;
    }

    /* The gradient boxes with "I understand that:" */
    #step6 div[style*="background: linear-gradient(135deg, rgba"] {
        padding: 8px !important;
        margin: 8px 0 !important;
    }

    /* Section 1, 2, 3, 4 - all main consent areas */
    #section1_final_steps > div[style*="padding"],
    #section2_existing_rep > div[style*="padding"],
    #section3_claim_types > div[style*="padding"],
    #section4_appointing > div[style*="padding"] {
        padding: 8px !important;
    }

    /* Existing representation section inner boxes */
    #existing_representation_section {
        padding: 8px !important;
        margin: 8px 0 !important;
    }

    /* Professional reps section */
    #professional_reps_section {
        padding: 8px !important;
        margin-top: 8px !important;
    }

    /* Disengagement section */
    #disengagement_section {
        padding: 8px !important;
        margin-top: 8px !important;
    }

    /* Claim type consents area */
    #claim_type_consents > div {
        padding: 8px !important;
        margin: 8px 0 !important;
    }

    /* Choice reason wrapper */
    #choice_reason_wrapper {
        padding: 8px !important;
        margin-top: 8px !important;
    }

    /* Mammoth promotions section */
    #mammoth_promotions_section {
        padding: 8px !important;
        margin: 8px 0 !important;
    }

    /* Terms signature section */
    .terms-signature-section .fee-info {
        padding: 8px !important;
    }

    /* Consent options container */
    .consent-options {
        padding: 8px !important;
        margin: 8px 0 !important;
    }
}

/* Center welcome boxes on desktop */
.welcome-benefits {
    max-width: 100%;  /* Full width within container */
    margin: 0 auto;
}

/* Progress bar from Belmond style */
.progress-bar {
    display: none;
    justify-content: space-around;
    margin-bottom: 30px;
    padding: 20px 60px;
    background-color: #f8f9fa;
    border-radius: 10px;
    position: relative;
}

/*  FIX: prevent wrapping */
.progress-bar {
    flex-wrap: nowrap !important;
}

/* Desktop: show as flex */
@media (min-width: 769px) {
    .progress-bar {
        display: flex !important;
    }
}


/* ============================================================================
   PROGRESS BAR - Horizontal Fill Style
   ============================================================================ */
.progress-container {
    display: none;
    padding: 15px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 12px;
    margin-bottom: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    align-items: center;
    gap: 15px;
}

.progress-container.visible {
    display: flex;
}

.progress-title {
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #2E5652;
    margin: 0;
    white-space: nowrap;
}

.progress-percentage {
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #2E5652;
    min-width: 40px;
    text-align: right;
}

.progress-track {
    flex: 1;
    height: 12px;
    background-color: #e9ecef;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #2E5652 0%, #3d7a75 50%, #4a9690 100%);
    border-radius: 6px;
    transition: width 0.4s ease-out;
    position: relative;
    min-width: 0;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
            90deg,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.2) 50%,
            rgba(255, 255, 255, 0) 100%
    );
    animation: shimmer 2s ease-in-out infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .progress-container {
        padding: 12px 15px;
        margin-bottom: 20px;
        border-radius: 10px;
        gap: 10px;
    }

    .progress-title {
        font-size: 12px;
    }

    .progress-percentage {
        font-size: 12px;
        min-width: 35px;
    }

    .progress-track {
        height: 10px;
    }
}


/* Trustpilot logo - natural size desktop, constrained mobile */
.trustpilot-logo {
    height: 80px;
    width: auto;
}

@media (max-width: 768px) {
    .trustpilot-logo {
        height: auto;
        width: 100%;
        max-width: 100%;
    }
}

/* Belmond logo - 50% on desktop, full width mobile */
.belmond-logo {
    max-width: 50%;
}

@media (max-width: 768px) {
    .belmond-logo {
        max-width: 100%;
    }
}


/* Form sections */
.form-section {
    background-color: #f9f9f9;
    padding: 30px;
    margin-bottom: 20px;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
}

.form-section h2,
.section-heading {
    color: #1A1A47;
    margin-bottom: 10px;
    font-size: 1.8rem;
    font-family: 'Roboto', Arial Black, sans-serif;
    font-weight: 700;
}

.form-section p {
    color: #6c757d;
    margin-bottom: 25px;
    line-height: 1.6;
    font-family: 'Roboto', sans-serif;
}

/* Form step visibility */
.form-step {
    display: none;
    animation: fadeIn 0.5s;
}

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

/* Substep sections within Step 1 */
.substep-section {
    animation: fadeIn 0.3s ease-in-out;
}

.substep-section.hidden {
    display: none !important;
}

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

/* Welcome section specific styles */
.welcome-section {
    text-align: center;
    padding: 0 20px 40px 20px;
}

.welcome-section h1,
.welcome-title {
    color: #1A1A47;
    font-size: 2.2rem;
    font-family: 'Roboto', Arial Black, sans-serif;
    font-weight: 700;
    margin-bottom: 20px;
}

.benefit-box,
.benefit-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 25px;
    margin: 20px auto;
    max-width: 100%;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    text-align: left;
}

.benefit-box:hover,
.benefit-item:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transform: translateY(-2px);
    background: #2E5652;
    color: white;
}

.benefit-box h3,
.benefit-title {
    color: #2E5652;
    font-size: 1.2rem;
    margin-bottom: 10px;
    font-family: 'Roboto', Arial Black, sans-serif;
    font-weight: 700;
}

.benefit-box:hover h3,
.benefit-box:hover p,
.benefit-item:hover .benefit-title,
.benefit-item:hover .benefit-subtext {
    color: white;
}

.benefit-subtext {
    font-family: 'Roboto', sans-serif;
}

.benefit-icon {
    width: 30px;
    height: 30px;
}

/* Form inputs */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #495057;
    font-family: 'Roboto', sans-serif;
}

.form-input,
.form-select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ced4da;
    border-radius: 5px;
    font-size: 16px;
    transition: all 0.3s;
    font-family: 'Roboto', sans-serif;
    box-sizing: border-box;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: #1A1A47;
    box-shadow: 0 0 0 0.2rem rgba(26, 26, 71, 0.25);
}

/* Title buttons */
.title-btn {
    padding: 0.875rem 1.5rem;
    border: 2px solid #dee2e6;
    border-radius: 12px;
    background: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Roboto', sans-serif;
}

.title-btn-other {
    grid-column: 2 / 4;
}

.title-btn:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.title-btn.active {
    background: var(--dark-color);
    color: white;
    border-color: var(--dark-color);
}
/* Buttons */
.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Roboto', sans-serif;
}

.btn-primary {
    background-color: #2E5652;
    color: white;
}

.btn-primary:hover {
    background-color: #1f3d39;
}

/* Back button styling to match TEST MODE */
.btn-secondary {
    background: #ff6b6b !important;
    color: white !important;
    border: none !important;
    font-weight: 600 !important;
    font-family: 'Roboto', Arial, sans-serif !important;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #ff5252 !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(255, 107, 107, 0.3);
}

.btn-secondary .btn-icon {
    color: white !important;
}

/* Light green buttons for secondary actions */
.btn-light-green {
    background-color: #97D1CB !important;
    color: #1A1A47 !important;
    border: none !important;
    font-weight: 600 !important;
    font-family: 'Roboto', Arial, sans-serif !important;
    transition: all 0.3s ease;
}

.btn-light-green:hover {
    background-color: #7fc4bd !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(151, 209, 203, 0.3);
}

.btn-light-green .btn-icon {
    color: #1A1A47 !important;
}



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

.btn-start,
.btn-large {
    padding: 15px 40px;
    font-size: 1.1rem;
}

.button-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2rem;
}

/* Error messages */
.error-message {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 5px;
    display: none;
    font-family: 'Roboto', sans-serif;
}

/* Trust badges */
.trust-logo {
    width: 360px;
    height: auto;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.trust-logo:hover {
    opacity: 0.9;
}

.page-footer {
    margin-top: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    padding-top: 2rem;
    border-top: 1px solid #dee2e6;
}

.footer-disclaimer {
    font-family: 'Roboto', sans-serif;
    font-size: 0.9rem;
    color: #6c757d;
    text-align: center;
    max-width: 600px;
}

.footer-disclaimer a {
    color: #2E5652;
    text-decoration: underline;
}

/* DOB Container - FIXED FOR DESKTOP with same height alignment */
.dob-container {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

/* Fixed widths for desktop DOB fields */
#dob_day {
    width: 80px !important;
    flex: none;
}

#dob_month {
    width: 140px !important;
    flex: none;
}

/* Year input group */
.year-input-group {
    flex: 2;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Ensure all DOB inputs have same height */
.dob-container .form-select,
.dob-container .form-input {
    height: 48px;
}

/* UPDATED: Year slider with corporate green gradient colors */
.year-slider {
    width: 100%;
    margin-top: 10px;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(to right, #E4EEF0 0%, #97D1CB 100%);
    outline: none;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.year-slider:hover {
    opacity: 1;
}

/* Slider thumb - webkit browsers */
.year-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2E5652 0%, #3a6b66 100%);
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(46, 86, 82, 0.3);
}

/* Slider thumb - Mozilla */
.year-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2E5652 0%, #3a6b66 100%);
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(46, 86, 82, 0.3);
    border: none;
}

/* Slider track - Mozilla */
.year-slider::-moz-range-track {
    width: 100%;
    height: 6px;
    cursor: pointer;
    background: linear-gradient(to right, #E4EEF0 0%, #97D1CB 100%);
    border-radius: 3px;
}

/* Slider tooltip */
.slider-tooltip {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: #2E5652;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
}

.slider-tooltip.show {
    opacity: 1;
}

/* Mobile DOB adjustments - full width */
@media (max-width: 600px) {
    .dob-container {
        flex-direction: column;
        gap: 15px;
    }

    #dob_day,
    #dob_month {
        width: 100% !important;
    }

    .year-input-group {
        width: 100%;
    }
}

/* OTP input */
.otp-input {
    font-size: 1.2rem;
    padding: 15px;
    text-align: center;
    font-family: 'Roboto', sans-serif;
}

/* Signature canvas */
#signature_canvas {
    width: 100%;
    height: 150px;
    border: 2px dashed #dee2e6;
    border-radius: 6px;
    cursor: crosshair;
    touch-action: none;
    background-color: #ffffff;
    display: block;
    box-shadow: inset 0 0 5px rgba(0,0,0,0.05);
}

/* Loading overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-overlay.show {
    display: flex;
}

.loading-content {
    text-align: center;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255,255,255,0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.loading-text {
    color: white;
    font-size: 1.25rem;
    font-weight: 500;
    font-family: 'Roboto', sans-serif;
}

/* Success modal */
.success-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
}

.success-modal-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.success-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 40px;
    border-radius: 10px;
    text-align: center;
    max-width: 500px;
    width: 90%;
}

.success-modal-content h2 {
    font-family: 'Roboto', Arial Black, sans-serif;
}

.success-modal-content p {
    font-family: 'Roboto', sans-serif;
}

.success-icon {
    font-size: 4rem;
    color: #2E5652;
    margin-bottom: 20px;
}

/* Terms modal */
.terms-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

@media (max-width: 768px) {
    .terms-modal-content {
        position: fixed;
        top: 20px;
        bottom: 20px;
        left: 10px;
        right: 10px;
        transform: none !important;
        width: auto !important;
        max-height: none !important;
        height: calc(100vh - 40px);
        display: flex;
        flex-direction: column;
    }

    .terms-body {
        flex: 1;
        min-height: 0;
        overflow-y: auto !important;
    }

    .terms-footer {
        position: relative !important;
        flex-shrink: 0;
        max-height: 200px;
        overflow: visible;
    }

    .scroll-indicator {
        display: block !important;
    }

    .scroll-indicator.hidden {
        display: none !important;
    }
}

.terms-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 10px;
    width: 90%;
    max-width: 700px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.terms-header {
    padding: 20px;
    border-bottom: 1px solid #dee2e6;
}

.terms-header h2 {
    font-family: 'Roboto', Arial Black, sans-serif;
    color: #1A1A47;
}

.terms-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    position: relative;
    font-family: 'Roboto', sans-serif;
}

.terms-footer {
    padding: 20px;
    border-top: 1px solid #dee2e6;
    font-family: 'Roboto', sans-serif;
}

/* Mobile optimizations for Terms Modal */
@media (max-width: 768px) {
    .terms-modal-content {
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        width: 92% !important;
        max-width: none !important;
        height: 85vh !important;
        max-height: 85vh !important;
        display: flex;
        flex-direction: column;
        margin: 0 !important;
    }

    .terms-body {
        flex: 1;
        min-height: 0;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    .terms-footer {
        position: relative !important;
        flex-shrink: 0;
        max-height: 200px;
        overflow: visible;
    }

    .terms-acceptance-area {
        padding: 15px;
    }

    .scroll-message {
        font-size: 0.85rem;
        padding: 8px 20px;
    }
}

/* Small screen adjustments */
@media (max-width: 480px) {
    .terms-modal-content {
        width: 95% !important;
        height: 90vh !important;
        max-height: 90vh !important;
    }

    .terms-content {
        padding: 15px;
    }

    .terms-header {
        padding: 15px;
    }

    .terms-header h2 {
        font-size: 1.3rem;
    }
}



/* Scroll indicator animations and visibility */
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(0.98); }
}

/* Ensure scroll indicator shows/hides properly */
.scroll-indicator {
    transition: opacity 0.3s ease;
}

.scroll-indicator.hidden {
    opacity: 0;
    pointer-events: none;
}

.scroll-indicator.show {
    opacity: 1;
}


/* Additional styles from original */
.form-row {
    display: flex;
    gap: 15px;
}

.form-row .form-group {
    flex: 1;
}

.info-message {
    background-color: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
    padding: 12px;
    border-radius: 5px;
    margin: 15px 0;
    font-family: 'Roboto', sans-serif;
}

.verification-card {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 20px;
    text-align: center;
}

.checkbox-container {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    margin: 15px 0;
}

.checkbox-container input[type="checkbox"] {
    margin-right: 10px;
    margin-top: 5px;
    cursor: pointer;
}

.checkbox-label {
    flex: 1;
    line-height: 1.6;
    color: #495057;
    font-family: 'Roboto', sans-serif;
}

.review-card {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.review-card h3 {
    font-family: 'Roboto', Arial Black, sans-serif;
    color: #1A1A47;
}

.review-item {
    display: flex;
    margin-bottom: 12px;
    padding-left: 20px; /* Add indentation */
    font-family: 'Roboto', sans-serif;
}

.review-label {
    font-weight: 600;
    color: #495057;
    min-width: 140px;
    margin-right: 10px;
}

.review-value {
    color: #212529;
    flex: 1;
    line-height: 1.6;
}

/* Add extra spacing before address items */
.review-item.address-item {
    margin-top: 20px; /* Extra space before addresses */
}


/* Lenders list - CONSTRAINED SIZING */
.lenders-list {
    margin: 20px 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

/* Single centered lender when only one */
.lenders-list.single-lender {
    grid-template-columns: 1fr;
    justify-items: center;
}

.lender-item,
.found-row {
    display: flex;
    align-items: center;
    padding: 15px;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    transition: all 0.3s;
}

.found-row {
    justify-content: space-between;
}

/* Manual lender row hover effect */
.found-row.manual-row:hover {
    background: #f8f9fa;
    border-color: #dc3545;
}

/* CONSTRAIN LOGO SIZE */
.lender-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 120px;
    max-height: 60px;
}

.lender-logo {
    max-width: 100px;
    max-height: 50px;
    object-fit: contain;
}

.no-logo {
    font-size: 0.9rem;
    font-weight: 600;
    color: #2E5652;
    text-align: center;
}

.lender-date {
    font-size: 0.875rem;
    color: #6c757d;
    margin-left: auto;
}

/* Final lenders summary */
#final_lenders_list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    margin: 20px 0;
}

.final-lenders-summary {
    margin-bottom: 30px;
}

.final-lenders-summary h3 {
    font-family: 'Roboto', Arial Black, sans-serif;
    color: #1A1A47;
}

.claim-type-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.signature-controls {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.signature-controls button {
    flex: 1;
}

/* Wider submit button with gap */
#final_submit_form {
    width: 60%;
    margin: 2rem auto 0;
    display: block;
}

@media (max-width: 768px) {
    #final_submit_form {
        width: 100%;
        margin-top: 2rem;
    }

    .signature-controls {
        margin-bottom: 1rem;
    }

    .lenders-list {
        grid-template-columns: 1fr;
    }

    #final_lenders_list {
        grid-template-columns: 1fr;
    }

    .button-row {
        flex-direction: column;
        gap: 10px;
    }

    .btn {
        width: 100%;
    }

    .title-button-group {
        grid-template-columns: 1fr;
    }

    .title-btn-other {
        grid-column: 1;
    }

    .footer-links {
        flex-direction: column;
        gap: 10px;
    }

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

    .review-item {
        padding-left: 10px; /* Less indentation on mobile */
    }

    .review-item.address-item {
        margin-top: 15px; /* Less extra space on mobile */
    }

}

/* Auto-Sign button special styling */
#auto_sign {
    background-color: #1A1A47;
    color: white;
    font-weight: bold;
}

#auto_sign:hover {
    background-color: #0f0f2b;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Step title styling */
.step-title {
    font-size: 1.75rem;
    font-family: 'Roboto', Arial Black, sans-serif;
    font-weight: 700;
    color: #1A1A47;
    margin-bottom: 0.5rem;
}

.step-subtitle {
    text-align: center;
    color: #6c757d;
    font-size: 1.125rem;
    margin-bottom: 2rem;
    font-family: 'Roboto', sans-serif;
}

/* FCA section headings */
.fca-claims-section h3 {
    font-family: 'Roboto', Arial Black, sans-serif;
    color: #1A1A47;
}

.fca-intro {
    font-family: 'Roboto', sans-serif;
}

/* All paragraph text */
p {
    font-family: 'Roboto', sans-serif;
}

/* Additional lenders section positioning */
#combined_lenders_display {
    margin-bottom: 2rem;
}

/* Position add more lenders button properly */
.step5-button-container {
    margin-top: 2rem;
}

/* Previous address styles */
.previous-address-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px dashed #dee2e6;
}

.address-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.address-header h3 {
    font-family: 'Roboto', Arial Black, sans-serif;
    color: #1A1A47;
    margin: 0;
}

.address-optional-tag {
    background: #97D1CB;
    color: #1A1A47;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.875rem;
    font-weight: 600;
}

/* Consent section styles */
.consent-options {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    padding: 25px;
    margin: 20px 0;
}

.consent-group {
    margin-bottom: 25px;
}

.consent-group h4 {
    font-family: 'Roboto', Arial Black, sans-serif;
    color: #1A1A47;
    margin-bottom: 10px;
}

.consent-group p {
    color: #6c757d;
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.consent-checkbox-item {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    margin-top: 10px;
}

.consent-checkbox-item strong {
    color: #1A1A47;
}

/* Info icon style fix */
.info-icon {
    background: #d1ecf1;
    color: #0c5460;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    font-style: normal;
    font-family: Arial, sans-serif;
    flex-shrink: 0;
}

.info-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background-color: #d1ecf1;
    border: 1px solid #bee5eb;
    padding: 12px;
    border-radius: 5px;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    body {
        font-size: 1.3rem;
    }

    .form-label {
        font-size: 1.1rem;
    }

    .form-input, .form-select {
        font-size: 1.2rem;
        padding: 0.75rem 0.875rem;
    }

    .welcome-title {
        font-size: 1.8rem;
    }

    .step-title {
        font-size: 1.5rem;
    }

    .section-heading {
        font-size: 1.5rem;
    }
}

/* Modal Improvements */
.lenders-modal .modal-header {
    background: linear-gradient(135deg, #1A1A47 0%, #2E5652 100%);
    border-bottom: 3px solid #97D1CB;
    padding: 20px 25px;
    border-radius: 10px 10px 0 0;
}

.lenders-modal .modal-header h3 {
    color: white;
    font-family: 'Roboto', Arial Black, sans-serif;
    font-size: 1.5rem;
    margin: 0;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.lenders-modal .modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 20px 25px;
    position: sticky;
    bottom: 0;
    background: linear-gradient(90deg, #1A1A47 0%, #2E5652 100%);
    border-top: 3px solid #97D1CB;
    border-radius: 0 0 10px 10px; /* Rounded bottom corners */
    box-shadow: 0 -4px 12px rgba(0,0,0,0.1);
    z-index: 10;
}

.lenders-modal .modal-footer .modal-cancel {
    flex: 0 0 auto;
    min-width: 140px;
    background: rgba(255, 255, 255, 0.9);
    color: #1A1A47;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.lenders-modal .modal-footer .modal-cancel:hover {
    background: white;
    transform: translateY(-2px);
}

.lenders-modal .modal-footer .modal-save {
    flex: 0 0 auto;
    min-width: 140px;
    margin-left: auto;
    background: rgba(255, 255, 255, 0.95);
    color: #1A1A47;
    font-weight: 600;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.lenders-modal .modal-footer .modal-save:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

@media (max-width: 768px) {
    .lenders-modal .modal-footer {
        flex-direction: column;
        gap: 10px;
    }

    .lenders-modal .modal-footer .modal-cancel,
    .lenders-modal .modal-footer .modal-save {
        width: 100%;
        margin: 0;
    }
}

#choice_reason {
    white-space: normal;
    text-overflow: clip;
    padding-right: 30px; /* Space for dropdown arrow */
}

@media (max-width: 768px) {
    #choice_reason {
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .terms-modal-content {
        width: 95% !important;
        max-width: none !important;
        margin: 0 2.5%;
        left: 0 !important;
        right: 0 !important;
        transform: translateY(-50%) !important;
    }
}


/* ========================================
STEP 6 - FOUR SECTION STYLING
======================================== */

/* Section Card Styling - Ensures visual distinction */
#step6 .form-section {
    margin: 40px 0;
    padding: 24px;
    border-top: 3px solid #1A1A47;
    background-color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    transition: all 0.3s ease;
}

#step6 .form-section:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

/* Step Title Styling */
#step6 .step-title {
    font-family: 'Roboto', Arial Black, sans-serif;
    font-size: 1.8rem;
    color: #1A1A47;
    margin-bottom: 10px;
    font-weight: 700;
}

#step6 .step-subtitle {
    font-family: 'Roboto', sans-serif;
    font-size: 1rem;
    color: #6c757d;
    margin-bottom: 20px;
}

/* Section-specific color accents */
#section1_review {
    border-top-color: #2E5652;
}

#section2_consents {
    border-top-color: #1A1A47;
}

#section3_terms {
    border-top-color: #97D1CB;
}

#section4_appointing {
    border-top-color: #28a745;
    background: linear-gradient(to bottom, #ffffff 0%, #f8fff8 100%);
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
    #step6 .form-section {
        margin: 20px 0;
        padding: 16px;
        border-radius: 8px;
    }

    #step6 .step-title {
        font-size: 1.4rem;
    }

    #step6 .step-subtitle {
        font-size: 0.9rem;
    }
}

/* Progressive Disclosure Animation */
#step6 .form-section[style*="display: block"] {
    animation: slideDown 0.4s ease-out;
}

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

/* Add scroll margin to all sections that get scrolled to */
.form-section h2,
.form-section h3,
.form-section h4,
.section-box,
#section2_existing_rep,
#section3_claim_types,
#section4_terms {
    scroll-margin-top: 30px; /* Adjust this value to show more/less frame */
}

/* Mobile specific - more margin for smaller screens */
@media (max-width: 768px) {
    .form-section h2,
    .form-section h3,
    .form-section h4,
    .section-box,
    #section2_existing_rep,
    #section3_claim_types,
    #section4_terms {
        scroll-margin-top: 40px; /* More margin on mobile */
    }
}

/* Hide middle name field on mobile */
@media (max-width: 768px) {
    #middle_name,
    label[for="middle_name"] {
        display: none !important;
    }

    /* Hide the entire form group containing middle name */
    .form-group:has(#middle_name) {
        display: none !important;
    }
}


/* ========================================
TERMS MODAL FIXES
======================================== */

/* Remove sticky positioning from modal footer area */
.terms-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 10px;
    width: 90%;
    max-width: 700px;
    max-height: 85vh; /* Increased from 80vh for better space */
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

/* Terms body - scrollable container */
.terms-body {
    flex: 1;
    overflow-y: auto;
    padding: 0; /* Remove padding to allow full-width acceptance area */
    position: relative;
    min-height: 0; /* Important for Firefox */
}

/* Terms content area */
.terms-content {
    padding: 20px;
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    font-size: 0.6em;
}

/* Acceptance area at bottom of scroll */
.terms-acceptance-area {
    margin-top: 40px;
    padding: 20px;
    background: linear-gradient(to bottom, #f8f9fa, #ffffff);
    border-top: 2px solid #dee2e6;
    border-radius: 0 0 8px 8px;
}

/* Scroll indicator styling */
.scroll-indicator {
    text-align: center;
    margin-bottom: 15px;
    transition: opacity 0.3s ease;
    opacity: 0;
}

.scroll-indicator.show {
    opacity: 1;
}

.scroll-message {
    background: linear-gradient(135deg, #1A1A47 0%, #2E5652 100%);
    color: white;
    display: inline-block;
    padding: 10px 24px;
    border-radius: 25px;
    font-size: 0.95rem;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(26, 26, 71, 0.3);
}

/* Pulse animation for scroll indicator */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(26, 26, 71, 0.3);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 6px 16px rgba(26, 26, 71, 0.4);
    }
}

.scroll-message {
    animation: pulse 2s infinite;
}

/* Checkbox wrapper states */
.terms-checkbox-wrapper {
    padding: 15px;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.terms-checkbox-wrapper.disabled {
    opacity: 0.6;
    background: #f8f9fa;
}

.terms-checkbox-wrapper:not(.disabled) {
    background: white;
    border-color: #1A1A47;
    box-shadow: 0 2px 8px rgba(26, 26, 71, 0.1);
}

/* Mobile optimizations for Terms Modal */
@media (max-width: 768px) {
    .terms-modal-content {
        width: 95%;
        max-width: none;
        height: 90vh;
        max-height: 90vh;
        top: 5vh;
        transform: translateX(-50%);
    }

    .terms-acceptance-area {
        padding: 15px;
    }

    .scroll-message {
        font-size: 0.85rem;
        padding: 8px 20px;
    }
}


@media (max-width: 480px) {
    .terms-modal-content {
        width: 95% !important;
        height: 90vh !important;
        max-height: 90vh !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
    }

    .terms-content {
        padding: 15px;
    }

    .terms-header {
        padding: 15px;
    }

    .terms-header h2 {
        font-size: 1.3rem;
    }
}

/* ========================================
CONSENT SECTION IMPROVEMENTS
======================================== */

/* Consent section cards */
.consent-section {
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #1A1A47;
    transition: all 0.3s ease;
}

.consent-section:hover {
    background: #f0f4f8;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Styled consent section (FCA choice) */
.consent-section-styled {
    position: relative;
    overflow: hidden;
}

.consent-section-styled::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #1A1A47 0%, #2E5652 50%, #97D1CB 100%);
}

/* Form controls styling */
.form-checkbox-label,
.form-radio-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    padding: 10px;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.form-checkbox-label:hover,
.form-radio-label:hover {
    background-color: rgba(26, 26, 71, 0.05);
}

.form-checkbox-label input[type="checkbox"],
.form-radio-label input[type="radio"] {
    margin-right: 12px;
    margin-top: 4px;
    cursor: pointer;
}

/* Dropdown styling */
.dropdown-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 200px;
    overflow-y: auto;
    background: white;
    border: 1px solid #dee2e6;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.dropdown-list .dropdown-item {
    padding: 10px 15px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
}

.dropdown-list .dropdown-item:hover {
    background-color: #f8f9fa;
}

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

/* Selected representatives badges */
.rep-badge {
    display: inline-block;
    padding: 6px 12px;
    margin: 4px;
    background: linear-gradient(135deg, #1A1A47 0%, #2E5652 100%);
    color: white;
    border-radius: 20px;
    font-size: 0.9rem;
}

.rep-badge .remove-btn {
    margin-left: 8px;
    cursor: pointer;
    font-weight: bold;
}

/* ========================================
SIGNATURE SECTION STYLING
======================================== */

.signature-section {
    margin-top: 30px;
    padding: 20px;
    background: white;
    border: 2px solid #dee2e6;
    border-radius: 8px;
}

.signature-label {
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    display: block;
}

.signature-box {
    position: relative;
}

#signature_canvas {
    width: 100%;
    height: 150px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    background: white;
    cursor: crosshair;
    touch-action: none; /* Important for mobile */
}

.signature-hint {
    font-size: 0.9rem;
    color: #6c757d;
    margin: 0.5rem 0;
    text-align: center;
}

.signature-controls {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 10px;
}

/* ========================================
FINAL SUBMIT BUTTON
======================================== */

.final-submit-container {
    margin-top: 30px;
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 8px;
}

#final_submit_form {
    padding: 15px 40px;
    font-size: 18px;
    background: linear-gradient(135deg, #1A1A47 0%, #2E5652 100%);
    border: none;
    color: white;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(26, 26, 71, 0.3);
}

#final_submit_form:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 26, 71, 0.4);
}

#final_submit_form:disabled {
    background: #6c757d;
    opacity: 0.6;
    cursor: not-allowed;
}

/* Success state for submit button */
#final_submit_form.success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

/* Fee Table Styling */
.fee-info table {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
}

.fee-info table thead tr {
    background: linear-gradient(135deg, #1A1A47 0%, #2E5652 100%);
    color: white;
}

.fee-info table thead th {
    font-weight: 600;
    border-right: 1px solid rgba(255,255,255,0.2);
}

.fee-info table tbody tr:nth-child(odd) {
    background: #ffffff;
}

.fee-info table tbody tr:nth-child(even) {
    background: #f8f9fa;
}

.fee-info table tbody tr:hover {
    background: #e8f4f8;
}

/* Mobile T&C Modal Width Fix */
@media (max-width: 768px) {
    .terms-modal-content {
        width: 95% !important;
        max-width: none !important;
        margin: 0 2.5%;
        left: 0 !important;
        right: 0 !important;
        transform: translateY(-50%) !important;
    }
}

/* Pulse animation for submit button */
@keyframes pulseGlow {
    0% {
        box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
        transform: scale(1.05);
    }
    50% {
        box-shadow: 0 6px 25px rgba(255, 215, 0, 0.7);
        transform: scale(1.08);
    }
    100% {
        box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
        transform: scale(1.05);
    }
}

.pulse-highlight {
    animation: pulseGlow 1.5s ease-in-out infinite;
    position: relative;
}

/* Arrow pointing to submit button on mobile */
@media (max-width: 768px) {
    .final-submit-container::before {
        content: "👇";
        display: block;
        font-size: 30px;
        animation: bounce 1s ease-in-out infinite;
        margin-bottom: 10px;
    }
}

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

/* Enhanced mobile visibility */
@media (max-width: 768px) {
    #final_submit_form {
        width: 90%;
        font-size: 20px !important;
        padding: 18px 30px !important;
    }
}


/* Yellow pulse style for all forward navigation buttons */
.btn-forward {
    background: linear-gradient(135deg, #FFD700, #FFA500) !important;
    border: none !important;
    color: #1A1A47 !important;
    font-weight: bold !important;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4) !important;
    transform: scale(1.02);
    animation: pulseGlow 1.5s ease-in-out infinite;
}

.btn-forward:hover {
    background: linear-gradient(135deg, #FFA500, #FFD700) !important;
    transform: scale(1.05);
}

.btn-forward:disabled {
    background: linear-gradient(135deg, #D3D3D3, #A9A9A9) !important;
    animation: none !important;
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

@keyframes pulseGlow {
    0% {
        box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
        transform: scale(1.02);
    }
    50% {
        box-shadow: 0 6px 25px rgba(255, 215, 0, 0.7);
        transform: scale(1.04);
    }
    100% {
        box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
        transform: scale(1.02);
    }
}


/* ============================================================================
CATEGORY DISPLAY - Perfect Alignment
============================================================================ */

/* Container */
#combined_lenders_list {
    display: flex !important;
    flex-direction: column;
    gap: 2rem;
    margin-top: 2rem;
    width: 100%;
}

/* Category Sections */
#combined_lenders_list .category-section {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    background: white;
}

#combined_lenders_list .category-section:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* Category Colors */
#combined_lenders_list .category-proceeding {
    border: 3px solid #2E5652;
    background: linear-gradient(135deg, #f0f9f7 0%, #ffffff 100%);
}

#combined_lenders_list .category-proceeding .category-title {
    background: linear-gradient(135deg, #2E5652 0%, #3a6b66 100%);
    color: white;
}

#combined_lenders_list .category-outside-range {
    border: 3px solid #ffc107;
    background: linear-gradient(135deg, #fffbf0 0%, #ffffff 100%);
}

#combined_lenders_list .category-outside-range .category-title {
    background: linear-gradient(135deg, #ffc107 0%, #ffca2c 100%);
    color: #333;
    font-weight: 700;
}

#combined_lenders_list .category-not-proceeding {
    border: 3px solid #6c757d;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

#combined_lenders_list .category-not-proceeding .category-title {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    color: white;
}

/* Category Title */
#combined_lenders_list .category-title {
    margin: 0;
    padding: 1.5rem 2rem;
    font-size: 1.3rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 1rem;
}

#combined_lenders_list .category-icon {
    font-size: 1.8rem;
}

/* Category Description */
#combined_lenders_list .category-description {
    padding: 1.25rem 2rem;
    margin: 0;
    font-size: 1rem;
    line-height: 1.6;
    color: #495057;
    background: rgba(255, 255, 255, 0.9);
    border-bottom: 2px solid rgba(0, 0, 0, 0.05);
}

#combined_lenders_list .category-proceeding .category-description {
    background: linear-gradient(135deg, rgba(240, 249, 247, 0.8) 0%, rgba(255, 255, 255, 0.9) 100%);
    color: #2E5652;
    font-weight: 500;
}

#combined_lenders_list .category-outside-range .category-description {
    background: linear-gradient(135deg, rgba(255, 251, 240, 0.8) 0%, rgba(255, 255, 255, 0.9) 100%);
    color: #856404;
    font-weight: 500;
}

#combined_lenders_list .category-not-proceeding .category-description {
    background: linear-gradient(135deg, rgba(248, 249, 250, 0.8) 0%, rgba(255, 255, 255, 0.9) 100%);
    color: #495057;
}

/* Lenders List - DESKTOP: 2 columns */
#combined_lenders_list .category-lenders-list {
    padding: 2rem;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

/* Lender Item */
#combined_lenders_list .lender-item {
    padding: 1.5rem;
    border-radius: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    background: white;
    min-height: 120px;
    display: flex;
    align-items: center;
}

#combined_lenders_list .category-proceeding .lender-item {
    border-left: 5px solid #2E5652;
}

#combined_lenders_list .category-proceeding .lender-item:hover {
    background: linear-gradient(135deg, #f0f9f7 0%, #ffffff 100%);
    transform: translateX(8px);
}

#combined_lenders_list .category-outside-range .lender-item {
    border-left: 5px solid #ffc107;
}

#combined_lenders_list .category-not-proceeding .lender-item {
    border-left: 5px solid #6c757d;
}

/* DESKTOP: Lender Content - Column Layout */
#combined_lenders_list .lender-content {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 1.5rem;
    align-items: center;
    width: 100%;
}

/* Icon Container - DESKTOP: Fixed column */
#combined_lenders_list .lender-icon-container {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    border: 2px solid #E4EEF0;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

#combined_lenders_list .lender-item:hover .lender-icon-container {
    border-color: #97D1CB;
    box-shadow: 0 4px 12px rgba(46, 86, 82, 0.15);
    transform: scale(1.05);
}

#combined_lenders_list .lender-icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
}

#combined_lenders_list .lender-icon-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #212045 0%, #2E5652 100%);
    color: white;
    font-weight: 700;
    font-size: 1.4rem;
}

/* DESKTOP: Lender Details - Name & Date in columns */
#combined_lenders_list .lender-details {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    min-height: 70px;
    gap: 0.5rem;
}

/* DESKTOP: Lender Name - 60% size, 2-row space, vertically centered */
#combined_lenders_list .lender-name {
    font-weight: 700;
    font-size: 0.95rem; /* 60% of original 1.2rem = ~0.72rem, increased slightly for readability */
    color: #212045;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.6rem; /* Ensures 2 rows of space */
    display: flex;
    align-items: center;
}

/* DESKTOP: Date Container - Aligned in column */
#combined_lenders_list .lender-date-container {
    display: flex;
    justify-content: flex-start;
    width: 100%;
}

/* Date Tokens */
#combined_lenders_list .lender-date {
    font-size: 0.85rem;
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, #E4EEF0 0%, #d0dee1 100%);
    color: #2E5652;
    border: 2px solid #97D1CB;
    box-shadow: 0 2px 6px rgba(151, 209, 203, 0.2);
    white-space: nowrap;
}

#combined_lenders_list .lender-date-warning {
    font-size: 0.85rem;
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, #fff3cd 0%, #ffe69c 100%);
    color: #856404;
    border: 2px solid #ffc107;
    box-shadow: 0 2px 6px rgba(255, 193, 7, 0.3);
    white-space: nowrap;
}

/* ============================================================================
MOBILE RESPONSIVE
============================================================================ */

/* Tablet - Still 2 columns */
@media (max-width: 1024px) and (min-width: 769px) {
    #combined_lenders_list .category-lenders-list {
        grid-template-columns: repeat(2, 1fr);
    }

    #combined_lenders_list .lender-name {
        font-size: 0.9rem;
    }
}

/* MOBILE: Single column, left-aligned icons */
@media (max-width: 768px) {
    #combined_lenders_list {
        gap: 1.5rem;
    }

    /* Single column */
    #combined_lenders_list .category-lenders-list {
        grid-template-columns: 1fr !important;
        padding: 1.5rem;
        gap: 1rem;
    }

    #combined_lenders_list .category-title {
        font-size: 1.15rem;
        padding: 1.25rem 1.5rem;
    }

    #combined_lenders_list .category-description {
        font-size: 0.95rem;
        padding: 1rem 1.5rem;
    }

    #combined_lenders_list .lender-item {
        padding: 1rem;
        min-height: 100px;
    }

    /* MOBILE: Icon in left column */
    #combined_lenders_list .lender-content {
        grid-template-columns: 65px 1fr;
        gap: 1rem;
    }

    #combined_lenders_list .lender-icon-container {
        width: 60px;
        height: 60px;
    }

    #combined_lenders_list .lender-icon-fallback {
        font-size: 1.2rem;
    }

    /* MOBILE: Details column */
    #combined_lenders_list .lender-details {
        min-height: 60px;
        gap: 0.4rem;
    }

    #combined_lenders_list .lender-name {
        font-size: 0.95rem;
        min-height: 2.4rem;
    }

    #combined_lenders_list .lender-date,
    #combined_lenders_list .lender-date-warning {
        font-size: 0.8rem;
        padding: 0.35rem 0.75rem;
    }
}

/* Small Mobile */
@media (max-width: 600px) {
    #combined_lenders_list .lender-content {
        grid-template-columns: 60px 1fr;
        gap: 0.875rem;
    }

    #combined_lenders_list .lender-icon-container {
        width: 55px;
        height: 55px;
    }

    #combined_lenders_list .lender-name {
        font-size: 0.9rem;
    }
}

/* ============================================================================
REVIEW SCREEN FIX (Image 2) - Step 2 Review
============================================================================ */

/* Review Card - Better layout */
.review-card {
    max-width: 100%;
    overflow-x: hidden;
}

.review-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem 0;
    border-bottom: 1px solid #e0e0e0;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

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

.review-label {
    font-weight: 700;
    color: #212045;
    font-size: 1.1rem;
    display: block;
    width: 100%;
}

.review-value {
    color: #495057;
    font-size: 1rem;
    display: block;
    width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    max-width: 100%;
}

/* Ensure review screen content doesn't overflow */
@media (max-width: 600px) {
    .review-card {
        padding: 1.5rem 1rem;
    }

    .review-item {
        padding: 0.75rem 0;
    }

    .review-label {
        font-size: 1rem;
        margin-bottom: 0.25rem;
    }

    .review-value {
        font-size: 0.95rem;
        line-height: 1.5;
    }
}

/* Print Styles */
@media print {
    #combined_lenders_list .category-section {
        page-break-inside: avoid;
        box-shadow: none;
        border: 2px solid #ccc;
    }

    #combined_lenders_list .lender-item {
        page-break-inside: avoid;
    }
}

/* FCA Options Table Styles */
.fca-options-section {
    animation: fadeIn 0.5s ease-in;
}

.options-comparison-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
}

.options-comparison-table th {
    font-family: 'Roboto', Arial Black, sans-serif !important;
}

/* Desktop column widths */
.options-comparison-table th,
.options-comparison-table td {
    padding: 10px 8px;
    border: 1px solid #dee2e6;
    vertical-align: top;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.options-comparison-table th:nth-child(1),
.options-comparison-table td:nth-child(1) { width: 15%; }

.options-comparison-table th:nth-child(2),
.options-comparison-table td:nth-child(2) { width: 10%; }

.options-comparison-table th:nth-child(3),
.options-comparison-table td:nth-child(3) { width: 18%; }

.options-comparison-table th:nth-child(4),
.options-comparison-table td:nth-child(4) { width: 57%; }

.options-comparison-table ul li {
    margin-bottom: 4px;
}

.fca-choice-consent {
    transition: all 0.3s ease;
}

.fca-choice-consent:hover {
    box-shadow: 0 4px 12px rgba(151, 209, 203, 0.3);
}

#choice_reason_wrapper,
#other_reason_wrapper,
#claim_type_consents,
#terms_signature_section {
    animation: slideDown 0.5s ease-out;
}

.options-table-container {
    width: 100%;
    overflow: visible !important;
}

/* Fix intro text size on mobile */
.fca-intro-text {
    font-size: 1rem;
    line-height: 1.5;
}

/* MOBILE - Fixed column widths matching "Who Does Work" */
@media (max-width: 768px) {
    .options-table-container {
        overflow: visible !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .options-comparison-table {
        width: 100% !important;
        max-width: 100% !important;
        table-layout: fixed !important;
        font-size: 0.65rem !important;
    }

    /* FORCE equal widths for first 3 columns on mobile */
    .options-comparison-table th:nth-child(1),
    .options-comparison-table td:nth-child(1),
    .options-comparison-table th:nth-child(2),
    .options-comparison-table td:nth-child(2),
    .options-comparison-table th:nth-child(3),
    .options-comparison-table td:nth-child(3) {
        width: 18% !important; /* All three columns same width */
        font-size: 0.6rem !important;
        padding: 5px 2px !important;
        white-space: normal !important;
        word-break: break-word !important;
    }

    /* Description column gets remaining space */
    .options-comparison-table th:nth-child(4),
    .options-comparison-table td:nth-child(4) {
        width: 46% !important;
        font-size: 0.58rem !important;
        padding: 5px 3px !important;
    }

    .fca-intro-text {
        font-size: 0.8rem !important;
        line-height: 1.4 !important;
    }
}

@media (max-width: 480px) {
    .options-comparison-table {
        font-size: 0.55rem !important;
    }

    .options-comparison-table th:nth-child(1),
    .options-comparison-table td:nth-child(1),
    .options-comparison-table th:nth-child(2),
    .options-comparison-table td:nth-child(2),
    .options-comparison-table th:nth-child(3),
    .options-comparison-table td:nth-child(3) {
        font-size: 0.5rem !important;
        padding: 4px 2px !important;
    }

    .options-comparison-table th:nth-child(4),
    .options-comparison-table td:nth-child(4) {
        font-size: 0.48rem !important;
    }
}


/* Radio button styling */
.radio-container:hover {
    border-color: #0066cc !important;
    box-shadow: 0 2px 8px rgba(0,102,204,0.2);
}

.radio-container input[type="radio"]:checked + span strong {
    color: #0066cc;
}

/* Professional representatives dropdown item styling */
.rep-dropdown-item {
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background 0.2s ease;
}

.rep-dropdown-item:hover {
    background: #f0f8ff;
}

.rep-dropdown-item.selected {
    background: #e6f3ff;
}

.rep-dropdown-item .checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #dee2e6;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
}

.rep-dropdown-item.selected .checkmark {
    background: #0066cc;
    border-color: #0066cc;
}

.rep-dropdown-item.selected .checkmark::after {
    content: '✓';
    color: white;
    font-size: 14px;
}

/* Selected firm chip styling */
.selected-firm-chip {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    background: #0066cc;
    color: white;
    border-radius: 20px;
    font-size: 14px;
}

.selected-firm-chip .remove-btn {
    margin-left: 8px;
    cursor: pointer;
    font-weight: bold;
}

.selected-firm-chip .remove-btn:hover {
    color: #ffcccc;
}

/* Scrollable list container */
.rep-list-container {
    border: 2px solid #dee2e6;
    border-radius: 8px;
    max-height: 280px; /* ~7 items at 40px each */
    overflow-y: auto;
    background: white;
}

/* Individual list items */
.rep-list-item {
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background-color 0.2s;
    min-height: 40px;
}

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

.rep-list-item:hover {
    background: #f0f8ff;
}

.rep-list-item.hidden {
    display: none;
}

/* Token styles */
.rep-token {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background: #0066cc;
    color: white;
    border-radius: 20px;
    font-size: 14px;
    margin: 4px;
    white-space: nowrap;
    max-width: calc(100% - 8px);
}

.rep-token .token-text {
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 8px;
}

.rep-token .remove-token {
    cursor: pointer;
    font-weight: bold;
    font-size: 18px;
    line-height: 1;
    margin-left: 8px;
    padding: 0 4px;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.rep-token .remove-token:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .rep-list-container {
        max-height: 240px; /* Slightly shorter on mobile */
    }

    .rep-token {
        font-size: 12px;
        padding: 5px 10px;
        margin: 3px;
    }
}

/* Empty state message */
.rep-empty-message {
    padding: 20px;
    text-align: center;
    color: #666;
    font-style: italic;
}

/* Smooth scroll animation */
.consent-section {
    animation: fadeInSlide 0.5s ease-out;
}

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

#rep_search_input {
    width: calc(100% - 20px);
    max-width: 100%;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .rep-dropdown {
        width: calc(100% - 10px);
        margin: 0 5px;
    }
}

/* container establishes positioning */
#rep_dropdown_container { position: relative; }

/* the list is absolutely positioned BELOW the input */
#rep_dropdown_list {
    position: absolute;
    top: 100%;         /* ↓ opens downward */
    left: 0; right: 0;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,.15);
    max-height: 250px;
    overflow-y: auto;
    z-index: 9999;
    margin-top: 5px;
    display: none;
}

/* ensure the section doesn’t clip the dropdown */
#professional_reps_section { position: relative; overflow: visible !important; }

/* Style for dropdown items to ensure they're visible */
.rep-dropdown-item {
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
}

.rep-dropdown-item:hover {
    background: #f0f8ff;
}

.rep-dropdown-item.selected {
    background: #e6f3ff;
}

#cmc_detected_modal .modal {
    padding: 20px;
}

#cmc_detected_modal .modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    max-width: 90%;  /* Better for mobile */
    max-height: 90vh;  /* Prevent overflow on mobile */
    overflow-y: auto;
}

#cmc_detected_modal .modal-options label {
    cursor: pointer;
    transition: background-color 0.3s;
    font-size: 14px;  /* Readable on mobile */
}

/* Mobile specific styles */
@media (max-width: 768px) {
    #cmc_detected_modal .modal-content {
        margin: 2% auto;
        padding: 15px;
        max-width: 95%;
    }

    #cmc_detected_modal h2 {
        font-size: 1.2em;
    }

    #cmc_detected_modal p {
        font-size: 14px;
        line-height: 1.4;
    }

    #cmc_detected_modal .modal-options label {
        font-size: 13px;
        padding: 12px;
    }
}

/* Hide step0 immediately if landing page is disabled - prevents flash */
body.no-landing #step0 {
    display: none !important;
    visibility: hidden !important;
}

body.no-landing #step1 {
    display: block;
    visibility: visible;
}

@media (max-width: 768px) {
    body.no-landing #main_progress_bar {
        display: flex !important;
    }
}