/**
 * ENNU Life Assessment Forms Consolidated CSS
 * Dedicated styles for assessment form shortcodes only
 * Version: 99.9.49
 */

/* ================================================== */
/* ASSESSMENT FORM BASE STYLES                       */
/* ================================================== */

/* Slider Error Styling for Height/Weight Validation */
.slider-container.error {
    border: 2px solid #e74c3c;
    border-radius: 8px;
    padding: 10px;
    background-color: rgba(231, 76, 60, 0.1);
}

.slider-container.error .form-slider {
    border: 1px solid #e74c3c;
}

.slider-container.error .slider-value-display {
    color: #e74c3c;
    font-weight: bold;
}

input[type="range"].error {
    border: 2px solid #e74c3c;
    background-color: rgba(231, 76, 60, 0.1);
}

/* ENNU Life Header Container */
.ennu-header-container {
    text-align: center !important;
    margin-bottom: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border-radius: 0 !important;
    margin: 0 !important;
    position: relative !important;
    overflow: visible !important;
}

.ennu-header-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255,255,255,0.1) 25%, transparent 25%),
                linear-gradient(-45deg, rgba(255,255,255,0.1) 25%, transparent 25%),
                linear-gradient(45deg, transparent 75%, rgba(255,255,255,0.1) 75%),
                linear-gradient(-45deg, transparent 75%, rgba(255,255,255,0.1) 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    opacity: 0.3;
}

.ennu-logo-container {
    margin-bottom: 15px !important;
    position: relative !important;
    z-index: 2 !important;
    text-align: center !important;
}

.ennu-logo {
    height: 40px !important;
    width: auto !important;
    max-width: 200px !important;
    object-fit: contain !important;
}

/* Assessment Container */
.ennu-assessment {
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

/* Assessment Header */
.assessment-header {
    text-align: center;
    margin-bottom: 0px !important;
}

.assessment-title {
    font-size: 36px;
    font-weight: 700;
    color: #212529;
    margin: 0 0 10px 0;
}

.assessment-description {
    font-size: 18px;
    color: #6c757d;
}

/* Progress Bar */
.progress-container {
    margin-bottom: 0;
    text-align: center;
}

.progress-bar {
    width: 100%;
    max-width: 200px;
    height: 8px;
    background-color: #f1f3f4;
    border-radius: 4px;
    overflow: hidden;
    margin: 0 auto 15px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.ennu-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #d69f01, #ffbe03, #dae0de);
    background-size: 200% 200%;
    border-radius: 4px;
    transition: width 0.4s ease-in-out;
    animation: pulsate-progress 2s ease-in-out infinite;
    box-shadow: 0 1px 3px rgb(255 255 255 / 30%);
}

@keyframes pulsate-progress {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.progress-container .progress-text {
    font-size: 18px;
    font-weight: 600;
    color: #4c4c4c9e;
    margin-top: 10px;
}

/* ================================================== */
/* QUESTION SLIDES                                   */
/* ================================================== */

.question-slide {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.question-slide.active {
    display: block;
}

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

/* Question Styling */
.question-title {
    font-size: 1.5em;
    font-weight: 300;
    color: #212121;
    margin-bottom: 15px;
    text-align: center;
    line-height: 1.3;
    margin-top: 0;
}

.question-subtitle, .question-description {
    font-size: 18px;
    color: #6c757d;
    margin-bottom: 30px;
    text-align: center;
    line-height: 1.5;
}

.question-description {
    font-size: 14px;
    color: #515151;
    margin-bottom: 30px;
    text-align: center;
    line-height: 1.5;
}

/* ================================================== */
/* ANSWER OPTIONS & RADIO BUTTONS                    */
/* ================================================== */

/* Enhanced Responsive Answer Options Grid */
.answer-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin: 0 auto 0 auto;
    width: 100%;
}

/* Default layout for answer options without specific layout class */
.answer-options:not(.layout-horizontal):not(.layout-vertical):not(.layout-columns) {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    max-width: 900px;
}

/* Horizontal Layout for Radio Options (Single Row) */
.answer-options.layout-horizontal {
    display: flex !important;
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: center;
    gap: 20px;
    max-width: 100%;
}

/* Vertical Layout for Radio Options (Stack Vertically) */
.answer-options.layout-vertical {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    max-width: 600px;
}

/* Specific Column Layouts for Desktop */
.answer-options.layout-columns.columns-2,
.answer-options.columns-2 {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    max-width: 500px;
    gap: 18px;
}

.answer-options.layout-columns.columns-3,
.answer-options.columns-3 {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    max-width: 100%;
    gap: 15px;
}

.answer-options.layout-columns.columns-4,
.answer-options.columns-4 {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    max-width: 900px;
    gap: 14px;
}

.answer-options.layout-columns.columns-5,
.answer-options.columns-5 {
    display: grid !important;
    grid-template-columns: repeat(5, 1fr) !important;
    max-width: 1100px;
    gap: 12px;
}

.answer-options.layout-columns.columns-6,
.answer-options.columns-6 {
    display: grid !important;
    grid-template-columns: repeat(6, 1fr) !important;
    max-width: 1300px;
    gap: 10px;
}

/* Modern Pill-Shaped Answer Options */
.answer-option {
    position: relative;
    font-weight: 400 !important;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: stretch;
}

.answer-option input[type="radio"],
.answer-option input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    z-index: 1;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.answer-option label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 60px;
    width: 100%;
    padding: 8px 20px;
    background: #ffffff;
    border: 2px solid #e9ecef;
    border-radius: 7px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.9rem;
    font-weight: 500;
    color: #495057;
    text-align: center;
    position: relative;
    overflow: hidden;
    line-height: 1.3;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    backdrop-filter: blur(10px);
    box-sizing: border-box;
    margin: 0px !important;
    pointer-events: none;
}

.answer-option label::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 50px;
}

.answer-option label:hover {
    border-color: #6c757d;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.answer-option label:hover::before {
    opacity: 1;
}

.answer-option input[type="radio"]:checked + label,
.answer-option input[type="checkbox"]:checked + label {
    background: linear-gradient(135deg, #4a5568 0%, #2d3748 50%, #1a202c 100%);
    border-color: #2d3748;
    color: #ffffff !important;
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(45, 55, 72, 0.4);
}

/* Option Description Styling */
.option-description {
    display: block;
    font-size: 0.9em;
    color: #6c757d;
    margin-top: 5px;
}

/* ================================================== */
/* MINIMAL HEIGHT & WEIGHT SLIDERS (SIDE-BY-SIDE)   */
/* ================================================== */

.height-weight-fields-minimal {
    margin: 15px 0;
}

.minimal-field-row {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    justify-content: center;
}

.minimal-field-group {
    flex: 1;
    min-width: 0;
    max-width: 150px;
}

/* Mobile Responsiveness for Height and Weight Fields */
@media screen and (max-width: 768px) {
    .height-weight-fields-minimal {
        margin: 20px 0;
        padding: 0 10px;
    }

    .minimal-field-row {
        flex-direction: column;
        gap: 20px;
        align-items: center;
        justify-content: center;
        width: 100%;
    }

    .minimal-field-group {
        flex: none;
        min-width: 280px;
        max-width: 320px;
        width: 100%;
        text-align: center;
    }

    .minimal-label {
        text-align: center;
        margin-bottom: 10px;
        font-size: 16px;
    }

    .form-slider {
        width: 100%;
        margin: 10px 0;
    }

    .height-feet-display,
    .weight-display {
        text-align: center;
        font-size: 18px;
        font-weight: 600;
        margin-top: 8px;
    }
}

/* Extra small mobile devices */
@media screen and (max-width: 480px) {
    .minimal-field-group {
        min-width: 260px;
        max-width: 300px;
        padding: 0 10px;
    }

    .minimal-label {
        font-size: 15px;
    }

    .height-feet-display,
    .weight-display {
        font-size: 17px;
    }
}

.minimal-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    text-align: center;
}

.minimal-slider-container {
    position: relative;
}

.minimal-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: #ddd;
    outline: none;
    cursor: pointer;
    margin: 0;
}

.minimal-slider:focus {
    outline: none;
    box-shadow: none;
}

.minimal-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #007cba;
    cursor: pointer;
    border: none;
    outline: none;
}

.minimal-slider::-webkit-slider-thumb:focus {
    outline: none;
    box-shadow: none;
}

.minimal-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #007cba;
    cursor: pointer;
    border: none;
    outline: none;
}

.minimal-slider::-moz-range-thumb:focus {
    outline: none;
    box-shadow: none;
}

.minimal-value-display {
    text-align: center;
    margin-top: 8px;
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

.height-feet-display,
.weight-display {
    color: #333;
    font-size: 16px;
}

/* Error states for minimal sliders */
.minimal-slider-container.error {
    border: 2px solid #e74c3c;
    border-radius: 8px;
    padding: 8px;
    background-color: rgba(231, 76, 60, 0.1);
}

.minimal-slider.error {
    background: #e74c3c !important;
}

/* ================================================== */
/* NAVIGATION BUTTONS                                */
/* ================================================== */
@media (max-width: 480px) {
    .question-navigation {
        display: flex !important;
        flex-direction: row !important;
    }
}
.question-navigation {
    display: flex;
    justify-content: center;
}

.navigation-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 30px;
    padding: 20px 0;
}

.nav-button {
    padding: 11px 32px;
    border: 1px solid transparent;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.nav-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 50px;
}

.nav-button:hover::before {
    opacity: 1;
}

.nav-button.previous {
    background: #555;
    color: white;
    border-color: #555;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.nav-button.previous:hover {
    background: #333;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: #333;
}

.nav-button.next,
.nav-button.submit {
    background: linear-gradient(135deg, #e38c23 0%, #d8be36 50%, #ffdd00 100%);
    color: #ffffff;
    border-color: #ac8300;
    box-shadow:
        0 6px 20px rgba(45, 55, 72, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    text-shadow: 0px -1px 0px #0000004a;
}

.nav-button.next:hover,
.nav-button.submit:hover {
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 50%, #0f1419 100%);
    transform: translateY(-2px);
    box-shadow:
        0 12px 35px rgba(45, 55, 72, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.15) inset;
    border-color: #1a202c;
}

.nav-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* ================================================== */
/* CONTACT FORM FIELDS                               */
/* ================================================== */

.contact-fields {
    max-width: 500px;
    margin: 0 auto;
}

.contact-field {
    margin-bottom: 20px;
}

.contact-field label {
    display: block;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
}

.contact-field input,
.contact-field select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5eb;
    border-radius: 8px !important;
    font-size: 16px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.contact-field input:focus,
.contact-field select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.contact-field input {
    text-align: center;
}

/* ================================================== */
/* DATE OF BIRTH DROPDOWNS                           */
/* ================================================== */

.dob-dropdowns {
    display: flex;
    gap: 15px;
    max-width: 400px;
    margin: 0 auto;
}

.dob-dropdowns label {
    display: none;
}

.dob-dropdowns select {
    flex: 1;
    min-width: 0;
    padding: 0px !important;
    min-width: 80px;
    border-radius: 7px !important;
}

.calculated-age-display {
    color: #667eea !important;
    font-weight: 600;
    text-align: center;
    margin-top: 0 !important;
}

/* ================================================== */
/* MULTI-SELECT CHECKBOX GRID                        */
/* ================================================== */

.multiselect-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

/* ================================================== */
/* FOLLOW-UP QUESTIONS                               */
/* ================================================== */

.follow-up-question-container {
    margin-top: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-left: 4px solid #007bff;
    border-radius: 8px;
}

/* ================================================== */
/* TOOLTIPS                                          */
/* ================================================== */

.why-tooltip {
    position: relative;
    display: inline-block;
    cursor: help;
    margin-left: 5px;
}

.ennu-tooltip-popup {
    position: absolute;
    background: #2c3e50;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    white-space: nowrap;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
}

.why-tooltip:hover .ennu-tooltip-popup {
    opacity: 1;
    visibility: visible;
}

/* ================================================== */
/* RESPONSIVE DESIGN                                 */
/* ================================================== */

@media (max-width: 768px) {
    .dob-dropdowns {
        flex-direction: row;
        gap: 10px;
        max-width: 100%;
    }

    /* Stack to 2 columns on tablets and large phones */
    .answer-options.layout-columns.columns-3,
    .answer-options.columns-3,
    .answer-options.layout-columns.columns-4,
    .answer-options.columns-4,
    .answer-options.layout-columns.columns-5,
    .answer-options.columns-5,
    .answer-options.layout-columns.columns-6,
    .answer-options.columns-6 {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    /* Horizontal layout adjustments for tablets */
    .answer-options.layout-horizontal {
        gap: 15px;
        flex-wrap: nowrap;
        justify-content: center;
    }

    /* Better handling for long answer text - force 2 columns instead of 1 */
    .answer-options.long-text .answer-option,
    .answer-option.long-text {
        min-height: auto;
    }

    .answer-options.long-text .answer-option label,
    .answer-option.long-text label {
        font-size: 14px;
        padding: 12px 8px;
        line-height: 1.3;
        text-align: center;
        word-wrap: break-word;
        hyphens: auto;
    }

    /* Smart column adjustment for options with varying text lengths */
    .answer-options:has(.answer-option[data-long="true"]) {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 14px;
    }

    .navigation-buttons {
        position: sticky;
        bottom: 0;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        padding: 16px;
        border-top: 1px solid #e0e0e0;
        display: flex;
        gap: 16px;
        justify-content: center;
        align-items: center;
    }
}

@media (max-width: 480px) {
    /* Stack to 1 column on small phones, but keep 2 columns for long text */
    .answer-options.layout-columns.columns-2,
    .answer-options.columns-2 {
        grid-template-columns: 1fr;
    }

    /* For 3+ column layouts, use 2 columns if text is long, otherwise 1 column */
    .answer-options.layout-columns.columns-3,
    .answer-options.columns-3,
    .answer-options.layout-columns.columns-4,
    .answer-options.columns-4 {
        grid-template-columns: 1fr;
    }

    /* Exception: Keep 2 columns for long text even on small phones */
    .answer-options.long-text,
    .answer-options:has(.answer-option[data-long="true"]),
    .answer-options[data-text-length="long"] {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px;
    }

    /* Smaller text for long options on small screens */
    .answer-options.long-text .answer-option label,
    .answer-option.long-text label,
    .answer-option[data-long="true"] label {
        font-size: 13px;
        padding: 10px 6px;
        line-height: 1.2;
    }

    /* Stack horizontal layout vertically on mobile */
    .answer-options.layout-horizontal {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }

    .answer-options.layout-horizontal .answer-option {
        flex: none;
        width: 100%;
    }

    .minimal-field-row {
        flex-direction: column;
        gap: 15px;
    }

    .navigation-buttons {
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: 15px;
        flex-wrap: wrap;
    }

    .nav-button {
        min-width: 100px;
        flex: 0 0 auto;
    }
}

/* ================================================== */
/* ACCESSIBILITY                                     */
/* ================================================== */

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .answer-option label {
        border-width: 3px;
    }

    .answer-option input[type="radio"]:checked + label {
        border-width: 3px;
    }
}

/* Focus Visible for Keyboard Navigation */
.answer-option label:focus-visible,
.nav-button:focus-visible,
.contact-field input:focus-visible,
.contact-field select:focus-visible {
    outline: 3px solid #495057;
    outline-offset: 2px;
}

/* ================================================== */
/* PRIVACY NOTICE                                    */
/* ================================================== */

.privacy-notice {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: #6c757d;
}

.privacy-notice p {
    margin: 0;
}

.privacy-notice small {
    color: #6c757d;
}