/* WebM8 1.9.70 — compact sky switch for the shared Hallmark header.
   Uses WebM8's existing #theme-toggle and theme.js; never creates a second theme system. */
.theme-control.celestial-toggle {
  display: inline-flex;
  flex: 0 0 auto;
  justify-content: center;
  align-items: center;
  width: 80px;
  height: 42px;
  padding: 2px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  line-height: normal;
  vertical-align: middle;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.theme-control.celestial-toggle:hover {
  background: transparent;
  color: inherit;
  opacity: 1;
}
.theme-control.celestial-toggle:active { opacity: 1; }
.theme-control.celestial-toggle:focus-visible {
  outline: 2px solid var(--accent, #744fb3);
  outline-offset: 2px;
}
.celestial-toggle .sky-switch {
  position: relative;
  display: block;
  overflow: hidden;
  isolation: isolate;
  width: 74px;
  height: 36px;
  flex: 0 0 74px;
  border-radius: 999px;
  background: linear-gradient(145deg,#63b5f6 0%,#c9edff 100%);
  box-shadow: inset 0 0 0 1px #1c35561e, inset 0 2px 6px #14466b26;
  transition: background .48s ease, box-shadow .48s ease;
  pointer-events: none;
}
:root[data-theme="dark"] .celestial-toggle .sky-switch {
  background: linear-gradient(145deg,#141d3b 0%,#514481 100%);
  box-shadow: inset 0 0 0 1px #b7b0ec55, inset 0 2px 7px #05091eaa;
}
.celestial-toggle .sky-cloud {
  position: absolute;
  bottom: 9px;
  left: 36px;
  z-index: 1;
  width: 23px;
  height: 8px;
  border-radius: 100px;
  background: #ffffffed;
  box-shadow: 9px 3px 0 -1px #ffffffeb, -6px 3px 0 -2px #ffffffed;
  opacity: 1;
  transition: opacity .32s ease, transform .48s ease;
}
.celestial-toggle .sky-cloud.cloud2 {
  bottom: 22px;
  left: 44px;
  width: 18px;
  opacity: .7;
  transform: scale(.7);
}
:root[data-theme="dark"] .celestial-toggle .sky-cloud {
  opacity: 0;
  transform: translateX(-16px);
}
:root[data-theme="dark"] .celestial-toggle .sky-cloud.cloud2 {
  opacity: 0;
  transform: translateX(-16px) scale(.7);
}
.celestial-toggle .sky-stars {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0;
  transition: opacity .48s ease;
}
:root[data-theme="dark"] .celestial-toggle .sky-stars { opacity: 1; }
.celestial-toggle .sky-stars i {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 5px 1px #eeedff99;
}
.celestial-toggle .sky-stars i:nth-child(1) { top: 8px; left: 13px; width: 4px; height: 4px; }
.celestial-toggle .sky-stars i:nth-child(2) { top: 21px; left: 24px; }
.celestial-toggle .sky-stars i:nth-child(3) { top: 11px; left: 31px; width: 2px; height: 2px; }
.celestial-toggle .sky-stars i:nth-child(4) { top: 28px; left: 12px; width: 2px; height: 2px; }
.celestial-toggle .sky-orb {
  position: absolute;
  top: 4px;
  left: 4px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg,#fff7bc,#ffca63);
  box-shadow: 0 2px 6px #91560f40, 0 0 10px #fff4a995;
  transform: translateX(0);
  transition: transform .48s cubic-bezier(.2,.7,.2,1), background .48s ease, box-shadow .48s ease;
}
:root[data-theme="dark"] .celestial-toggle .sky-orb {
  transform: translateX(38px);
  background: linear-gradient(135deg,#ffffff,#d6d7ff);
  box-shadow: 0 2px 6px #0b0d3760, 0 0 10px #bdb9fa77;
}
/* More specific than app.css's generic .theme-control svg rule. */
.theme-control.celestial-toggle .sky-orb svg {
  position: absolute;
  inset: 3px;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: #b97717;
  stroke-width: 2.5px;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 1;
  transition: transform .42s ease, opacity .3s ease;
}
.theme-control.celestial-toggle .sky-orb .moon-mark {
  fill: #7762b2;
  stroke: #7762b2;
  stroke-width: 1;
  opacity: 0;
  transform: rotate(-80deg) scale(.55);
}
:root[data-theme="dark"] .theme-control.celestial-toggle .sky-orb .sun-mark {
  opacity: 0;
  transform: rotate(85deg) scale(.55);
}
:root[data-theme="dark"] .theme-control.celestial-toggle .sky-orb .moon-mark {
  opacity: 1;
  transform: rotate(0) scale(1);
}
/* The actual button keeps a >=40px tap target; keep it inside narrow mobile headers. */
@media (max-width: 700px) {
  .theme-control.celestial-toggle {
    width: 76px;
    height: 44px;
    padding: 4px 1px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .celestial-toggle .sky-switch,
  .celestial-toggle .sky-cloud,
  .celestial-toggle .sky-stars,
  .celestial-toggle .sky-orb,
  .celestial-toggle .sky-orb svg { transition: none !important; animation: none !important; }
}
