/* GRQ Health Dashboard — shared theme-toggle control styling (Issues #161, #163).
   Loaded by every dashboard page. Styles the single icon-only cycling button so
   it can sit on any background without pulling in page-specific rules. */

.theme-toggle {
    display: inline-flex;
    z-index: 1050;
}

/* When no header placeholder exists (simple.html, log-viewer.html) the control
   is created as a fixed button in the top-right corner. */
.theme-toggle--floating {
    position: fixed;
    top: 12px;
    right: 12px;
}

/* On the main dashboard the control sits at the top-right of the header. */
.header .theme-toggle {
    position: absolute;
    top: 0;
    right: 0;
}

/* Single compact circular button — narrow enough not to overlap the header
   title on mobile widths (Issue #163). */
.theme-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 999px;
    padding: 0;
    line-height: 1;
    cursor: pointer;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(6px);
    transition: background 0.2s ease, transform 0.1s ease;
}

.theme-toggle-btn:hover {
    background: rgba(0, 0, 0, 0.42);
}

.theme-toggle-btn:active {
    transform: scale(0.94);
}

.theme-toggle-btn:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

.theme-toggle-icon {
    font-size: 1.1rem;
}

/* Dark theme: lighten the scrim so the button stays legible on dark surfaces. */
[data-theme="dark"] .theme-toggle-btn {
    background: rgba(255, 255, 255, 0.16);
}

[data-theme="dark"] .theme-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.26);
}
