/* Quiz Form Styles - Modern, Minimalist Design */
.quiz-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    font-family:
        "Inter",
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Oxygen,
        Ubuntu,
        Cantarell,
        sans-serif;
    color: #1a1b20; /* Body text color */
}

.quiz-question {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 40px 20px;

    width: 100%;
    margin: 0 auto;
    position: relative;
}

.quiz-question.active {
    display: flex;
}

.quiz-question-number {
    color: var(--lfm-primary); /* Primary accent */
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
}

.quiz-question-text {
    font-size: 28px;
    font-weight: 700; /* Subtitles are bold */
    color: #0a0a1a; /* Subtitle text color */
    margin-bottom: 40px;
    line-height: 1.4;
}

.quiz-description {
    color: #888;
    font-size: 14px;
    text-decoration: underline;
    text-decoration-style: dotted;
    margin-bottom: 30px;
}

.quiz-options {
    width: 100%;
    max-width: 800px;
}

.quiz-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #e8f0ff; /* Secondary accent background */
    color: #0a0a1a;
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 18px;
    font-weight: 500;
}

.quiz-option:hover {
    background: var(--lfm-primary); /* Primary on hover */
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 87, 255, 0.3);
}

.quiz-option:active {
    transform: translateY(0);
}

/* Selected state for options (visual feedback) */
.quiz-option.selected {
    background: var(--lfm-primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 87, 255, 0.3);
}

/* Selected state no longer needs accent-color changes for custom checkboxes */

/* Mobile touch optimization - prevent double-tap zoom and delays */
.quiz-option {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
}

/* Radio buttons - Hidden, selection via .selected class */
.quiz-option input[type="radio"] {
    display: none !important;
    opacity: 0 !important;
    position: absolute !important;
    left: -9999px !important;
    width: 0 !important;
    height: 0 !important;
    pointer-events: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

.quiz-option label {
    cursor: pointer;
    flex-grow: 1;
    text-align: left;
    width: 100%;
}

/* Thank You Page Styles */
.quiz-thank-you {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
}

.quiz-thank-you.active {
    display: flex;
}

.quiz-thank-you-title {
    font-size: 36px;
    font-weight: 700;
    color: #0a0a1a;
    margin-bottom: 20px;
    text-align: center;
}

.quiz-thank-you-subtitle {
    font-size: 18px;
    font-weight: 600;
    color: #0a0a1a;
    margin-bottom: 40px;
    text-align: center;
}

.quiz-form-collect {
    width: 100%;
    max-width: 500px;
}

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

.quiz-form-label {
    display: block;
    font-size: 14px;
    font-weight: 700; /* Subtitles bold */
    color: #0a0a1a;
    margin-bottom: 8px;
}

.quiz-form-input {
    width: 100%;
    padding: 15px;
    border: 2px solid var(--lfm-primary); /* Primary border */
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.quiz-form-input:focus {
    outline: none;
    border-color: var(--lfm-primary);
    box-shadow: 0 0 0 3px rgba(0, 87, 255, 0.15); /* soft focus ring */
}

.quiz-form-input.error {
    border-color: #dc2626;
}

.quiz-form-checkbox {
    display: flex;
    align-items: flex-start;
    margin-bottom: 30px;
}

.quiz-form-checkbox input {
    margin-right: 12px;
    margin-top: 3px;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.quiz-form-checkbox-label {
    font-size: 14px;
    color: #1a1b20;
    line-height: 1.5;
}

.quiz-form-checkbox-label a {
    color: var(--lfm-primary);
    text-decoration: underline;
}

.quiz-submit-btn {
    width: 100%;
    padding: 18px;
    background: var(--lfm-primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quiz-submit-btn:hover {
    background: #004de0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 87, 255, 0.3);
}

.quiz-submit-btn:active {
    transform: translateY(0);
}

.quiz-submit-btn:disabled {
    background: #e8f0ff;
    color: #1a1b20;
    cursor: not-allowed;
    transform: none;
}

/* Loading State */
.quiz-loading {
    display: none;
    text-align: center;
    padding: 20px;
}

.quiz-loading.active {
    display: block;
}

.quiz-loading-spinner {
    border: 4px solid #f3f4f6;
    border-top: 4px solid var(--lfm-primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

/* Quiz Progress Bar */
.quiz-progress {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.quiz-progress-bar {
    width: 100%;
    height: 8px;
    background-color: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.quiz-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--lfm-primary) 0%, var(--lfm-primary-light) 100%);
    border-radius: 4px;
    width: 0%;
    transition: width 0.3s ease;
}

.quiz-progress-text {
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: var(--lfm-text);
}

/* Quiz intro styles - compact version */
.quiz-intro {
    display: none;
    text-align: center;
    margin-bottom: 20px;
    padding: 10px 15px;
}

.quiz-intro.show {
    display: block;
}

.quiz-main-title {
    font-size: 22px;
    font-weight: 600;
    color: #0a0a1a;
    margin-bottom: 8px;
    line-height: 1.3;
}

.quiz-intro-text {
    font-size: 13px;
    color: #888;
    font-style: italic;
    line-height: 1.4;
}

/* Next button for checkbox questions */
.quiz-next-btn {
    display: none;
    width: 100%;
    padding: 18px;
    background: var(--lfm-primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quiz-next-btn:hover {
    background: #004de0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 87, 255, 0.3);
}

.quiz-next-btn:active {
    transform: translateY(0);
}

/* Previous button - small and discreet at bottom left */
.quiz-prev-btn {
    display: none;
    position: absolute;
    bottom: -30px;
    left: 15px;
    padding: 8px 12px;
    background: transparent;
    color: #888;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.7;
}

.quiz-prev-btn:hover {
    opacity: 1;
    color: var(--lfm-primary);
    border-color: var(--lfm-primary);
    background: #f5f8ff;
}

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

.quiz-question.active .quiz-prev-btn {
    display: block;
}

/* Hide prev button on first question */
.quiz-question:first-of-type .quiz-prev-btn {
    display: none !important;
}

/* Multiple choice hint */
.quiz-multiple-choice-hint {
    font-size: 16px;
    color: #666;
    font-style: italic;
    margin: -10px 0 20px 0;
    font-weight: 700;
}

/* Text input for city question */
.quiz-text-input {
    width: 100%;
    padding: 15px;
    border: 2px solid #0057ff;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    box-sizing: border-box;
    margin-bottom: 20px;
}

.quiz-text-input:focus {
    outline: none;
    border-color: var(--lfm-primary);
    box-shadow: 0 0 0 3px rgba(0, 87, 255, 0.15);
}

.quiz-text-input.error {
    border-color: #dc2626;
}

/* Checkbox support - Hidden, selection via .selected class */
.quiz-option input[type="checkbox"],
.quiz-question input[type="checkbox"],
input[type="checkbox"][name^="question"] {
    display: none !important;
    opacity: 0 !important;
    position: absolute !important;
    left: -9999px !important;
    width: 0 !important;
    height: 0 !important;
    pointer-events: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

.quiz-option input[type="checkbox"]:checked + label {
    font-weight: 600;
}

/* Ensure touch optimization for all interactive elements */
.quiz-next-btn,
.quiz-prev-btn,
.quiz-submit-btn {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

/* Responsive Design - Mobile Fullscreen */
@media (max-width: 768px) {
    .quiz-intro {
        display: none !important;
    }

    .quiz-container {
        padding: 15px;
        min-height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
    }

    .quiz-question {
        padding: 20px 10px;
        min-height: auto;
        flex: 1;
    }

    .quiz-question-text {
        font-size: 22px;
        margin-bottom: 30px;
    }

    .quiz-option {
        padding: 16px;
        font-size: 16px;
        margin-bottom: 12px;
    }

    .quiz-thank-you-title {
        font-size: 26px;
    }

    .quiz-thank-you-subtitle {
        font-size: 15px;
    }

    .quiz-main-title {
        font-size: 18px;
    }

    .quiz-intro-text {
        font-size: 12px;
    }

    .quiz-progress {
        padding: 12px;
    }

    .quiz-progress-text {
        font-size: 13px;
    }
    
    .quiz-next-btn,
    .quiz-submit-btn {
        padding: 16px;
        font-size: 16px;
    }
    
    .quiz-prev-btn {
        bottom: -25px;
        left: 10px;
        padding: 6px 10px;
        font-size: 13px;
    }
}

/* Extra small screens */
@media (max-width: 400px) {
    .quiz-container {
        padding: 12px 10px;
    }
    
    .quiz-question-text {
        font-size: 20px;
    }
    
    .quiz-option {
        padding: 14px;
        font-size: 15px;
    }
    
    .quiz-main-title {
        font-size: 16px;
    }
}
