﻿/* ================================================
   WIZARD / QUESTIONNAIRE STYLES
   Sections:
   1. Layout & Containers
   2. Question Text & Inputs
   3. Navigation Buttons
   4. Answer Choice Labels (Radio)
   5. Progress Bar
   6. Animations (Fade In / Out)
   7. Spinner
   8. Upgrade / Checkbox Options
   9. Results Boxes
   10. Misc Components (Logo, Nested Addons)
   11. iOS / Mobile Fixes
   12. Responsive Overrides
   ================================================ */


/* ------------------------------------------------
   1. LAYOUT & CONTAINERS
   ------------------------------------------------ */

#wizard-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 20px;
    font-family: Arial, sans-serif;
}

#questiontext-container,
#email-container {
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
    max-width: 600px;
    margin: auto;
    position: relative;
}


/* ------------------------------------------------
   2. QUESTION TEXT & INPUTS
   ------------------------------------------------ */

#question-text {
    font-size: 1.5em;
    line-height: 1.4;
    padding: 10px;
    width: 100%;
    padding-bottom: 0;
    margin-block-end: 0;
}

#answer-input,
#email {
    width: 100%;
    padding: 10px;
    font-size: 1em;
}


/* ------------------------------------------------
   3. NAVIGATION BUTTONS
   ------------------------------------------------ */

#navigation-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

#back-button,
#next-button {
    padding: 10px 20px;
    font-size: 1em;
    cursor: pointer;
}

    #back-button:disabled {
        background-color: #ccc;
        cursor: not-allowed;
    }


/* ------------------------------------------------
   4. ANSWER CHOICE LABELS (Radio)
   ------------------------------------------------ */

/* Wrapper */
.form-check {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    width: 100%;
    max-width: 100%;
    text-align: center;
}

/* Hide the native radio input */
input[type="radio"].form-check-input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    margin: 0;
    padding: 0;
}

/* Custom radio circle */
.form-check-circle {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #4d4d4d;
    background-color: white;
    display: inline-block;
    position: relative;
}

/* Label styled as a button */
.form-check-label {
    border: 2px solid #4d4d4d;
    border-radius: 12px;
    cursor: pointer;
    transition: background-color 0.2s, box-shadow 0.2s, color 0.2s;
    color: #132849;
    font-weight: 500;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    width: 100%;
    text-align: center;
}

/*Protect iphone from the hover */
@media (hover: hover) {
    .form-check-label:hover {
        background-color: #f0f8ff;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    }
}

/* Selected state */
input[type="radio"].form-check-input:checked + .form-check-label {
    background-color: #D0E8FF !important;
    border: 3px solid #4A90D9 !important;
    box-shadow: none !important;
    font-weight: bold;
}

    /* Keep inner circle white when selected */
    input[type="radio"].form-check-input:checked + .form-check-label .form-check-circle {
        background-color: white !important;
        border-color: #132849 !important;
    }

/* JS-applied selected class (used on iOS where :checked can lag) */
.answer-selected {
    background-color: #D0E8FF !important;
    border: 3px solid #4A90D9 !important;
    font-weight: bold !important;
    transition: transform 0.15s ease, background-color 0.15s ease;
}


/* ------------------------------------------------
   5. PROGRESS BAR
   ------------------------------------------------ */

.progress {
    position: relative;
    border-radius: 10px;
    overflow: visible;
    background-color: #9FD6CE;
}

.progress-bar {
    height: 100%;
    transition: width 0.2s ease-in-out;
    border-radius: 5px;
    background-color: #F9A2DB;
}

.progress-circle {
    position: absolute;
    top: 50%;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    transform: translateY(-50%);
    background-color: #F9A2DB;
    border: 2px solid #F9A2DB;
}


/* ------------------------------------------------
   6. ANIMATIONS (Fade In / Out)
   ------------------------------------------------ */

.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-out {
    animation: fadeOut 0.5s ease-in-out;
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(50px);
    }
}


/* ------------------------------------------------
   7. SPINNER
   ------------------------------------------------ */

#spinner.questionnaire-spinner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: 12px;
}


/* ------------------------------------------------
   8. UPGRADE / CHECKBOX OPTIONS
   ------------------------------------------------ */

.upgrade-selection {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.upgrade-option {
    display: flex;
    align-items: flex-start;
    background-color: #f7fdf9;
    border: 2px solid #cfece7;
    border-radius: 12px;
    padding: 18px 20px;
    cursor: pointer;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    gap: 1rem;
}

    .upgrade-option:hover {
        background-color: #eafaf7;
        border-color: #9fd6ce;
    }

    .upgrade-option input.custom-checkbox,
    .addon-label input.custom-checkbox {
        appearance: none;
        border: 2px solid #4CAF50;
        border-radius: 4px;
        background: white;
        position: relative;
        cursor: pointer;
        transition: all 0.2s ease;
    }

    .upgrade-option input.custom-checkbox {
        width: 24px;
        height: 24px;
        min-width: 24px;
        margin-top: 3px;
    }

.addon-label input.custom-checkbox {
    width: 20px;
    height: 20px;
}

    .upgrade-option input.custom-checkbox:checked,
    .addon-label input.custom-checkbox:checked {
        background-color: #4CAF50;
        border-color: #4CAF50;
    }

        .upgrade-option input.custom-checkbox:checked::after {
            content: "✔";
            color: white;
            font-size: 16px;
            position: absolute;
            top: 0;
            left: 5px;
            font-weight: bold;
        }

        .addon-label input.custom-checkbox:checked::after {
            content: "✔";
            color: white;
            font-size: 14px;
            font-weight: bold;
            position: absolute;
            top: 0;
            left: 4px;
        }

.option-content {
    display: flex;
    flex-direction: column;
}

.option-title {
    font-weight: 600;
    font-size: 1rem;
    color: #333;
    margin-bottom: 4px;
}

small {
    font-size: 0.875rem;
    color: #666;
}

.nested-addon {
    margin-top: 1rem;
    padding-left: 0.5rem;
}


/* ------------------------------------------------
   9. RESULTS BOXES
   ------------------------------------------------ */

.basic-results-box {
    border-left: 6px solid #17a2b8;
    background-color: #f8fcfd;
}

.badge-style-result {
    max-width: 500px;
    font-size: 1rem;
    line-height: 1.5;
    background-color: #ffffff;
}


/* ------------------------------------------------
   10. MISC COMPONENTS
   ------------------------------------------------ */

.logo-img {
    height: 40px;
    width: auto;
    max-height: 100%;
}


/* ------------------------------------------------
   11. iOS / MOBILE FIXES
   ------------------------------------------------ */

/* Kill tap highlights globally */
* {
    -webkit-tap-highlight-color: transparent !important;
    -webkit-touch-callout: none !important;
}

button,
.btn,
label,
.form-check-label {
    -webkit-appearance: none !important;
    touch-action: manipulation;
    user-select: none;
}

    button:focus, button:active,
    .btn:focus, .btn:active,
    label:focus, label:active,
    .form-check-label:focus, .form-check-label:active {
        outline: none !important;
        box-shadow: none !important;
        background-color: transparent !important;
    }

        .form-check-input:focus + .form-check-label .form-check-circle,
        .form-check-label:active .form-check-circle {
            box-shadow: none !important;
        }

/* iOS blue pre-selection prevention */
.form-check-label {
    -webkit-tap-highlight-color: transparent !important;
    -webkit-touch-callout: none !important;
    -webkit-user-select: none !important;
    user-select: none !important;
}

.form-check-input {
    -webkit-tap-highlight-color: transparent !important;
}


/* ------------------------------------------------
   12. RESPONSIVE OVERRIDES
   ------------------------------------------------ */

/* Tablet and below */
@media (max-width: 768px) {
    #questiontext-container {
        min-height: 170px;
        max-width: 100%;
        padding-bottom: 0;
    }

    .basic-results-box {
        padding: 1.5rem 1rem;
    }
}

/* Mobile only */
@media (max-width: 767px) {
    .container.mt-5 {
        margin-top: 1.5rem !important;
    }

    .thought-bubble {
        margin-top: 10px;
        margin-bottom: 10px;
    }

    .love-icon {
        font-size: 36px;
        margin-top: 8px;
    }

    .text-center.mt-4 {
        margin-top: 0.75rem !important;
    }

    .cta-duo {
        gap: 0.4rem;
    }

    .cta-divider {
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        line-height: 1;
    }

    .cta-sub {
        margin-bottom: 0;
        margin-top: 2px;
    }

    .text-muted.mt-2 {
        margin-top: 0.25rem !important;
    }

    .fs-5.mt-4 {
        margin-top: 0.75rem !important;
        margin-bottom: 0 !important;
    }
}

/* Bootstrap lg breakpoint */
@media (min-width: 992px) {
    .form-check {
        max-width: 70%;
    }
}

/* Wider screens: constrain answer button width */
@media (min-width: 768px) {
    .form-check-label {
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
    }
}
