/* Optional global scenery. This file must not replace the active interface skin. */
.winter-scene-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  background:
    linear-gradient(180deg, rgba(238, 242, 241, .08), rgba(11, 15, 18, .16)),
    url("./assets/winter-detective.png") 66% 48% / cover no-repeat;
  filter: saturate(.78) contrast(.92) brightness(.82);
  transform: scale(1.018);
  transition: opacity .42s ease, transform .8s cubic-bezier(.2, .72, .24, 1);
}

body.sxm-winter-on .winter-scene-layer {
  opacity: 1;
  transform: scale(1);
}

.app-shell {
  position: relative;
  z-index: 1;
}

body.sxm-winter-on .main {
  background:
    radial-gradient(760px 440px at 58% -20%, color-mix(in srgb, var(--accent) 7%, transparent), transparent 66%),
    linear-gradient(180deg, color-mix(in srgb, var(--canvas) 78%, transparent), color-mix(in srgb, var(--canvas) 84%, transparent));
  backdrop-filter: blur(1.5px);
}

body.sxm-winter-on .sidebar {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--canvas-deep) 82%, transparent), color-mix(in srgb, var(--canvas-deep) 88%, transparent));
  backdrop-filter: blur(14px) saturate(.76);
}

body.sxm-winter-on .topbar {
  background: linear-gradient(180deg, color-mix(in srgb, var(--canvas) 48%, transparent), transparent);
  backdrop-filter: blur(10px) saturate(.8);
}

.winter-scene-toggle {
  display: inline-flex;
  min-width: 74px;
  height: 31px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 8px;
  color: var(--ink-soft);
  background: var(--glass, rgba(255, 255, 255, .08));
  border: 1px solid var(--glass-line, rgba(140, 158, 255, .16));
  border-radius: 999px;
  box-shadow: 1px 2px 0 rgba(0, 0, 0, .12);
  font-size: 10px;
  cursor: pointer;
  transition: color .2s ease, background .2s ease, border-color .2s ease;
}

.winter-scene-toggle:hover {
  color: var(--ink);
  background: var(--glass-2, rgba(255, 255, 255, .14));
  border-color: var(--line-strong, rgba(158, 176, 255, .26));
}

.winter-scene-toggle svg {
  width: 14px;
  height: 14px;
  flex: none;
}

.winter-scene-switch {
  position: relative;
  width: 19px;
  height: 11px;
  flex: 0 0 19px;
  border: 1px solid var(--line-strong, rgba(158, 176, 255, .26));
  border-radius: 999px;
  background: rgba(115, 126, 150, .24);
  transition: background .2s ease, border-color .2s ease;
}

.winter-scene-switch::after {
  position: absolute;
  top: 1px;
  left: 1px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #f1f4ff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .25);
  content: "";
  transition: transform .2s ease;
}

.winter-scene-toggle[aria-pressed="true"] {
  color: var(--ink);
  background: color-mix(in srgb, var(--accent) 18%, var(--glass, transparent));
  border-color: color-mix(in srgb, var(--accent) 42%, transparent);
}

.winter-scene-toggle[aria-pressed="true"] .winter-scene-switch {
  border-color: color-mix(in srgb, var(--accent) 70%, transparent);
  background: color-mix(in srgb, var(--accent) 48%, transparent);
}

.winter-scene-toggle[aria-pressed="true"] .winter-scene-switch::after {
  transform: translateX(8px);
}

@media (max-width: 760px) {
  .winter-scene-toggle {
    min-width: 58px;
    padding-inline: 7px;
    order: -1;
  }
}

@media (max-width: 480px) {
  .winter-scene-toggle > span:not(.winter-scene-switch) {
    display: none;
  }

  .winter-scene-toggle {
    min-width: 44px;
    gap: 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .winter-scene-layer,
  .winter-scene-switch,
  .winter-scene-switch::after {
    transition-duration: .01ms;
  }
}
