/**
 * controls.css
 * Page-specific styles for clock-controls.html
 * Fixed dark terminal theme (intentional — not system-preference responsive)
 * Load order: after global.css, before utilities.css
 */

/* ===== DESIGN TOKENS (controls page overrides) ===== */
/* These override the global light/dark tokens for this fixed-dark panel */
:root {
    --ctrl-bg:           #141211;
    --ctrl-bg-panel:     #1a1917;
    --ctrl-bg-section:   #1f1d1b;
    --ctrl-bg-input:     #141211;
    --ctrl-text:         #e6ecf0;
    --ctrl-text-muted:   #8a9299;
    --ctrl-text-dim:     #556068;
    --ctrl-border:       rgba(242, 249, 255, 0.12);
    --ctrl-border-focus: #8ab4d4;
    --ctrl-accent:       #415e70;
    --ctrl-accent-hover: #527a96;
    --ctrl-accent-active:#2e4452;
    --ctrl-status:       #8ab4d4;
    --ctrl-link:         #8ab4d4;
    --ctrl-link-hover:   #b0cfea;
    --ctrl-danger:       #ff1b0e;
}

/* ===== RESET ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ===== BASE ===== */
body {
    align-items: flex-start;
    background: var(--ctrl-bg);
    color: var(--ctrl-text);
    display: flex;
    flex-direction: column;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.875em;
    justify-content: flex-start;
    line-height: 1.6;
    min-height: 100dvh;
    padding: 3rem 1.5rem 4rem;
}

/* ===== LAYOUT ===== */
.panel {
    width: 100%;
    max-width: 460px;
}

/* ===== NAV ===== */
.panel-nav {
    align-items: center;
    border-bottom: 1px solid var(--ctrl-border);
    display: flex;
    justify-content: space-between;
    margin-bottom: 2.5rem;
    padding-bottom: 1rem;
}

.panel-nav-link {
    color: var(--ctrl-link);
    font-size: 0.8em;
    letter-spacing: 0.06em;
    text-decoration: none;
    transition: color 0.2s ease;
}

.panel-nav-link:hover {
    color: var(--ctrl-link-hover);
}

.panel-nav-link:focus-visible {
    outline: 2px solid var(--ctrl-border-focus);
    outline-offset: 2px;
}

.panel-nav-id {
    color: var(--ctrl-text-dim);
    font-size: 0.7em;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

/* ===== HEADINGS ===== */
.panel-title {
    color: var(--ctrl-text-muted);
    font-size: 0.85em;
    letter-spacing: 0.18em;
    margin-bottom: 2rem;
    text-transform: uppercase;
}

.section-title {
    border-bottom: 1px solid var(--ctrl-border);
    color: var(--ctrl-text-dim);
    font-size: 0.65em;
    letter-spacing: 0.16em;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    text-transform: uppercase;
}

/* ===== SECTIONS ===== */
.ctrl-section {
    background: var(--ctrl-bg-section);
    border: 1px solid var(--ctrl-border);
    border-radius: 4px;
    margin-bottom: 1rem;
    padding: 1.25rem 1.5rem;
}

/* ===== RADIO LABELS ===== */
/* Wrapping label pattern — input nested inside label for implicit association */
.ctrl-radio-label {
    align-items: center;
    color: var(--ctrl-text-muted);
    cursor: pointer;
    display: flex;
    font-size: 0.9em;
    gap: 0.6rem;
    margin-bottom: 0.4rem;
    transition: color 0.15s ease;
}

.ctrl-radio-label:hover,
.ctrl-radio-label.is-active {
    color: var(--ctrl-text);
}

input[type="radio"] {
    accent-color: var(--ctrl-accent);
    cursor: pointer;
    height: 14px;
    width: 14px;
}

/* ===== FIELD ROWS ===== */
.ctrl-field {
    align-items: center;
    display: flex;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.ctrl-field-label {
    color: var(--ctrl-text-muted);
    font-size: 0.85em;
    min-width: 9rem;
}

/* ===== TEXT & NUMBER INPUTS ===== */
input[type="number"],
input[type="text"] {
    background: var(--ctrl-bg-input);
    border: 1px solid rgba(242, 249, 255, 0.18);
    border-radius: 3px;
    color: var(--ctrl-text);
    font-family: inherit;
    font-size: inherit;
    padding: 0.4rem 0.7rem;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
    width: 8rem;
}

input[type="number"]:focus,
input[type="text"]:focus {
    border-color: var(--ctrl-border-focus);
    box-shadow: 0 0 0 2px rgb(138 180 212 / 0.18);
    outline: none;
}

/* ===== BUTTON ===== */
.ctrl-btn {
    align-items: center;
    background: var(--ctrl-accent);
    border: none;
    border-radius: 3px;
    color: #ffffff;
    cursor: pointer;
    display: inline-flex;
    font-family: inherit;
    font-size: 0.85em;
    gap: 0.4rem;
    letter-spacing: 0.06em;
    margin-top: 0.75rem;
    padding: 0.55rem 1.4rem;
    text-decoration: none;
    transition: background 0.2s ease;
}

.ctrl-btn:hover  { background: var(--ctrl-accent-hover); }
.ctrl-btn:active { background: var(--ctrl-accent-active); }

.ctrl-btn:focus-visible {
    outline: 2px solid var(--ctrl-border-focus);
    outline-offset: 2px;
}

/* ===== NOTES ===== */
.ctrl-note {
    color: var(--ctrl-text-dim);
    font-size: 0.72em;
    line-height: 1.5;
    margin-top: 0.6rem;
}

/* ===== STATUS ===== */
.ctrl-status {
    color: var(--ctrl-status);
    font-size: 0.78em;
    margin-top: 0.5rem;
    min-height: 1.2rem;
}

/* ===== STATE ===== */
.is-hidden { display: none; }

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
    .ctrl-btn,
    .ctrl-radio-label,
    input[type="number"],
    input[type="text"] {
        transition: none;
    }
}
