/* --- Cronômetro / Stopwatch --- */

.stopwatch-display {
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
    font-size: 3.4rem;
    font-weight: 500;
    letter-spacing: -0.02em;
    text-align: center;
    color: var(--ink);
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 26px 12px;
    margin-bottom: 18px;
    transition: border-color 0.15s, color 0.15s;
}

.stopwatch-display.is-running {
    color: var(--accent-deep);
    border-color: var(--accent);
}

.stopwatch-cs {
    font-size: 0.55em;
    color: var(--muted);
}

.stopwatch-controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.stopwatch-controls .calc-submit,
.stopwatch-controls .code-button-secondary {
    min-width: 120px;
    padding: 12px 22px;
    font-size: 0.95rem;
}

.stopwatch-controls .code-button-secondary {
    font-weight: 500;
}

.stopwatch-controls button:disabled,
.stopwatch-laps-head button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.stopwatch-controls .code-button-secondary:disabled:hover {
    border-color: var(--line);
    color: var(--muted);
}

.stopwatch-hint {
    font-size: 0.8rem;
    color: var(--muted);
    text-align: center;
    margin: 14px 0 0;
}

.stopwatch-hint kbd {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 1px 6px;
    color: var(--ink);
}

/* --- Voltas --- */

.stopwatch-laps-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.stopwatch-laps-head .calc-card-title {
    margin: 0;
}

.stopwatch-laps-wrap {
    max-height: 360px;
    overflow-y: auto;
}

.stopwatch-laps-wrap .result-table td:not(:first-child),
.stopwatch-laps-wrap .result-table th:not(:first-child) {
    font-family: var(--font-mono);
}

.stopwatch-empty {
    color: var(--muted);
    font-family: var(--font-sans) !important;
    text-align: center !important;
    padding: 18px 10px !important;
}

.lap-best td {
    color: var(--accent-deep);
    font-weight: 600;
}

.lap-worst td {
    color: var(--danger);
    font-weight: 600;
}

.lap-badge {
    font-family: var(--font-sans);
    font-size: 0.68rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    background: var(--accent-soft);
    color: var(--accent-deep);
    border-radius: 4px;
    padding: 2px 6px;
    margin-left: 6px;
    white-space: nowrap;
}

.lap-worst .lap-badge {
    background: var(--danger-soft);
    color: var(--danger);
}

@media (max-width: 600px) {
    .stopwatch-display {
        font-size: 2.3rem;
        padding: 20px 8px;
    }
    .stopwatch-controls .calc-submit,
    .stopwatch-controls .code-button-secondary {
        flex: 1 1 100px;
        min-width: 0;
    }
    .stopwatch-hint {
        display: none;
    }
}