/* Stopwatch Specific UI */

.hidden { display: none !important; }

.sw-workspace {
    max-width: 600px !important;
    text-align: center;
}

/* Big Display Box */
.sw-display-box {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 40px 20px;
    margin-bottom: 30px;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.02);
}

.sw-time-text {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: clamp(3rem, 8vw, 4.5rem);
    font-weight: 800;
    color: var(--text-main);
    line-height: 1;
    letter-spacing: -1px;
}

.sw-ms-digit {
    color: var(--primary);
    font-size: 0.6em; /* Smaller size for milliseconds */
    margin-left: 2px;
}

/* Buttons Grid */
.sw-controls-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.sw-controls-full {
    margin-bottom: 25px;
}

.sw-controls-full button {
    width: 100%;
}

/* Dynamic Button Colors via CSS Classes */
.sw-btn-stop {
    background: #ef4444 !important;
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.25) !important;
}

.sw-btn-stop:hover {
    background: #dc2626 !important;
}

/* Lap Table Styling */
.sw-lap-container {
    max-height: 280px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg-card);
    animation: fadeIn 0.4s ease;
}

/* Custom Scrollbar for Laps */
.sw-lap-container::-webkit-scrollbar { width: 6px; }
.sw-lap-container::-webkit-scrollbar-track { background: var(--bg-secondary); border-radius: 10px; }
.sw-lap-container::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }

.sw-lap-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.sw-lap-table th {
    padding: 15px 10px;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
    position: sticky;
    top: 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
}

.sw-lap-table td {
    padding: 12px 10px;
    color: var(--text-main);
    border-bottom: 1px solid var(--border);
    font-family: 'Consolas', monospace; /* Keeps numbers aligned */
    font-weight: 600;
}

.sw-lap-table tr:last-child td {
    border-bottom: none;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .sw-display-box { padding: 30px 10px; }
    .sw-time-text { font-size: 2.8rem; }
}
