/* ========================================
   ELITE ATHLETE SURVEY - STANDALONE STYLES
   ======================================== */

/* CSS Variables - Survey Specific */
:root {
    /* Color Palette */
    --background-gradient-start: #0A0A0A;
    --background-gradient-end: #121212;
    --primary-accent: #00E5FF; /* Electric Cyan */
    --secondary-accent: #00FF7F; /* Success Green */
    --text-primary: #FFFFFF;
    --text-secondary: #A0A0A0;
    --card-bg: rgba(25, 25, 25, 0.6);
    --input-bg: rgba(30, 30, 30, 0.8);
    --glow-primary: rgba(0, 229, 255, 0.4);
    --glow-secondary: rgba(0, 255, 127, 0.3);
    --video-overlay: rgba(0, 0, 0, 0.7);
    
    /* Layout Variables - Responsive */
    --header-height: clamp(80px, 12vh, 120px); /* Restored original header height */
    --content-max-width: min(500px, 90%); /* Match popup form width */
    --form-padding: clamp(1rem, 4vw, 2rem);
    --button-height: clamp(40px, 6vw, 48px); /* Reduced from clamp(48px, 8vw, 56px) */
    --progress-height: clamp(6px, 1vw, 8px);
    --section-gap: clamp(1rem, 3vw, 1.5rem);
    --form-gap: clamp(1.5rem, 3vw, 2rem); /* Increased space between questions */
}

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

html {
    font-size: clamp(14px, 2.5vw, 16px);
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    width: 100%;
    overflow-x: hidden;
    background-color: var(--background-gradient-start);
    position: relative;
}

/* Video Background */
.video-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    overflow: hidden;
}

#background-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--video-overlay);
    z-index: -1;
}

/* Main Layout Container */
.survey-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

/* Header Section */
.survey-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 clamp(1rem, 4vw, 2rem);
    flex-shrink: 0;
}

.logo {
    display: block;
}

.logo img {
    height: clamp(28px, 5vw, 45px); /* reduced further */
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

/* Main Content Area */
.survey-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 clamp(0.5rem, 2vw, 1rem) clamp(1.5rem, 4vw, 2rem) clamp(0.5rem, 2vw, 1rem); /* Removed negative margin */
    max-width: 100%;
}

/* Tagline */
.survey-tagline {
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
    letter-spacing: -0.02em;
    font-size: clamp(1.1rem, 3.5vw, 1.4rem);
    color: var(--text-primary);
    text-align: center;
    margin: clamp(-70px, -8vh, -35px) auto clamp(1.5rem, 4vw, 2rem) auto; /* Increased negative top margin from clamp(-50px, -6vh, -25px) */
    max-width: min(600px, 95%);
    line-height: 1.4;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
}

/* Survey Container */
.survey-container {
    width: 100%;
    max-width: var(--content-max-width); /* Now matches popup form */
    margin: 0 auto;
}

/* Form Steps */
.form-step {
    display: none;
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.3s ease;
}

.form-step.active {
    display: block;
    opacity: 1;
    transform: translateX(0);
}

/* Form Section Styling - Now includes navigation */
.form-section {
    background: var(--card-bg);
    backdrop-filter: blur(15px);
    border-radius: clamp(12px, 2vw, 16px);
    padding: var(--form-padding);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    margin-bottom: var(--section-gap);
    display: flex;
    flex-direction: column;
}

/* Form Content Area */
.form-content {
    flex: 1;
    margin-bottom: clamp(0.05rem, 0.25vw, 0.15rem); /* Further reduced space above Next button */
}

.section-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    letter-spacing: -0.02em;
    font-size: clamp(1.3rem, 4vw, 1.6rem);
    background: linear-gradient(135deg, var(--primary-accent), var(--secondary-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: clamp(0.5rem, 1.5vw, 0.75rem);
    padding-bottom: 0;
    border-bottom: none;
    text-align: left;
    display: inline-block;
    width: auto;
}

/* Progress Bar - Now positioned after section title */
.section-progress {
    width: 100%;
    height: var(--progress-height);
    background: rgba(255, 255, 255, 0.15);
    border-radius: clamp(3px, 0.8vw, 4px);
    overflow: hidden;
    position: relative;
    margin-bottom: var(--form-gap);
}

.section-progress .progress-fill {
    height: 100%;
    background: linear-gradient(135deg, var(--primary-accent), var(--secondary-accent));
    border-radius: clamp(3px, 0.8vw, 4px);
    transition: width 0.5s ease;
    width: 16.67%;
    position: relative;
}

/* Form Groups */
.form-group {
    margin-bottom: clamp(1.5rem, 4vw, 2rem); /* Increased gap between questions */
    width: 100%;
}

.form-group label {
    display: block;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: clamp(1.14rem, 2.5vw, 1.2rem);
    color: var(--text-primary);
    margin-bottom: 0.25rem; /* Further reduced gap between question and options */
    line-height: 1.4;
}

/* Override gradient for checkbox and radio button labels - keep them white */
.checkbox-label:not(.cori-advantage-text),
.checkbox-label span:not(.checkmark):not(.cori-advantage-text) {
    background: none !important;
    -webkit-background-clip: unset !important;
    -webkit-text-fill-color: unset !important;
    background-clip: unset !important;
    color: var(--text-primary) !important;
}

/* Input Styling */
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: clamp(0.875rem, 2.5vw, 1rem) clamp(1rem, 3vw, 1.25rem);
    background: var(--input-bg);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: clamp(10px, 2vw, 12px);
    color: var(--text-primary);
    font-family: 'Poppins', sans-serif;
    font-size: clamp(0.95rem, 2.5vw, 1rem);
    transition: all 0.3s ease;
    outline: none;
}

/* Special styling for access code input */
#access-code {
    text-align: center !important;
    font-size: clamp(1.2rem, 3vw, 1.5rem) !important;
    letter-spacing: 0.5rem !important;
    font-weight: 600 !important;
    background: rgba(0, 229, 255, 0.05) !important;
    border: 2px solid rgba(0, 229, 255, 0.3) !important;
    padding: clamp(1rem, 3vw, 1.25rem) !important;
}

#access-code:focus {
    border-color: var(--primary-accent) !important;
    box-shadow: 0 0 0 clamp(4px, 1vw, 6px) rgba(0, 229, 255, 0.2) !important;
    background: rgba(0, 229, 255, 0.1) !important;
}

#access-code.error {
    border-color: #ff4444 !important;
    background: rgba(255, 68, 68, 0.1) !important;
    box-shadow: 0 0 0 clamp(4px, 1vw, 6px) rgba(255, 68, 68, 0.15) !important;
}

/* Special styling for CAP number input */
#cap-number {
    text-align: center !important;
    font-size: clamp(1.2rem, 3vw, 1.5rem) !important;
    letter-spacing: 0.5rem !important;
    font-weight: 600 !important;
    background: rgba(0, 229, 255, 0.05) !important;
    border: 2px solid rgba(0, 229, 255, 0.3) !important;
    padding: clamp(1rem, 3vw, 1.25rem) !important;
}

#cap-number:focus {
    border-color: var(--primary-accent) !important;
    box-shadow: 0 0 0 clamp(4px, 1vw, 6px) rgba(0, 229, 255, 0.2) !important;
    background: rgba(0, 229, 255, 0.1) !important;
}

#cap-number.error {
    border-color: #ff4444 !important;
    background: rgba(255, 68, 68, 0.1) !important;
    box-shadow: 0 0 0 clamp(4px, 1vw, 6px) rgba(255, 68, 68, 0.15) !important;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary-accent);
    box-shadow: 0 0 0 clamp(3px, 0.8vw, 4px) rgba(0, 229, 255, 0.15);
    background: rgba(30, 30, 30, 0.95);
}

/* Phone Input Container */
.phone-input-container {
    display: flex;
    gap: clamp(0.5rem, 1.5vw, 0.75rem);
    align-items: stretch;
}

.country-select {
    flex-shrink: 0;
    min-width: clamp(100px, 20vw, 120px);
}

.phone-input-container input[type="tel"] {
    flex: 1;
}

/* Checkbox Groups */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: clamp(0.5rem, 1.5vw, 0.75rem); /* Reduced gap for better spacing */
    margin-top: clamp(0.5rem, 1.5vw, 0.75rem);
}

.checkbox-label {
    display: flex;
    align-items: center;
    font-family: 'Poppins', sans-serif;
    font-size: clamp(0.95rem, 2.5vw, 1rem);
    font-weight: 400;
    color: var(--text-primary);
    cursor: pointer;
    padding: clamp(0.5rem, 1.5vw, 0.75rem);
    border-radius: clamp(6px, 1.5vw, 8px);
    transition: all 0.2s ease;
    position: relative;
    border: 1px solid transparent;
    margin-bottom: clamp(0.25rem, 0.5vw, 0.5rem);
    line-height: 1.2;
}

.checkbox-label:hover {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

/* Custom Checkbox */
.checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    width: 0;
    height: 0;
}

.checkmark {
    height: clamp(20px, 4vw, 22px);
    width: clamp(20px, 4vw, 22px);
    background-color: rgba(50, 50, 50, 0.9); /* More visible dark background */
    border: 2px solid rgba(255, 255, 255, 0.4); /* Stronger white border */
    border-radius: 2px; /* Square appearance */
    margin-right: clamp(0.75rem, 2vw, 1rem);
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0; /* Prevent checkbox from shrinking */
    display: inline-block; /* Ensure it's displayed */
}

.checkbox-label:hover .checkmark {
    border-color: var(--primary-accent);
    background-color: rgba(0, 229, 255, 0.1); /* Subtle hover effect */
}

.checkbox-label input:checked ~ .checkmark {
    background-color: var(--primary-accent);
    border-color: var(--primary-accent);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: clamp(5px, 1.2vw, 6px);
    top: clamp(1px, 0.3vw, 2px);
    width: clamp(6px, 1.5vw, 7px);
    height: clamp(10px, 2.2vw, 12px);
    border: solid #000; /* Black checkmark for contrast */
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
}

.checkbox-label input:checked ~ .checkmark:after {
    display: block;
}

/* Checkbox text alignment */
.checkbox-label span:not(.checkmark) {
    display: inline-block;
    line-height: 1.4;
    vertical-align: middle;
}

/* Fitness tracker and metrics grids - Cross-browser compatible */
.fitness-tracker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(clamp(140px, 35vw, 180px), 1fr));
    gap: clamp(0.25rem, 1vw, 0.5rem);
    margin-top: clamp(0.5rem, 1.5vw, 0.75rem);
    /* Fallback for older browsers */
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(clamp(160px, 40vw, 220px), 1fr));
    gap: clamp(0.25rem, 1vw, 0.5rem);
    margin-top: clamp(0.5rem, 1.5vw, 0.75rem);
    /* Fallback for older browsers */
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
}

/* Modern grid support for checkbox grids */
@supports (display: grid) {
    .fitness-tracker-grid,
    .metrics-grid {
        display: grid;
        -webkit-box-orient: unset;
        -webkit-box-direction: unset;
        -ms-flex-direction: unset;
        flex-direction: unset;
        -ms-flex-wrap: unset;
        flex-wrap: unset;
    }
}

/* Grid checkbox labels - Cross-browser compatible */
.fitness-tracker-grid .checkbox-label,
.metrics-grid .checkbox-label {
    margin-bottom: 0; /* Remove margin since gap handles spacing */
    padding: clamp(0.3rem, 1vw, 0.5rem); /* Responsive padding */
    font-size: clamp(0.8rem, 2.2vw, 0.9rem); /* Responsive font size */
    font-weight: 300; /* Lighter font weight for answer options */
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    min-width: 0; /* Prevent overflow */
    word-wrap: break-word;
    -webkit-box-flex: 1;
    -ms-flex: 1 1 auto;
    flex: 1 1 auto;
}

/* Navigation Section - Now without progress bar */
.form-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: clamp(0.5rem, 1.5vw, 0.75rem); /* Reduced from clamp(1rem, 2.5vw, 1.5rem) */
}

/* Navigation Buttons */
.nav-btn,
.submit-btn {
    height: var(--button-height);
    padding: 0 clamp(1.5rem, 4vw, 2rem);
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    border: none;
    border-radius: clamp(24px, 6vw, 28px);
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: clamp(120px, 25vw, 140px);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Next and Submit buttons - Primary styling */
.next-btn,
.submit-btn {
    background: linear-gradient(135deg, var(--primary-accent), var(--secondary-accent));
    color: #000;
    box-shadow: 0 clamp(4px, 1.5vw, 6px) clamp(15px, 4vw, 20px) rgba(0, 229, 255, 0.3);
}

.next-btn:hover,
.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 clamp(6px, 2vw, 8px) clamp(20px, 5vw, 25px) rgba(0, 229, 255, 0.4);
}

/* Previous button - Secondary but still prominent styling */
.prev-btn {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.1));
    color: var(--text-primary);
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    box-shadow: 0 clamp(3px, 1vw, 4px) clamp(12px, 3vw, 15px) rgba(255, 255, 255, 0.1);
}

.prev-btn:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.15));
    border-color: var(--primary-accent);
    transform: translateY(-2px);
    box-shadow: 0 clamp(4px, 1.5vw, 6px) clamp(15px, 4vw, 20px) rgba(0, 229, 255, 0.2);
}

/* "Don't Have a CAP Number" button - Now in navigation area */
.no-code-btn {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0 clamp(1rem, 3vw, 1.5rem);
    height: var(--button-height);
    font-size: clamp(0.8rem, 2.2vw, 0.9rem);
    font-weight: 500;
    min-width: clamp(140px, 30vw, 180px);
    transition: all 0.3s ease;
    border-radius: clamp(24px, 6vw, 28px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.no-code-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.4);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.nav-btn:disabled,
.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Remove the old separate navigation section */
.survey-navigation {
    display: none; /* This will be replaced by form-navigation inside the tile */
}

/* Remove the old separate progress section */
.survey-progress {
    display: none; /* Progress bar is now part of form navigation */
}

/* Footer */
.survey-footer {
    text-align: center;
    padding: clamp(0.75rem, 2vw, 1rem);
    font-size: clamp(0.8rem, 2vw, 0.9rem);
    color: var(--text-secondary);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: auto;
}

/* Success Container - Replaces Modal */
.success-container {
    width: 100%;
    max-width: var(--content-max-width);
    margin: 0 auto;
}

.success-content {
    background: var(--card-bg);
    backdrop-filter: blur(15px);
    border-radius: clamp(12px, 2vw, 16px);
    padding: var(--form-padding);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(1rem, 3vw, 1.5rem);
}

.success-icon {
    font-size: clamp(3rem, 8vw, 4rem);
    color: var(--secondary-accent);
    display: block;
}

.success-content h2 {
    font-family: proxima-nova, sans-serif;
    font-weight: 600;
    font-size: clamp(1.8rem, 5vw, 2.2rem);
    color: var(--text-primary);
    margin: 0;
}

.success-content p {
    font-family: proxima-nova, sans-serif;
    font-size: clamp(1rem, 2.8vw, 1.1rem);
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

.success-content .second-message {
    margin-bottom: 0;
}

.close-btn {
    background: linear-gradient(135deg, var(--primary-accent), var(--secondary-accent));
    color: #000;
    border: none;
    padding: clamp(0.875rem, 2.5vw, 1rem) clamp(1.5rem, 4vw, 2rem);
    border-radius: clamp(24px, 6vw, 28px);
    font-family: proxima-nova, sans-serif;
    font-weight: 600;
    font-size: clamp(0.95rem, 2.5vw, 1rem);
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 clamp(6px, 2vw, 8px) clamp(20px, 5vw, 25px) rgba(0, 229, 255, 0.4);
}

/* Error States */
.form-group .error {
    border-color: #ff4444;
    box-shadow: 0 0 0 clamp(3px, 0.8vw, 4px) rgba(255, 68, 68, 0.15);
}

.validation-message {
    font-size: clamp(0.8rem, 2.2vw, 0.875rem);
    color: #ff4444;
    margin-top: clamp(0.25rem, 1vw, 0.5rem);
    display: none;
    padding: clamp(0.5rem, 1.5vw, 0.75rem);
    border-radius: clamp(6px, 1vw, 8px);
    background: rgba(255, 68, 68, 0.1);
    border: 1px solid rgba(255, 68, 68, 0.3);
    transition: all 0.3s ease;
}

/* 🎨 VALIDATION MESSAGE VARIANTS */
.validation-message.success {
    color: var(--secondary-accent);
    background: rgba(0, 255, 127, 0.1);
    border-color: rgba(0, 255, 127, 0.3);
    box-shadow: 0 0 10px rgba(0, 255, 127, 0.2);
}

.validation-message.error {
    color: #ff4444;
    background: rgba(255, 68, 68, 0.1);
    border-color: rgba(255, 68, 68, 0.3);
    box-shadow: 0 0 10px rgba(255, 68, 68, 0.2);
}

.validation-message.warning {
    color: #ffaa00;
    background: rgba(255, 170, 0, 0.1);
    border-color: rgba(255, 170, 0, 0.3);
    box-shadow: 0 0 10px rgba(255, 170, 0, 0.2);
}

.form-group input:invalid:not(:placeholder-shown) ~ .validation-message,
.form-group .error ~ .validation-message {
    display: block;
}

/* Responsive Design - Enhanced breakpoints */
@media screen and (max-width: 768px) {
    :root {
        --content-max-width: min(500px, 95%); /* Slightly wider on mobile */
    }
    
    .survey-tagline {
        margin-top: clamp(0.5rem, 2vh, 1rem); /* Remove negative margin on mobile */
        margin-bottom: clamp(1.5rem, 3vh, 2rem);
    }
    
    .survey-main {
        padding-top: clamp(0.5rem, 2vh, 1rem); /* Add more top padding on mobile */
    }
    
    .phone-input-container {
        flex-direction: column;
        gap: clamp(0.5rem, 2vw, 0.75rem);
    }
    
    .country-select {
        width: 100%;
        min-width: auto;
    }

    /* Prevent mobile zoom on input focus by ensuring 16px minimum font size */
    .form-group input[type="text"],
    .form-group input[type="email"],
    .form-group input[type="tel"],
    .form-group select,
    .form-group textarea {
        font-size: max(16px, clamp(0.95rem, 2.5vw, 1rem)) !important;
    }
}

@media screen and (max-width: 480px) {
    :root {
        --content-max-width: 95%; /* Full width minus margins on small screens */
    }
    
    .survey-tagline {
        margin-top: clamp(1rem, 3vh, 1.5rem); /* Even more space on small mobile */
        margin-bottom: clamp(1.5rem, 3vh, 2rem);
        font-size: clamp(1rem, 3.2vw, 1.2rem); /* Slightly smaller on very small screens */
    }
    
    .survey-main {
        padding-top: clamp(1rem, 3vh, 1.5rem); /* More top padding on small mobile */
    }
    
    .form-navigation {
        gap: clamp(0.5rem, 3vw, 0.75rem);
    }
    
    .nav-btn,
    .submit-btn {
        min-width: clamp(100px, 22vw, 120px);
        padding: 0 clamp(1rem, 3vw, 1.25rem);
    }
}

@media screen and (max-width: 375px) {
    .form-navigation {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .nav-btn,
    .submit-btn {
        width: 100%;
        min-width: auto;
    }
}

/* Focus States for Accessibility */
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
.checkbox-label:focus-within,
.nav-btn:focus,
.submit-btn:focus,
.close-btn:focus {
    outline: 2px solid var(--primary-accent);
    outline-offset: 2px;
}

/* Step Transition Animations */
.form-step.slide-out-left {
    transform: translateX(-30px);
    opacity: 0;
}

.form-step.slide-in-right {
    transform: translateX(30px);
    opacity: 0;
}

.form-step.slide-out-right {
    transform: translateX(30px);
    opacity: 0;
}

.form-step.slide-in-left {
    transform: translateX(-30px);
    opacity: 0;
}

/* Print Styles */
@media print {
    .video-background,
    .survey-navigation,
    .survey-progress {
        display: none;
    }
    
    .form-step {
        display: block !important;
        opacity: 1 !important;
        transform: none !important;
        page-break-inside: avoid;
        margin-bottom: 2rem;
    }
    
    .form-section {
        background: white;
        color: black;
        border: 1px solid #ccc;
        box-shadow: none;
    }
    
    .section-title {
        color: black;
        border-bottom-color: #ccc;
    }
}

/* Enhanced checkbox visibility - ensuring they always show */
.checkbox-group .checkmark {
    background-color: rgba(50, 50, 50, 0.9) !important; /* Force visible background */
    border: 2px solid rgba(255, 255, 255, 0.6) !important; /* Force visible border */
    box-shadow: 0 0 0 1px rgba(0, 229, 255, 0.2); /* Add subtle glow */
    min-height: 20px !important;
    min-width: 20px !important;
    display: inline-block !important;
    flex-shrink: 0 !important;
}

.checkbox-group .checkbox-label {
    display: flex !important;
    align-items: center !important; /* Force center alignment */
    gap: 0 !important; /* Remove any gap that might cause misalignment */
}

.checkbox-group .checkbox-label input:checked ~ .checkmark {
    background-color: var(--primary-accent) !important;
    border-color: var(--primary-accent) !important;
    box-shadow: 0 0 0 1px rgba(0, 229, 255, 0.5);
}

.checkbox-group .checkbox-label:hover .checkmark {
    border-color: var(--primary-accent) !important;
    box-shadow: 0 0 0 1px rgba(0, 229, 255, 0.4);
}

/* Cori Advantage Styling for Survey Options - Enhanced gradient visibility */
.cori-advantage-text {
    display: block;
    font-size: 0.7em; /* Slightly larger for better gradient visibility */
    font-weight: 600; /* Increased font weight for more emphasis */
    background: linear-gradient(135deg, var(--primary-accent), var(--secondary-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    -moz-background-clip: text; /* Firefox support */
    -moz-text-fill-color: transparent; /* Firefox support */
    background-clip: text;
    margin-top: 0rem; /* Removed gap between option and Cori advantage text */
    font-style: italic;
    width: 100%; /* Force full width to ensure line break */
    clear: both; /* Clear any floats */
    /* Enhanced fallback for browsers that don't support background-clip: text */
    color: var(--primary-accent);
    letter-spacing: 0.02em; /* Slight letter spacing for better readability */
}

/* Safari-specific fixes for gradient text */
@supports (-webkit-background-clip: text) {
    .cori-advantage-text {
        color: transparent;
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }
}

/* Firefox-specific fixes for gradient text */
@supports (-moz-background-clip: text) {
    .cori-advantage-text {
        color: transparent;
        -moz-background-clip: text;
        -moz-text-fill-color: transparent;
    }
}

.option-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2; /* Tighter line height for better spacing */
    width: 100%; /* Ensure full width */
    align-items: flex-start; /* Ensure proper alignment */
}

/* Radio button styling - circular version of checkmark */
.radiomark {
    height: clamp(20px, 4vw, 22px);
    width: clamp(20px, 4vw, 22px);
    background-color: rgba(50, 50, 50, 0.9);
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%; /* Circular for radio buttons */
    margin-right: clamp(0.75rem, 2vw, 1rem);
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
    display: inline-block;
}

.checkbox-label:hover .radiomark {
    border-color: var(--primary-accent);
    background-color: rgba(0, 229, 255, 0.1);
}

.checkbox-label input[type="radio"]:checked ~ .radiomark {
    background-color: var(--primary-accent);
    border-color: var(--primary-accent);
}

.radiomark:after {
    content: "";
    position: absolute;
    display: none;
    left: 50%;
    top: 50%;
    width: clamp(8px, 2vw, 10px);
    height: clamp(8px, 2vw, 10px);
    border-radius: 50%;
    background: #00e5ff; /* Cyan dot for contrast */
    transform: translate(-50%, -50%);
}

.checkbox-label input[type="radio"]:checked ~ .radiomark:after {
    display: block;
}

/* Hide radio buttons */
.checkbox-label input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    width: 0;
    height: 0;
}

/* Ensure proper subscript rendering */
sub {
    font-size: 0.75em;
    line-height: 0;
    position: relative;
    vertical-align: baseline;
    bottom: -0.25em;
}

/* Ensure space after subscript is preserved */
sub + * {
    margin-left: 0.1em;
}

/* Radio grid layout - Cross-browser compatible and responsive with 2 columns like fitness tracker */
.radio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(clamp(140px, 35vw, 180px), 1fr));
    gap: clamp(0.25rem, 1vw, 0.5rem);
    margin-top: clamp(0.5rem, 1.5vw, 0.75rem);
    width: 100%;
    /* Fallback for older browsers */
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: horizontal;
    -webkit-box-direction: normal;
    -ms-flex-direction: row;
    flex-direction: row;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
}

/* Force 2 columns minimum on desktop - matching fitness tracker behavior */
@media screen and (min-width: 481px) {
    .radio-grid {
        grid-template-columns: repeat(auto-fit, minmax(clamp(140px, 35vw, 180px), 1fr));
    }
}

/* Modern grid support */
@supports (display: grid) {
    .radio-grid {
        display: grid;
        -webkit-box-orient: unset;
        -webkit-box-direction: unset;
        -ms-flex-direction: unset;
        flex-direction: unset;
        -ms-flex-wrap: unset;
        flex-wrap: unset;
    }
}

/* Radio grid labels - Enhanced cross-browser compatibility */
.radio-grid .checkbox-label {
    margin-bottom: 0; /* Remove margin since gap handles spacing */
    padding: clamp(0.3rem, 1vw, 0.5rem); /* Responsive padding */
    font-size: clamp(0.8rem, 2.2vw, 0.9rem); /* Responsive font size */
    font-weight: 300; /* Lighter font weight for answer options */
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    min-width: 0; /* Prevent overflow */
    word-wrap: break-word;
    -webkit-box-flex: 1;
    -ms-flex: 1 1 auto;
    flex: 1 1 auto;
}

/* Select option styling for Cori Advantage options */
option.cori-advantage {
    background: rgba(0, 229, 255, 0.1) !important;
    color: var(--primary-accent) !important;
    font-weight: 600;
}

/* Enhanced select styling when focused to show Cori advantage options */
select:focus option.cori-advantage {
    background: linear-gradient(135deg, rgba(0, 229, 255, 0.15), rgba(0, 255, 127, 0.15)) !important;
}

/* Force line break before Cori Advantage text */
.cori-advantage-text::before {
    content: "\A"; /* Line break character */
    white-space: pre; /* Preserve the line break */
}

/* Alternative approach - ensure Cori Advantage is always on new line */
.option-text .cori-advantage-text {
    display: block !important;
    margin-top: 0rem !important; /* Removed gap */
    line-height: 1.1 !important;
    font-weight: 600 !important; /* Increased font weight */
}

/* Smaller radiomarks for grid layouts - Cross-browser compatible */
.radio-grid .radiomark {
    height: clamp(18px, 3.5vw, 20px);
    width: clamp(18px, 3.5vw, 20px);
    margin-right: clamp(0.5rem, 1.5vw, 0.75rem);
    -webkit-box-flex: 0;
    -ms-flex: 0 0 auto;
    flex: 0 0 auto;
}

/* Comprehensive Mobile Responsiveness - matching fitness tracker behavior */
@media screen and (max-width: 768px) {
    .radio-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columns on tablets like fitness tracker */
        gap: clamp(0.3rem, 1vw, 0.4rem);
    }
    
    .radio-grid .checkbox-label {
        font-size: clamp(0.85rem, 2.5vw, 0.9rem);
        padding: clamp(0.4rem, 1.2vw, 0.5rem);
    }
    
    .option-text {
        line-height: 1.3; /* Slightly more line height on mobile */
    }
    
    .cori-advantage-text {
        font-size: 0.75em; /* Larger on mobile for better readability */
        margin-top: 0.03rem;
    }
}

@media screen and (max-width: 480px) {
    .radio-grid {
        grid-template-columns: repeat(2, 1fr); /* Keep 2 columns on mobile like fitness tracker */
        gap: clamp(0.4rem, 1.5vw, 0.5rem);
        margin-top: clamp(0.75rem, 2vw, 1rem);
    }
    
    .radio-grid .checkbox-label {
        font-size: clamp(0.9rem, 3vw, 1rem);
        padding: clamp(0.5rem, 1.5vw, 0.6rem);
        min-height: clamp(44px, 12vw, 48px); /* Touch-friendly minimum height */
    }
    
    .radio-grid .radiomark {
        height: clamp(20px, 4vw, 22px);
        width: clamp(20px, 4vw, 22px);
        margin-right: clamp(0.75rem, 2vw, 1rem);
    }
    
    .cori-advantage-text {
        font-size: 0.8em; /* Even larger on small mobile for better gradient visibility */
        margin-top: 0.04rem;
    }
}

/* Extra small screens */
@media screen and (max-width: 375px) {
    .radio-grid {
        grid-template-columns: 1fr; /* Single column only on very small screens */
    }
    
    .radio-grid .checkbox-label {
        font-size: clamp(1rem, 3.5vw, 1.1rem);
        padding: clamp(0.6rem, 2vw, 0.75rem);
        min-height: clamp(48px, 14vw, 52px);
    }
    
    .cori-advantage-text {
        font-size: 0.85em; /* Largest size on very small screens */
        margin-top: 0.05rem;
    }
}

/* Smaller checkboxes for grid layouts - Cross-browser compatible */
.fitness-tracker-grid .checkmark,
.metrics-grid .checkmark {
    height: clamp(18px, 3.5vw, 20px);
    width: clamp(18px, 3.5vw, 20px);
    margin-right: clamp(0.5rem, 1.5vw, 0.75rem);
    -webkit-box-flex: 0;
    -ms-flex: 0 0 auto;
    flex: 0 0 auto;
}

/* Mobile responsiveness for checkbox grids */
@media screen and (max-width: 768px) {
    .fitness-tracker-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columns on tablets */
        gap: clamp(0.3rem, 1vw, 0.4rem);
    }
    
    .metrics-grid {
        grid-template-columns: 1fr; /* Single column on tablets */
        gap: clamp(0.3rem, 1vw, 0.4rem);
    }
    
    .fitness-tracker-grid .checkbox-label,
    .metrics-grid .checkbox-label {
        font-size: clamp(0.85rem, 2.5vw, 0.9rem);
        padding: clamp(0.4rem, 1.2vw, 0.5rem);
        min-height: clamp(40px, 10vw, 44px);
    }
}

@media screen and (max-width: 480px) {
    .fitness-tracker-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columns on mobile */
        gap: clamp(0.4rem, 1.5vw, 0.5rem);
    }
    
    .metrics-grid {
        grid-template-columns: 1fr; /* Single column on mobile */
        gap: clamp(0.4rem, 1.5vw, 0.5rem);
    }
    
    .fitness-tracker-grid .checkbox-label,
    .metrics-grid .checkbox-label {
        font-size: clamp(0.9rem, 3vw, 1rem);
        padding: clamp(0.5rem, 1.5vw, 0.6rem);
        min-height: clamp(44px, 12vw, 48px);
    }
    
    .fitness-tracker-grid .checkmark,
    .metrics-grid .checkmark {
        height: clamp(20px, 4vw, 22px);
        width: clamp(20px, 4vw, 22px);
        margin-right: clamp(0.75rem, 2vw, 1rem);
    }
}

@media screen and (max-width: 375px) {
    .fitness-tracker-grid {
        grid-template-columns: 1fr; /* Single column on very small screens */
    }
    
    .fitness-tracker-grid .checkbox-label,
    .metrics-grid .checkbox-label {
        font-size: clamp(1rem, 3.5vw, 1.1rem);
        padding: clamp(0.6rem, 2vw, 0.75rem);
        min-height: clamp(48px, 14vw, 52px);
    }
} 