/* Source component: 液态玻璃按钮_clean.html via reference-public.css.
   Preserve its wrap, shadow, button, border and text highlight layers.
   Only the inner decoration moves: the native theme button stays a fixed hit target. */

.theme-switch[data-theme-toggle],
.theme-switch[data-theme-toggle]:is(:hover, :active, :focus-visible) {
  inline-size: var(--theme-toggle-width, 84px);
  block-size: 40px;
  min-inline-size: var(--theme-toggle-width, 84px);
  min-block-size: 40px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transform: none;
  translate: none;
  scale: none;
  rotate: none;
  transition: box-shadow 120ms ease;
  touch-action: manipulation;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.theme-switch[data-theme-toggle]:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 4px;
}

/* Decorative descendants and pseudo-elements never intercept pointer input. */
.theme-switch[data-theme-toggle] *,
.theme-switch[data-theme-toggle]::before,
.theme-switch[data-theme-toggle]::after,
.theme-toggle-shell .glass-button-shadow,
.theme-toggle-shell .glass-button-shadow::after {
  pointer-events: none;
}

.theme-switch[data-theme-toggle] [data-theme-icon] {
  flex: none;
}

.theme-switch[data-theme-toggle] [data-theme-icon][hidden] {
  display: none;
}

.theme-toggle-shell.glass-button-wrap,
.theme-toggle-shell.glass-button-wrap:has(.glass-button:active) {
  flex: none;
  transform: none;
  transition: none;
}

.theme-toggle-shell .glass-button.theme-switch,
.theme-toggle-shell .glass-button.theme-switch:is(:hover, :active, :focus-visible) {
  backdrop-filter: blur(2px);
}

.theme-toggle-shell .glass-button.theme-switch::after {
  transition: --angle-1 140ms ease;
}

.theme-toggle-shell .theme-switch .glass-button-text {
  inline-size: 100%;
  block-size: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  transition: transform 100ms cubic-bezier(.25, 1, .5, 1);
}

.theme-toggle-shell .theme-switch:active .glass-button-text {
  transform: translateY(1px) rotateX(25deg);
}

.theme-toggle-shell .glass-button-text::after {
  transition: background-position 140ms cubic-bezier(.25, 1, .5, 1), --angle-2 140ms ease;
}

.theme-toggle-shell.glass-button-wrap .glass-button-shadow,
.theme-toggle-shell.glass-button-wrap:is(:hover, :active) .glass-button-shadow {
  filter: blur(2px);
  transition: none;
}

.theme-toggle-shell .glass-button-shadow::after {
  transition: opacity 120ms ease;
}

.admin-auth__theme[data-theme-toggle] {
  --theme-toggle-width: 40px;
}

@media (max-width: 760px) {
  .header-actions .theme-toggle-shell {
    --theme-toggle-width: 40px;
  }
}

@media (max-width: 620px) {
  .admin-topbar .theme-switch[data-theme-toggle] {
    --theme-toggle-width: 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .theme-switch[data-theme-toggle],
  .theme-switch[data-theme-toggle] *,
  .theme-switch[data-theme-toggle]::after,
  .theme-toggle-shell .glass-button-text::after,
  .theme-toggle-shell .glass-button-shadow::after {
    transition: none !important;
  }

  .theme-toggle-shell .theme-switch:active .glass-button-text {
    transform: none;
  }
}
