/* Colour theme switcher (partials/_theme_switcher.html, theme-init.js).
   The button shows only the icon of the current choice, read from
   data-theme-choice on <html>: it is set in <head>, so the right icon is
   there from the first frame. Without the attribute (no script) the
   system's icon stands, which is what the page follows then. */
.theme-switcher__icon {
    display: none;
}

html[data-theme-choice="light"] .theme-switcher__icon[data-theme-icon="light"],
html[data-theme-choice="dark"] .theme-switcher__icon[data-theme-icon="dark"],
html[data-theme-choice="auto"] .theme-switcher__icon[data-theme-icon="auto"],
html:not([data-theme-choice]) .theme-switcher__icon[data-theme-icon="auto"] {
    display: inline-block;
}

/* The option in use: a check at the end of the line and bolder text. The
   check is not the only sign (aria-checked tells the screen readers). */
.theme-switcher__check {
    margin-inline-start: auto;
    padding-inline-start: 1rem;
    visibility: hidden;
}

.theme-switcher__option[aria-checked="true"] {
    font-weight: var(--tblr-font-weight-medium, 500);
}

.theme-switcher__option[aria-checked="true"] .theme-switcher__check {
    visibility: visible;
    color: var(--tblr-primary);
}

/* The pages without bars (layouts/_blank.html: sign-in, password reset):
   the switcher sits in the top corner, out of the way of the card. */
.theme-switcher-corner {
    position: absolute;
    top: .75rem;
    inset-inline-end: .75rem;
    z-index: 2;
}
