/* Shared desktop and mobile theme switch. */
.theme-switch { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 10px; margin: 0; border: 1px solid #dce4e8; border-radius: 999px; background: #f5f7f8; color: #526777; font-family: inherit; font-size: 11px; font-weight: 500; cursor: pointer; flex-shrink: 0; }
.theme-switch:hover { border-color: #a5b4c2; }
.theme-switch svg { display: block; width: 20px; height: 20px; flex-shrink: 0; }
.theme-switch .theme-switch-moon { display: none; }
html.dark-scheme .theme-switch .theme-switch-sun { display: none; }
html.dark-scheme .theme-switch .theme-switch-moon { display: block; }
.theme-switch input { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip-path: inset(50%); }
.theme-switch-track { position: relative; display: block; flex-shrink: 0; width: 40px; height: 24px; border-radius: 999px; background: #a5b4c2; transition: background-color .2s ease; }
.theme-switch-track::before { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / 18%); transition: transform .2s ease; }
.theme-switch input:checked + .theme-switch-track { background: #084fb9; }
.theme-switch input:checked + .theme-switch-track::before { transform: translateX(16px); }
.theme-switch input:focus-visible + .theme-switch-track { outline: 2px solid #4a8bd1; outline-offset: 3px; }
#mobile-navbar-menu .kudagang-header-bnts.nav-buttons.mobile-menu-actions:has(.theme-switch) { grid-template-columns: repeat(2,minmax(0,1fr)) !important; gap: 12px !important; }
#mobile-navbar-menu .mobile-menu-actions .theme-switch { grid-column: 1 / -1; justify-self: start; }
#mobile-navbar-menu .mobile-menu-actions:not(:has(.mobile-logout-btn)) .connect-btn { grid-column: 1 / -1; }
html.dark-scheme .theme-switch { color-scheme: dark; background: #19283b; border-color: #2c4059; color: #edf4ff; }
html.dark-scheme .theme-switch:hover { border-color: #45658a; }
html.dark-scheme .theme-switch input:checked + .theme-switch-track { background: #bcfe5a; }
html.dark-scheme .theme-switch input:checked + .theme-switch-track::before { background: #19283b; }
@media (prefers-reduced-motion: reduce) { .theme-switch-track, .theme-switch-track::before { transition: none; } }
