/**
 * Quiz Research — Styles for Marine Alert Fatigue Study elements
 * Matches brand: Navy #1e3a5f, Orange #FF9800, Manrope font
 */

/* ── Research Info Bar (Tier 1, below header) ── */
.research-info-bar {
    text-align: center;
    padding: 8px 16px;
    font-size: clamp(8px, 2vw, 10px);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.4);
    background: rgba(30, 58, 95, 0.5);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    font-family: 'JetBrains Mono', 'Courier New', monospace;
}

/* ── Recording Indicator (Tier 1, top-right during quiz) ── */
.research-recording {
    position: fixed;
    top: 12px;
    right: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 1000;
    pointer-events: none;
}

.recording-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ef4444;
    animation: recording-pulse 1.5s ease-in-out infinite;
}

.recording-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.35);
    font-family: 'JetBrains Mono', 'Courier New', monospace;
}

@keyframes recording-pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* ── Landing Page Counter ── */
.research-counter {
    text-align: center;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    margin: 12px 0 4px;
    font-weight: 500;
}

.counter-number {
    font-weight: 700;
    color: #FF9800;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
}

/* ── Landing Badge (research / safety) ── */
.landing-badge-research {
    display: inline-block;
    padding: 4px 14px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #FF9800;
    background: rgba(255, 152, 0, 0.08);
    border: 1px solid rgba(255, 152, 0, 0.2);
    border-radius: 20px;
    margin-bottom: 16px;
}

.landing-doi {
    display: block;
    text-align: center;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.3);
    margin-top: 6px;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
}

.landing-doi a {
    color: rgba(255, 152, 0, 0.5);
    text-decoration: none;
}

.landing-doi a:hover {
    color: #FF9800;
}

/* ── Histogram (Results Page) ── */
.research-histogram {
    margin: 24px 0 16px;
    padding: clamp(14px, 4vw, 20px);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
}

.histogram-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255, 255, 255, 0.5);
    margin: 0 0 16px;
    text-align: center;
}

.hist-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.hist-row-user {
    /* Slight highlight for user's row */
}

.hist-label {
    width: clamp(42px, 12vw, 60px);
    font-size: clamp(0.62rem, 1.6vw, 0.72rem);
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    text-align: right;
    flex-shrink: 0;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
}

.hist-bar-track {
    flex: 1;
    height: clamp(20px, 5vw, 24px);
    background: rgba(255, 255, 255, 0.04);
    border-radius: 4px;
    overflow: hidden;
}

.hist-bar {
    height: 100%;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 4px;
    transition: width 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    align-items: center;
    padding-left: 8px;
    min-width: 0;
}

.hist-bar-user {
    background: rgba(255, 152, 0, 0.4);
}

.hist-pct {
    font-size: 0.68rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    white-space: nowrap;
}

.hist-bar-user .hist-pct {
    color: #FF9800;
}

.hist-you {
    font-size: 0.68rem;
    font-weight: 700;
    color: #FF9800;
    white-space: nowrap;
    flex-shrink: 0;
    animation: fadeIn 0.3s ease 0.8s both;
}

/* ── Results: Participant & Thanks ── */
.research-participant {
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    margin: 16px 0 8px;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
}

.research-thanks {
    text-align: center;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.4);
    margin: 0 0 12px;
    line-height: 1.5;
}

.research-doi-badge {
    display: inline-block;
    margin: 0 auto;
    padding: 4px 12px;
    font-size: 0.7rem;
    font-weight: 600;
    color: rgba(255, 152, 0, 0.6);
    background: rgba(255, 152, 0, 0.06);
    border: 1px solid rgba(255, 152, 0, 0.15);
    border-radius: 4px;
    text-decoration: none;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    text-align: center;
}

.research-doi-badge:hover {
    color: #FF9800;
    border-color: rgba(255, 152, 0, 0.3);
}

/* Center the DOI badge */
.research-doi-badge {
    display: block;
    width: fit-content;
    margin: 0 auto;
}

/* ── Methodology Footer ── */
.research-methodology {
    text-align: center;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.3);
    margin: 20px 0 8px;
    line-height: 1.5;
}

.research-methodology a {
    color: rgba(255, 152, 0, 0.5);
    text-decoration: none;
}

.research-methodology a:hover {
    color: #FF9800;
}

/* ── Data Point Label (replaces "Question X of Y") ── */
.data-point-label {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.4);
}

/* ── Responsive ── */
@media (max-width: 480px) {
    .research-info-bar {
        font-size: 8px;
        padding: 6px 10px;
        letter-spacing: 0.5px;
    }

    .hist-label {
        width: 48px;
        font-size: 0.65rem;
    }

    .hist-bar-track {
        height: 20px;
    }

    .research-recording {
        top: 8px;
        right: 8px;
    }

    .recording-label {
        font-size: 8px;
    }

    .research-histogram {
        padding: 14px;
        margin: 20px 0 12px;
    }

    .research-participant {
        font-size: 0.8rem;
    }
}

@media (max-width: 380px) {
    .hist-label {
        width: 42px;
        font-size: 0.6rem;
    }

    .hist-bar-track {
        height: 18px;
    }

    .hist-pct {
        font-size: 0.6rem;
    }

    .research-histogram {
        padding: 12px;
    }

    .research-thanks {
        font-size: 0.78rem;
    }

    .research-doi-badge {
        font-size: 0.65rem;
        padding: 3px 10px;
    }
}
