/*
 * Theme controls for the standalone public/static pages.
 * This file is intentionally not loaded by dashboard templates.
 */

html[data-theme="light"] {
    --ink: #f7f9fc;
    --surface: #ffffff;
    --surface-2: #eef3f8;
    --text: #111827;
    --muted: #4b5563;
    --border: rgba(15, 23, 42, 0.12);
    --teal: #087f70;
    --teal-dim: rgba(8, 127, 112, 0.12);
    --gold: #a16207;
    --gold-dim: rgba(161, 98, 7, 0.13);
}

html[data-theme="light"] body {
    background: var(--ink);
    color: var(--text);
}

html[data-theme="light"] header {
    background: rgba(255, 255, 255, 0.92);
    border-bottom-color: var(--border);
}

html[data-theme="light"] .auth-input {
    background: #ffffff;
    color: var(--text);
}

html[data-theme="light"] .btn-google:hover {
    background: var(--surface-2);
}

html[data-theme="light"] .nav-links a {
    color: var(--muted);
}

html[data-theme="light"] .nav-links a:hover,
html[data-theme="light"] .nav-links a[style*="color:var(--text)"] {
    color: var(--text);
}

html[data-theme="light"] .btn-ghost {
    color: var(--text);
    border-color: var(--border);
}

html[data-theme="light"] .btn-ghost:hover {
    border-color: var(--muted);
}

html[data-theme="light"] .prose h3,
html[data-theme="light"] .prose strong,
html[data-theme="light"] .breadcrumb .current,
html[data-theme="light"] td.feat {
    color: var(--text);
}

html[data-theme="light"] .prose p,
html[data-theme="light"] .prose ul,
html[data-theme="light"] .icon-list li,
html[data-theme="light"] .section-head p,
html[data-theme="light"] .simple-hero p.lede {
    color: var(--muted);
}

html[data-theme="light"] .theme-toggle {
    color: var(--text);
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    color: var(--text);
}

.theme-toggle-label {
    opacity: 0.72;
}

.theme-toggle-label.active {
    opacity: 1;
    font-weight: 600;
}

.theme-toggle-button {
    position: relative;
    width: 42px;
    height: 24px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface-2);
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.theme-toggle-button::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--text);
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.theme-toggle-button[aria-checked="true"] {
    background: var(--teal-dim);
    border-color: var(--teal);
}

.theme-toggle-button[aria-checked="true"]::after {
    transform: translateX(18px);
    background: var(--teal);
}

.theme-toggle-button:focus-visible {
    outline: 3px solid rgba(8, 127, 112, 0.28);
    outline-offset: 2px;
}

@media (max-width: 900px) {
    .theme-toggle {
        margin-top: 8px;
    }

    .nav-cta .theme-toggle {
        width: 100%;
        justify-content: flex-end;
    }
}

@media (max-width: 600px) {
    .theme-toggle-label {
        display: none;
    }
}