/**
 * Handling Accuracy Test (Path Tracing) styles
 * Mobile-first, fluid layout.
 * @since 3.1.0
 */

.handling-accuracy-test-container {
    max-width: 960px;
    margin: 0 auto;
    padding: clamp(8px, 3vw, 24px);
    text-align: center;
    box-sizing: border-box;
}

/* ---------- Welcome ---------- */
.ha-welcome-screen .ha-title {
    font-size: clamp(1.3rem, 4vw, 2rem);
    margin-bottom: 4px;
}

.ha-start-icon {
    font-size: clamp(2.2rem, 8vw, 3.5rem);
    margin: 8px 0;
}

.ha-subtitle {
    color: #666;
    font-size: clamp(0.95rem, 2.8vw, 1.1rem);
    margin-bottom: 12px;
}

.ha-description {
    max-width: 620px;
    margin: 0 auto 18px;
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    line-height: 1.55;
}

.ha-info-boxes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(140px, 100%), 1fr));
    gap: 10px;
    max-width: 520px;
    margin: 0 auto 20px;
}

.ha-info-box {
    background: #f7f9fb;
    border: 1px solid #e3e8ee;
    border-radius: 10px;
    padding: 12px 8px;
}

.ha-info-icon { font-size: 1.4rem; }
.ha-info-label { color: #777; font-size: 0.8rem; margin-top: 4px; }
.ha-info-value { font-weight: 700; font-size: 1.15rem; }

.ha-start-button {
    display: inline-block;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 14px 42px;
    font-size: clamp(1rem, 3vw, 1.15rem);
    font-weight: 700;
    letter-spacing: 0.04em;
    cursor: pointer;
    min-height: 48px;
    touch-action: manipulation;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.ha-start-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.35);
}

.ha-instructions-box {
    max-width: 620px;
    margin: 22px auto 0;
    text-align: left;
    background: #f7f9fb;
    border: 1px solid #e3e8ee;
    border-radius: 10px;
    padding: 14px 18px;
}

.ha-instructions-box h3 { margin: 0 0 8px; font-size: 1rem; }
.ha-instructions-box ul { margin: 0; padding-left: 4px; list-style: none; }
.ha-instructions-box li { margin: 6px 0; font-size: 0.92rem; line-height: 1.5; }

/* ---------- Test screen ---------- */
.ha-hud {
    display: flex;
    justify-content: center;
    gap: clamp(10px, 4vw, 32px);
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.ha-hud-item {
    background: #f7f9fb;
    border: 1px solid #e3e8ee;
    border-radius: 10px;
    padding: 8px 16px;
    min-width: 90px;
}

.ha-hud-label { display: block; color: #777; font-size: 0.75rem; }
.ha-hud-value { display: block; font-weight: 700; font-size: 1.1rem; }

.ha-live-hint {
    color: #666;
    font-size: 0.9rem;
    min-height: 1.4em;
    margin: 6px 0 10px;
}

.ha-canvas-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
}

#handling-accuracy-canvas {
    max-width: 100%;
    border: 2px solid #e3e8ee;
    border-radius: 12px;
    touch-action: none;       /* the test owns all gestures */
    user-select: none;
    -webkit-user-select: none;
    cursor: crosshair;
}

/* ---------- Results ---------- */
.ha-results-icon { font-size: clamp(2.4rem, 9vw, 4rem); margin: 10px 0; }
.ha-results-title { font-size: clamp(1.2rem, 4vw, 1.8rem); margin: 4px 0; }
.ha-results-subtitle { color: #666; margin-bottom: 18px; }

.ha-results-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(140px, 100%), 1fr));
    gap: 10px;
    max-width: 520px;
    margin: 0 auto 18px;
}

.ha-result-stat {
    background: #f7f9fb;
    border: 1px solid #e3e8ee;
    border-radius: 10px;
    padding: 14px 8px;
}

.ha-result-stat-value { font-size: 1.5rem; font-weight: 800; }
.ha-result-stat-label { color: #777; font-size: 0.8rem; margin-top: 4px; }

.ha-round-breakdown {
    max-width: 420px;
    margin: 0 auto 16px;
}

.ha-round-row {
    display: flex;
    justify-content: space-between;
    padding: 7px 14px;
    border-bottom: 1px solid #eef1f4;
    font-size: 0.92rem;
}

.ha-round-row span:nth-child(2) { font-weight: 700; }

.ha-pass-message { margin: 12px auto 20px; max-width: 480px; }

.ha-success-message {
    background: #eafaf1;
    border: 1px solid #2ecc71;
    color: #1e8449;
    border-radius: 10px;
    padding: 12px 16px;
    font-weight: 600;
}

.ha-fail-message {
    background: #fdf3e7;
    border: 1px solid #e67e22;
    color: #b9640e;
    border-radius: 10px;
    padding: 12px 16px;
    font-weight: 600;
}

/* ---------- Small screens ---------- */
@media (max-width: 480px) {
    .ha-hud-item { padding: 6px 10px; min-width: 72px; }
    .ha-start-button { width: 100%; }
}
