/**
 * WHS Paradigm Assessment Styles
 * Dark theme with purple/pink gradient accents
 */

/* ========================================
   CSS VARIABLES
   ======================================== */

:root {
    /* Brand Colors */
    --whs-deep-blue: #1a1a2e;
    --whs-purple: #8b5cf6;
    --whs-purple-light: #a78bfa;
    --whs-pink: #ec4899;
    --whs-gradient: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
    
    /* Surfaces */
    --surface-bg: #111827;
    --surface-sidebar: #0f172a;
    --surface-card: rgba(31, 41, 55, 0.4);
    --surface-card-hover: rgba(31, 41, 55, 0.6);
    --surface-header: rgba(15, 23, 42, 0.8);
    
    /* Text */
    --text-primary: #ffffff;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    
    /* Borders */
    --border-subtle: rgba(139, 92, 246, 0.15);
    --border-active: rgba(139, 92, 246, 0.4);
    
    /* Shadows */
    --shadow-card: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    --shadow-button: 0 4px 20px rgba(139, 92, 246, 0.4);
    
    /* Spacing */
    --sidebar-width: 320px;
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 200ms ease;
    --transition-slow: 300ms ease;
}

/* ========================================
   BASE STYLES
   ======================================== */

/* Hide site header/nav when assessment is active */
.whs-paradigm-container {
    min-height: 100vh;
    background: var(--surface-bg);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-primary);
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

/* Hide the site's main header/nav when on assessment page */
body:has(.whs-paradigm-container) #header,
body:has(.whs-paradigm-container) .site-header,
body:has(.whs-paradigm-container) header.header,
body:has(.whs-paradigm-container) #masthead,
body:has(.whs-paradigm-container) .nectar-header-wrap,
body:has(.whs-paradigm-container) #top,
body:has(.whs-paradigm-container) .main-navigation,
body:has(.whs-paradigm-container) nav.primary-menu,
body:has(.whs-paradigm-container) .site-branding,
body:has(.whs-paradigm-container) #site-header-menu {
    display: none !important;
}

/* Also hide footer for full immersive experience */
body:has(.whs-paradigm-container) #footer,
body:has(.whs-paradigm-container) .site-footer,
body:has(.whs-paradigm-container) footer.footer,
body:has(.whs-paradigm-container) #colophon,
body:has(.whs-paradigm-container) .footer-outer {
    display: none !important;
}

/* Ensure body has no padding/margin from theme */
body:has(.whs-paradigm-container) {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* Fallback for browsers without :has() support - add this class via JS */
body.whs-assessment-active #header,
body.whs-assessment-active .site-header,
body.whs-assessment-active header.header,
body.whs-assessment-active #masthead,
body.whs-assessment-active .nectar-header-wrap,
body.whs-assessment-active #top,
body.whs-assessment-active .main-navigation,
body.whs-assessment-active nav.primary-menu,
body.whs-assessment-active .site-branding,
body.whs-assessment-active #site-header-menu,
body.whs-assessment-active #footer,
body.whs-assessment-active .site-footer,
body.whs-assessment-active footer.footer,
body.whs-assessment-active #colophon,
body.whs-assessment-active .footer-outer {
    display: none !important;
}

body.whs-assessment-active {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

.whs-paradigm-container * {
    box-sizing: border-box;
}

/* ========================================
   LAYOUT - DESKTOP
   ======================================== */

.whs-assessment-layout {
    display: flex;
    min-height: 100vh;
}

/* Account for WordPress admin bar when logged in */
.admin-bar .whs-sidebar {
    top: 32px;
    height: calc(100vh - 32px);
}

@media screen and (max-width: 782px) {
    .admin-bar .whs-sidebar {
        top: 46px;
        height: calc(100vh - 46px);
    }
}

/* ========================================
   SIDEBAR
   ======================================== */

.whs-sidebar {
    width: var(--sidebar-width);
    background: var(--surface-sidebar);
    border-right: 1px solid var(--border-subtle);
    padding: 32px 20px 32px 28px;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
    z-index: 50;
}

.whs-sidebar-logo {
    margin-bottom: 24px;
    padding: 0;
}

.whs-sidebar-logo .whs-logo-img {
    max-width: 140px;
    width: 100%;
    height: auto;
    max-height: 60px;
    object-fit: contain;
    object-position: left center;
    margin: 0 0 8px 0;
    display: block;
}

.whs-sidebar-logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--whs-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 4px 0;
}

.whs-sidebar-logo p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Progress Section */
.whs-progress-section {
    margin-bottom: 32px;
}

.whs-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.whs-progress-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.whs-progress-count {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--whs-purple);
}

.whs-progress-bar {
    height: 6px;
    background: rgba(55, 65, 81, 0.5);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.whs-progress-fill {
    height: 100%;
    background: var(--whs-gradient);
    border-radius: 3px;
    transition: width var(--transition-slow);
}

.whs-progress-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Sections Nav */
.whs-sections-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
}

.whs-sections-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.whs-section-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border-radius: 12px;
    cursor: pointer;
    transition: all var(--transition-normal);
    border: 1px solid transparent;
}

.whs-section-item:hover {
    background: var(--surface-card);
}

.whs-section-item.active {
    background: rgba(139, 92, 246, 0.15);
    border-color: var(--border-active);
}

.whs-section-item.completed {
    opacity: 0.7;
}

.whs-section-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    background: rgba(55, 65, 81, 0.5);
    transition: all var(--transition-normal);
}

.whs-section-item.active .whs-section-icon {
    background: var(--whs-gradient);
}

.whs-section-item.completed .whs-section-icon {
    background: rgba(16, 185, 129, 0.2);
}

.whs-section-info h3 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 2px 0;
}

.whs-section-info p {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 0;
}

/* Sidebar Navigation Links */
.whs-sidebar-nav-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border-subtle);
}

.whs-sidebar-nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: rgba(55, 65, 81, 0.2);
    border-radius: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: all var(--transition-fast);
}

.whs-sidebar-nav-link:hover {
    background: rgba(139, 92, 246, 0.15);
    color: var(--text-primary);
}

.whs-sidebar-nav-link .whs-nav-icon {
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

/* Sidebar Footer */
.whs-sidebar-footer {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-subtle);
}

.whs-sidebar-footer p {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ========================================
   MAIN CONTENT
   ======================================== */

.whs-main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, #1f2937, #111827);
    min-height: 100vh;
}

/* Header */
.whs-content-header {
    padding: 20px 40px;
    background: var(--surface-header);
    border-bottom: 1px solid var(--border-subtle);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.whs-layer-info span {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--whs-purple);
    letter-spacing: 0.02em;
}

.whs-layer-info h2 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 4px 0 0 0;
}

.whs-question-counter {
    font-size: 0.75rem;
    color: var(--text-secondary);
    background: rgba(55, 65, 81, 0.5);
    padding: 6px 12px;
    border-radius: 16px;
    white-space: nowrap;
    flex-shrink: 0;
}

.whs-question-counter strong {
    color: var(--text-primary);
}

/* Question Area */
.whs-question-area {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.whs-question-container {
    width: 100%;
    max-width: 680px;
}

/* Question Card */
.whs-question-card {
    background: var(--surface-card);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    padding: 40px;
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-card);
}

.whs-question-title {
    display: inline-block;
    background: rgba(45, 212, 191, 0.15);
    color: #2dd4bf;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 20px;
    margin-bottom: 16px;
    text-transform: none;
}

.whs-question-badge {
    display: inline-block;
    padding: 6px 12px;
    background: rgba(139, 92, 246, 0.2);
    color: var(--whs-purple-light);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 20px;
    margin-bottom: 12px;
}

.whs-question-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.4;
    margin: 0 0 24px 0;
}

/* ========================================
   QUESTION HEADER (Layer info at top)
   ======================================== */

.whs-question-header {
    padding: 24px 40px 20px;
    position: relative;
}

/* Gradient line removed - too much gradient visual noise */

.whs-layer-badge {
    display: block;
    margin-bottom: 4px;
}

.whs-layer-prefix {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--whs-purple);
    margin-right: 4px;
}

.whs-layer-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--whs-purple);
    text-transform: none;
    letter-spacing: normal;
}

.whs-layer-description {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 4px 0 0 0;
}

.whs-question-counter {
    position: absolute;
    top: 24px;
    right: 40px;
    font-size: 0.875rem;
    color: var(--text-muted);
    background: rgba(55, 65, 81, 0.5);
    padding: 8px 16px;
    border-radius: 20px;
}

.whs-question-counter strong {
    color: var(--whs-purple-light);
    font-weight: 600;
}

/* ========================================
   SLIDER COMPONENT
   ======================================== */

.whs-slider-component {
    margin-bottom: 24px;
}

.whs-slider-labels {
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px;
}

/* JS uses whs-label-left/right */
.whs-label-left,
.whs-slider-label-left {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--whs-purple);
}

.whs-label-right,
.whs-slider-label-right {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--whs-pink);
}

/* Slider Wrapper */
.whs-slider-wrapper {
    position: relative;
    margin-bottom: 20px;
}

/* Scale Numbers */
.whs-slider-scale {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    padding: 0 4px;
}

.whs-slider-scale span {
    width: 28px;
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Range Input */
.whs-slider-track {
    position: relative;
    margin-bottom: 32px;
}

.whs-slider-input {
    width: 100%;
    height: 12px;
    border-radius: 6px;
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    cursor: pointer;
    position: relative;
    z-index: 2;
}

.whs-slider-input::-webkit-slider-runnable-track {
    height: 12px;
    border-radius: 6px;
    background: rgba(55, 65, 81, 0.5);
}

.whs-slider-input::-webkit-slider-thumb {
    appearance: none;
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid var(--whs-purple);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), 0 0 0 2px rgba(139, 92, 246, 0.3);
    cursor: pointer;
    margin-top: -6px;
    transition: all var(--transition-fast);
}

.whs-slider-input::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), 0 0 0 4px rgba(139, 92, 246, 0.3);
}

.whs-slider-input::-moz-range-track {
    height: 12px;
    border-radius: 6px;
    background: rgba(55, 65, 81, 0.5);
}

.whs-slider-input::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid var(--whs-purple);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    cursor: pointer;
}

/* Slider Fill (behind the input) */
.whs-slider-fill-track {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 12px;
    border-radius: 6px;
    background: rgba(55, 65, 81, 0.5);
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

.whs-slider-fill {
    height: 100%;
    background: var(--whs-gradient);
    border-radius: 6px;
    transition: width var(--transition-fast);
}

/* Value Indicator - Hidden (level buttons show selection) */
.whs-slider-value {
    display: none;
}

/* Level Buttons (JS uses whs-slider-levels) */
.whs-level-buttons,
.whs-slider-levels {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.whs-level-btn {
    flex: 1;
    padding: 14px 16px;
    border: none;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    background: rgba(55, 65, 81, 0.6);
    color: var(--text-secondary);
    min-width: 60px;
}

.whs-level-btn:hover {
    background: rgba(55, 65, 81, 0.8);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.whs-level-btn.active {
    background: var(--whs-gradient);
    color: #fff;
    box-shadow: var(--shadow-button);
    transform: scale(1.02);
}

/* Level Description */
.whs-level-description {
    background: rgba(31, 41, 55, 0.6);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.whs-level-label {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--whs-purple);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.whs-level-text {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* ========================================
   CONFIDENCE INDICATOR
   ======================================== */

.whs-confidence-section {
    padding-top: 24px;
    margin-top: 24px;
    border-top: 1px solid var(--border-subtle);
}

.whs-confidence-label,
.whs-confidence-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 12px 0;
}

.whs-confidence-buttons {
    display: flex;
    gap: 8px;
}

.whs-confidence-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border: 1px solid transparent;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-normal);
    background: rgba(55, 65, 81, 0.5);
    color: var(--text-secondary);
    min-width: 110px;
}

.whs-confidence-btn:hover {
    border-color: var(--border-subtle);
    color: var(--text-primary);
}

.whs-confidence-btn.active {
    background: rgba(139, 92, 246, 0.2);
    border-color: var(--whs-purple);
    color: var(--whs-purple-light);
}

.whs-confidence-emoji {
    font-size: 1.25rem;
    line-height: 1;
}

/* Confidence Required State */
.whs-confidence-section.whs-confidence-required {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 12px;
    padding: 20px;
    margin-top: 24px;
    animation: pulse-attention 0.5s ease;
}

.whs-confidence-section.whs-confidence-required .whs-confidence-title {
    color: #fca5a5;
}

.whs-confidence-message {
    margin-top: 12px;
    padding: 10px 16px;
    background: rgba(239, 68, 68, 0.15);
    border-radius: 8px;
    font-size: 0.875rem;
    color: #fca5a5;
    text-align: center;
}

@keyframes pulse-attention {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

/* ========================================
   NAVIGATION
   ======================================== */

.whs-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 32px;
}

.whs-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 16px 32px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.whs-btn-secondary {
    background: rgba(55, 65, 81, 0.5);
    color: var(--text-primary);
    border: 1px solid rgba(75, 85, 99, 0.5);
}

.whs-btn-secondary:hover:not(:disabled) {
    background: rgba(55, 65, 81, 0.8);
}

.whs-btn-secondary:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.whs-btn-primary {
    background: var(--whs-gradient);
    color: #fff;
    box-shadow: var(--shadow-button);
}

.whs-btn-primary:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 24px rgba(139, 92, 246, 0.5);
}

/* ========================================
   ADDITIONAL QUESTIONS
   ======================================== */

.whs-additional-section {
    margin-bottom: 32px;
}

.whs-additional-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.whs-radio-group,
.whs-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.whs-radio-option,
.whs-checkbox-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    background: rgba(55, 65, 81, 0.3);
    border: 1px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.whs-radio-option:hover,
.whs-checkbox-option:hover {
    background: rgba(55, 65, 81, 0.5);
    border-color: var(--border-subtle);
}

.whs-radio-option.selected,
.whs-checkbox-option.selected {
    background: rgba(139, 92, 246, 0.1);
    border-color: var(--whs-purple);
}

.whs-radio-option input,
.whs-checkbox-option input {
    accent-color: var(--whs-purple);
    width: 18px;
    height: 18px;
    margin-top: 2px;
    flex-shrink: 0;
}

.whs-option-label {
    font-size: 0.9375rem;
    color: var(--text-primary);
}

.whs-genre-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.whs-text-input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(55, 65, 81, 0.3);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 0.9375rem;
    transition: all var(--transition-normal);
}

.whs-text-input:focus {
    outline: none;
    border-color: var(--whs-purple);
    background: rgba(55, 65, 81, 0.5);
}

.whs-text-input::placeholder {
    color: var(--text-muted);
}

/* ========================================
   LOGIN REQUIRED
   ======================================== */

.whs-paradigm-login-required {
    min-height: 100vh;
    background: var(--surface-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.whs-login-card {
    background: var(--surface-card);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    padding: 48px;
    text-align: center;
    max-width: 420px;
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-card);
}

.whs-login-icon {
    font-size: 3rem;
    margin-bottom: 24px;
}

.whs-login-card h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 16px 0;
}

.whs-login-card p {
    font-size: 1rem;
    color: var(--text-secondary);
    margin: 0 0 32px 0;
    line-height: 1.6;
}

.whs-login-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

/* ========================================
   CALCULATING ANIMATION
   ======================================== */

.whs-calculating-screen {
    min-height: 100vh;
    background: var(--surface-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.whs-calculating-content {
    text-align: center;
    max-width: 480px;
}

.whs-calculating-spinner {
    width: 80px;
    height: 80px;
    margin: 0 auto 32px;
    border-radius: 50%;
    border: 4px solid rgba(139, 92, 246, 0.2);
    border-top-color: var(--whs-purple);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.whs-calculating-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 12px 0;
}

.whs-calculating-step {
    font-size: 1rem;
    color: var(--whs-purple);
    margin: 0 0 24px 0;
}

.whs-calculating-progress {
    height: 6px;
    background: rgba(55, 65, 81, 0.5);
    border-radius: 3px;
    overflow: hidden;
}

.whs-calculating-progress-fill {
    height: 100%;
    background: var(--whs-gradient);
    border-radius: 3px;
    transition: width var(--transition-slow);
}

/* ========================================
   ERROR STATES
   ======================================== */

.whs-paradigm-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
}

.whs-paradigm-error a {
    color: var(--whs-purple-light);
}

/* ========================================
   MOBILE STYLES
   ======================================== */

@media (max-width: 1024px) {
    .whs-sidebar {
        display: none !important;
        visibility: hidden !important;
        width: 0 !important;
        position: absolute !important;
        left: -9999px !important;
    }
    
    .whs-main-content {
        margin-left: 0 !important;
        width: 100% !important;
    }
    
    .whs-assessment-layout {
        display: block;
    }
    
    /* Mobile Progress Bar (replaces sidebar) */
    .whs-mobile-progress {
        display: block !important;
        padding: 16px 20px;
        background: var(--surface-sidebar);
        border-bottom: 1px solid var(--border-subtle);
    }
    
    .whs-mobile-progress-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 12px;
    }
    
    .whs-mobile-progress-label {
        font-size: 0.875rem;
        color: var(--text-secondary);
    }
    
    .whs-mobile-progress-bar {
        height: 4px;
        background: rgba(55, 65, 81, 0.5);
        border-radius: 2px;
        overflow: hidden;
    }
    
    .whs-mobile-progress-fill {
        height: 100%;
        background: var(--whs-gradient);
        transition: width var(--transition-slow);
    }
    
    .whs-content-header {
        padding: 16px 20px;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .whs-content-header .whs-question-counter {
        display: none; /* Hide duplicate counter in header on mobile */
    }
    
    .whs-question-header {
        padding: 16px 20px 16px;
    }
    
    .whs-question-header .whs-question-counter {
        display: none; /* Hide counter in question header on mobile - already shown in mobile progress */
    }
    
    /* Smaller layer description on mobile to not compete with question text */
    .whs-layer-description {
        font-size: 0.875rem;
        margin: 2px 0 0 0;
    }
    
    .whs-question-area {
        padding: 20px;
    }
    
    .whs-question-card {
        padding: 24px;
    }
    
    .whs-question-text {
        font-size: 1.125rem;
    }
    
    .whs-level-buttons,
    .whs-slider-levels {
        flex-wrap: wrap;
        gap: 6px;
    }
    
    .whs-level-btn {
        flex: 0 0 calc(33.333% - 4px);
        padding: 10px 4px;
        font-size: 0.75rem;
        min-width: 0;
    }
    
    .whs-confidence-section {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .whs-confidence-buttons {
        width: 100%;
        display: flex;
        gap: 8px;
    }
    
    .whs-confidence-btn {
        flex: 1;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 14px 8px;
        font-size: 0.75rem;
        min-width: auto;
        gap: 6px;
    }
    
    .whs-confidence-emoji {
        font-size: 1.5rem;
        line-height: 1;
        display: block;
    }
    
    .whs-navigation {
        gap: 12px;
    }
    
    .whs-btn {
        padding: 14px 20px;
        font-size: 0.9375rem;
    }
    
    .whs-genre-grid {
        grid-template-columns: 1fr;
    }
}

/* Show mobile progress, hide desktop sidebar */
.whs-mobile-progress {
    display: none;
}

.whs-mobile-logo {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-subtle);
}

.whs-mobile-logo .whs-logo-img {
    max-width: 120px;
    width: 100%;
    height: auto;
    max-height: 50px;
    object-fit: contain;
    object-position: left center;
    margin-bottom: 4px;
}

.whs-mobile-logo h1 {
    font-size: 1.25rem;
    font-weight: 700;
    background: var(--whs-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 4px 0;
}

.whs-mobile-logo p {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin: 0;
}

@media (max-width: 1024px) {
    .whs-mobile-progress {
        display: block !important;
    }
}

/* ========================================
   ANIMATIONS
   ======================================== */

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

.whs-question-card {
    animation: fadeIn 0.3s ease-out;
}

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

.whs-level-description {
    animation: slideIn 0.2s ease-out;
}

/* ========================================
   PHASE 2: CONTEXT PAGE STYLES
   ======================================== */

.whs-context-section,
.whs-outcome-section {
    margin-bottom: 36px;
}

.whs-section-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.whs-section-subtitle {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

/* Checkbox Grid with Icons */
.whs-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

.whs-checkbox-grid .whs-checkbox-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 16px 12px;
    gap: 8px;
}

.whs-checkbox-grid .whs-checkbox-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.whs-option-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.whs-checkbox-grid .whs-option-label {
    font-size: 0.8125rem;
    line-height: 1.3;
}

/* Genre Approach Slider */
.whs-genre-slider-wrapper,
.whs-confidence-slider-wrapper {
    margin-top: 16px;
}

.whs-genre-labels,
.whs-confidence-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.whs-genre-description {
    margin-top: 16px;
    padding: 12px 16px;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 8px;
    font-size: 0.875rem;
    color: var(--whs-purple-light);
    text-align: center;
}

/* Methods Grid */
.whs-methods-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}

.whs-method-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 16px 12px;
    background: rgba(55, 65, 81, 0.3);
    border: 1px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    transition: all var(--transition-normal);
    gap: 8px;
}

.whs-method-item:hover {
    background: rgba(55, 65, 81, 0.5);
    border-color: var(--border-subtle);
}

.whs-method-item.selected {
    background: rgba(139, 92, 246, 0.15);
    border-color: var(--whs-purple);
}

.whs-method-rank {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    background: var(--whs-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    opacity: 0;
    transform: scale(0.5);
    transition: all var(--transition-normal);
}

.whs-method-item.selected .whs-method-rank {
    opacity: 1;
    transform: scale(1);
}

.whs-method-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.whs-method-label {
    font-size: 0.8125rem;
    color: var(--text-primary);
    line-height: 1.3;
}

/* ========================================
   PHASE 2: OUTCOME PAGE STYLES
   ======================================== */

.whs-outcome-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.whs-outcome-option {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: rgba(55, 65, 81, 0.3);
    border: 1px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.whs-outcome-option:hover {
    background: rgba(55, 65, 81, 0.5);
    border-color: var(--border-subtle);
}

.whs-outcome-option.selected {
    background: rgba(139, 92, 246, 0.15);
    border-color: var(--whs-purple);
}

.whs-outcome-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.whs-outcome-icon {
    font-size: 1.75rem;
    line-height: 1;
    flex-shrink: 0;
}

.whs-outcome-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.whs-outcome-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.whs-outcome-desc {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

/* Text Areas */
.whs-textarea {
    width: 100%;
    min-height: 100px;
    padding: 14px 16px;
    background: rgba(55, 65, 81, 0.3);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    color: #ffffff !important;
    font-size: 0.9375rem;
    font-family: inherit;
    line-height: 1.5;
    resize: vertical;
    transition: all var(--transition-normal);
    -webkit-text-fill-color: #ffffff !important;
}

.whs-textarea:focus {
    outline: none;
    border-color: var(--whs-purple);
    background: rgba(55, 65, 81, 0.5);
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

.whs-textarea::placeholder {
    color: var(--text-muted);
    -webkit-text-fill-color: var(--text-muted);
}

/* ========================================
   TRAIT SELECTION GRID (Who Thrives/Struggles)
   ======================================== */

.whs-select-hint {
    color: var(--text-muted);
    font-weight: 400;
    font-size: 0.8125rem;
}

.whs-trait-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.whs-trait-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    background: rgba(55, 65, 81, 0.3);
    border: 1px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
}

.whs-trait-option:hover {
    background: rgba(55, 65, 81, 0.5);
    border-color: var(--border-subtle);
}

.whs-trait-option.selected {
    background: rgba(139, 92, 246, 0.15);
    border-color: var(--whs-purple);
}

.whs-trait-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.whs-trait-icon {
    font-size: 1.25rem;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 2px;
}

.whs-trait-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.whs-trait-label {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
}

.whs-trait-desc {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.whs-trait-check {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 20px;
    height: 20px;
    background: var(--whs-purple);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: white;
    opacity: 0;
    transform: scale(0.8);
    transition: all var(--transition-fast);
}

.whs-trait-option.selected .whs-trait-check {
    opacity: 1;
    transform: scale(1);
}

/* ========================================
   PHASE 2: MOBILE RESPONSIVE ADDITIONS
   ======================================== */

@media (max-width: 768px) {
    .whs-section-subtitle {
        font-size: 0.75rem;
        margin-bottom: 12px;
    }
    
    .whs-checkbox-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .whs-methods-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .whs-outcome-option {
        padding: 14px 16px;
    }
    
    .whs-outcome-icon {
        font-size: 1.5rem;
    }
    
    .whs-textarea {
        min-height: 80px;
    }
    
    .whs-trait-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .whs-trait-option {
        padding: 12px 14px;
    }
}

@media (max-width: 480px) {
    .whs-checkbox-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    
    .whs-checkbox-grid .whs-checkbox-option {
        padding: 12px 8px;
    }
    
    .whs-option-icon {
        font-size: 1.25rem;
    }
    
    .whs-checkbox-grid .whs-option-label {
        font-size: 0.75rem;
    }
    
    .whs-methods-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    
    .whs-method-item {
        padding: 12px 8px;
    }
    
    .whs-method-icon {
        font-size: 1.25rem;
    }
    
    .whs-method-label {
        font-size: 0.75rem;
    }
    
    .whs-method-rank {
        width: 20px;
        height: 20px;
        font-size: 0.625rem;
    }
}

/* ========================================
   PHASE 3: OUTCOME CONFIDENCE BUTTONS
   ======================================== */

.whs-confidence-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.whs-conf-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 16px;
    background: var(--surface-card);
    border: 2px solid var(--border-subtle);
    border-radius: 12px;
    cursor: pointer;
    transition: all var(--transition-normal);
    text-align: center;
}

.whs-conf-btn:hover {
    background: var(--surface-card-hover);
    border-color: var(--border-active);
}

.whs-conf-btn.active {
    background: rgba(139, 92, 246, 0.15);
    border-color: var(--whs-purple);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.2);
}

.whs-conf-btn-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

.whs-conf-btn-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.whs-conf-btn-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.3;
}

@media (max-width: 768px) {
    .whs-confidence-buttons {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .whs-conf-btn {
        flex-direction: row;
        padding: 14px 16px;
        text-align: left;
        gap: 14px;
    }
    
    .whs-conf-btn-icon {
        font-size: 1.5rem;
        margin-bottom: 0;
    }
    
    .whs-conf-btn-content {
        flex: 1;
    }
}

/* ========================================
   PHASE 3: STRUGGLES SECTION COACHING
   ======================================== */

.whs-struggles-coaching {
    background: rgba(139, 92, 246, 0.08);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 16px;
}

.whs-struggles-coaching p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0 0 10px 0;
}

.whs-struggles-coaching p:last-child {
    margin-bottom: 0;
}

.whs-struggles-coaching strong {
    color: var(--text-primary);
}

.whs-required-hint {
    color: var(--whs-pink);
    font-weight: 500;
}

/* Escape hatch option styling */
.whs-trait-option.whs-escape-hatch {
    border-style: dashed;
    background: rgba(16, 185, 129, 0.05);
    border-color: rgba(16, 185, 129, 0.3);
}

.whs-trait-option.whs-escape-hatch:hover {
    border-color: rgba(16, 185, 129, 0.5);
    background: rgba(16, 185, 129, 0.1);
}

.whs-trait-option.whs-escape-hatch.selected {
    background: rgba(16, 185, 129, 0.15);
    border-color: #10b981;
}

.whs-trait-option.whs-escape-hatch .whs-trait-check {
    background: #10b981;
}

/* Validation styling */
.whs-struggles-validation {
    margin-top: 12px;
    padding: 12px 16px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
}

.whs-validation-message {
    color: #fca5a5;
    font-size: 0.875rem;
    margin: 0;
}

.whs-section-error {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

/* ========================================
   PHASE 3: UNIVERSALIST CHALLENGE MODAL
   ======================================== */

.whs-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

.whs-modal {
    background: var(--surface-sidebar);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.3s ease;
}

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

.whs-modal-content {
    padding: 32px;
}

.whs-modal-content h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin: 0 0 16px 0;
}

.whs-modal-content p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0 0 12px 0;
}

.whs-modal-content p:last-of-type {
    margin-bottom: 24px;
}

.whs-modal-content strong {
    color: var(--text-primary);
}

.whs-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.whs-modal-actions .whs-btn {
    width: 100%;
    justify-content: center;
}

.whs-btn-outline {
    background: transparent;
    border: 1px solid var(--border-active);
    color: var(--text-secondary);
}

.whs-btn-outline:hover {
    background: rgba(139, 92, 246, 0.1);
    color: var(--text-primary);
}

@media (max-width: 480px) {
    .whs-modal-content {
        padding: 24px;
    }
    
    .whs-modal-content h3 {
        font-size: 1.25rem;
    }
    
    .whs-modal-content p {
        font-size: 0.875rem;
    }
}
