/* One-click theme switch (storefront header and admin user tools): light → dark → system → light. */
.theme-switch-button { position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); color: var(--color-text-2); cursor: pointer; transition: border-color var(--duration-fast) var(--ease), color var(--duration-fast) var(--ease); -webkit-tap-highlight-color: transparent }
.theme-switch-button[hidden] { display: none }
.theme-switch-button:hover { border-color: var(--color-control-border); color: var(--color-text) }
.theme-switch-button:active { transform: scale(.94) }
.theme-switch-button:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px }
/* The icon shows what is rendered; the «А» badge marks that the mode is "as in the system". */
.theme-icon { display: none; width: 20px; height: 20px }
:root[data-scheme="light"] .theme-icon-light, :root[data-scheme="dark"] .theme-icon-dark, :root:not([data-scheme]) .theme-icon-light { display: block }
.theme-switch-badge { display: none; position: absolute; right: -4px; bottom: -4px; min-width: 16px; height: 16px; padding: 0 3px; border: 2px solid var(--color-bg); border-radius: var(--radius-pill); background: var(--color-primary); color: var(--color-on-primary); font: 700 9px/12px var(--font-sans, sans-serif); text-align: center; box-sizing: border-box }
:root[data-theme="auto"] .theme-switch-badge, :root:not([data-theme]) .theme-switch-badge { display: block }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0 }
