/* Copyright (c) a2 sport — https://amiraliyaghouti.com
 * A2 sun/moon switch 1.0.0. Canonical source: mu-plugins/assets/a2-theme-switch.css.
 * Extracted from Javaherian's a2-user-panel-theme.php. Copies must stay identical.
 * The host owns theme storage and palette; aria-checked=true means dark is active.
 */
html body button.a2ptheme.a2ptheme {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: none;
  box-sizing: border-box;
  width: 68px !important;
  min-width: 68px !important;
  height: 44px !important;
  min-height: 44px !important;
  padding: 8px !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: transparent !important;
  box-shadow: none !important;
  outline: none !important;
  font: inherit;
  line-height: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
html body button.a2ptheme.a2ptheme[hidden] {
  display: none !important;
}
html body button.a2ptheme.a2ptheme:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}
html body button.a2ptheme.a2ptheme:is(:hover, :focus, :active) {
  background: transparent !important;
  box-shadow: none !important;
  outline: none !important;
  transform: none !important;
}
.a2ptheme .a2ptheme__track {
  position: relative;
  display: block;
  flex: none;
  width: 52px;
  height: 28px;
  border-radius: 999px;
  overflow: hidden;
  background: linear-gradient(180deg, #7fc0ec 0%, #bfe2fa 100%);
  box-shadow: inset 0 1px 3px rgba(20, 40, 70, 0.22);
}
.a2ptheme[aria-checked="true"] .a2ptheme__track {
  background: linear-gradient(180deg, #151d38 0%, #2a3358 100%);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5);
}
.a2ptheme .a2ptheme__clouds {
  position: absolute;
  top: 9px;
  inset-inline-end: 7px;
  width: 13px;
  height: 7px;
  border-radius: 999px;
  background: #fdfdff;
  box-shadow:
    -5px 2px 0 -1px #f2f6fb,
    4px 2px 0 -2px #eef3f9;
  opacity: 1;
  transition: opacity 180ms ease;
}
.a2ptheme[aria-checked="true"] .a2ptheme__clouds {
  opacity: 0;
}
.a2ptheme .a2ptheme__stars {
  position: absolute;
  top: 8px;
  inset-inline-start: 9px;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: #fff;
  opacity: 0;
  box-shadow:
    5px -4px 0 -0.5px #fff,
    10px 3px 0 -0.5px #fff,
    3px 7px 0 -0.5px #fff,
    14px -2px 0 -0.5px #fff,
    8px 9px 0 -0.7px #fff;
  transition: opacity 180ms ease;
}
.a2ptheme[aria-checked="true"] .a2ptheme__stars {
  opacity: 1;
}
.a2ptheme .a2ptheme__thumb {
  position: absolute;
  top: 3px;
  inset-inline-start: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(
    circle at 38% 34%,
    #fff6b0 0%,
    #ffe14d 45%,
    #f7c214 100%
  );
  box-shadow:
    0 0 0 3px rgba(255, 225, 77, 0.32),
    0 1px 3px rgba(80, 60, 0, 0.3);
  transition: transform 180ms ease;
}
.a2ptheme[aria-checked="true"] .a2ptheme__thumb {
  background: radial-gradient(
    circle at 38% 34%,
    #f4f6fb 0%,
    #d8dde8 55%,
    #b9c0d0 100%
  );
  box-shadow:
    0 0 0 3px rgba(220, 228, 245, 0.16),
    0 1px 3px rgba(0, 0, 0, 0.45),
    inset -4px 3px 0 -2.4px #c3cad9,
    inset 3px -4px 0 -3px #ccd2df;
  transform: translateX(24px);
}
.a2ptheme[aria-checked="true"]:dir(rtl) .a2ptheme__thumb {
  transform: translateX(-24px);
}
html body button.a2ptheme.a2ptheme:focus-visible .a2ptheme__track {
  outline: 2px solid
    var(
      --a2-theme-switch-focus,
      var(--a2sf-gold, var(--focus, var(--a2crm-accent, #82661f)))
    ) !important;
  outline-offset: 3px !important;
}
@media (hover: hover) and (pointer: fine) {
  .a2ptheme:not(:disabled):hover .a2ptheme__track {
    filter: brightness(1.04);
  }
}
@media (prefers-reduced-motion: reduce) {
  .a2ptheme .a2ptheme__thumb,
  .a2ptheme .a2ptheme__clouds,
  .a2ptheme .a2ptheme__stars {
    transition: none;
  }
}
@media (forced-colors: active) {
  .a2ptheme .a2ptheme__track {
    outline: 1px solid ButtonText;
  }
  .a2ptheme .a2ptheme__thumb {
    background: ButtonText;
  }
  .a2ptheme[aria-checked="true"] .a2ptheme__thumb {
    background: Highlight;
  }
}
