/* -- modals.css -- Verdict Alpha -- */

/* ── Modal Base (Shared with ui.css or moved here) ──────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(18, 18, 26, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 900;
    padding: 20px;
}
.modal-card {
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: modalIn 0.2s ease;
}
@keyframes modalIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.modal-title {
    font-size: 1.1rem;
    font-weight: 700;
}
.modal-close {
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
}
.modal-close:hover {
    color: var(--text);
}

/* ── Welcome Modal ─────────────────────────────────────────── */
.welcome-card {
    max-width: 420px;
    text-align: center;
}
.welcome-body {
    padding: 20px;
}
.welcome-body p {
    color: var(--text-dim);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 20px;
}
.welcome-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.welcome-actions .btn-primary {
    width: 100%;
    padding: 12px;
    font-size: 1rem;
}
.welcome-actions .btn-secondary {
    width: 100%;
    padding: 10px;
    font-size: 0.9rem;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-dim);
}
.welcome-actions .btn-secondary:hover {
    background: var(--surface);
    color: var(--text);
}
.welcome-sub {
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-top: -4px;
    margin-bottom: 8px;
}

/* ── Evaluation Result Modal ───────────────────────────────── */
.eval-card {
    max-width: 380px;
    text-align: center;
}
.eval-body {
    padding: 20px;
}
.eval-elo {
    font-size: 3rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 4px;
}
.eval-level {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.eval-stats {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 24px;
    padding: 14px;
    background: var(--surface);
    border-radius: 10px;
    border: 1px solid var(--border);
}
.eval-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.eval-stat-label {
    font-size: 0.7rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.eval-stat-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
}
.eval-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ── Time Report Modal ─────────────────────────────────────── */
.time-report-card {
    max-width: 540px;
}
.time-report-body {
    padding: 16px;
}
.time-report-body canvas {
    width: 100%;
    height: 180px;
    background: var(--bg);
    border-radius: 8px;
    border: 1px solid var(--border);
}
.time-report-legend {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 8px;
    margin-bottom: 12px;
}
.legend-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    color: var(--text-dim);
}
.legend-color {
    width: 10px;
    height: 10px;
    border-radius: 2px;
    display: inline-block;
}
.time-insights {
    background: var(--surface);
    border-radius: 8px;
    padding: 12px;
    border: 1px solid var(--border);
}
.time-insight-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 10px;
}
.time-insight-stat {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
}
.time-insight-stat .label {
    color: var(--text-dim);
}
.time-insight-stat .value {
    font-weight: 700;
    color: var(--text);
}
.time-insight-details {
    font-size: 0.8rem;
    color: var(--text-dim);
    line-height: 1.5;
}

/* ── Profile Modal ─────────────────────────────────────────── */
.profile-card {
    max-width: 400px;
}
.profile-body {
    padding: 16px;
}
.profile-body canvas {
    display: block;
    margin: 0 auto 12px;
}
.profile-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}
.profile-dimensions {
    margin-bottom: 14px;
}
.profile-dim-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    font-size: 0.8rem;
}
.profile-dim-label {
    width: 90px;
    color: var(--text-dim);
    text-align: right;
}
.profile-dim-bar {
    flex: 1;
    height: 8px;
    background: var(--bg);
    border-radius: 4px;
    overflow: hidden;
}
.profile-dim-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.4s ease;
}
.profile-dim-value {
    width: 30px;
    font-weight: 700;
    font-size: 0.8rem;
    text-align: right;
}
.profile-suggestions {
    background: var(--surface);
    border-radius: 8px;
    padding: 10px;
    border: 1px solid var(--border);
}
.profile-suggestions-title {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text);
    margin-bottom: 8px;
}
.profile-suggestion-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}
.profile-suggestion-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}
.profile-suggestion-score {
    font-size: 0.75rem;
    font-weight: 700;
    color: #f44336;
    background: rgba(244, 67, 54, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
}
.profile-suggestion-text {
    font-size: 0.8rem;
    color: var(--text-dim);
    line-height: 1.4;
}

/* ── Drill Modal ────────────────────────────────────────────── */
.drill-card {
    max-width: 480px;
}
.drill-body {
    padding: 20px;
}
.drill-instruction {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 16px;
    text-align: center;
}
.drill-board-wrap {
    width: 100%;
    max-width: 320px;
    aspect-ratio: 1 / 1;
    margin: 0 auto 16px;
}
.drill-feedback {
    text-align: center;
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    margin-bottom: 16px;
}
.drill-actions {
    display: flex;
    justify-content: center;
}
