.lifeos-weather-hero {
  isolation: isolate;
}

.lifeos-weather-motion {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 22%, #000 75%);
  mask-image: linear-gradient(90deg, transparent 22%, #000 75%);
}

.lifeos-weather-motion :is(.lifeos-weather-wash, .lifeos-weather-sky),
.lifeos-weather-motion::after {
  position: absolute;
  inset: 0;
  display: block;
}

.lifeos-weather-motion[data-weather="clear"][data-night="false"] .lifeos-weather-wash {
  inset: -47% -13% -11% 21%;
  background: radial-gradient(ellipse at 72% 29%, #ffe4a46b, #efb76239 25%, transparent 62%);
  animation: lifeos-weather-glow 13s ease-in-out infinite alternate;
}

.lifeos-weather-motion[data-weather="clear"][data-night="true"] .lifeos-weather-wash {
  background: radial-gradient(ellipse at 76% 24%, #bee1ff35, transparent 58%);
  animation: lifeos-weather-glow 17s ease-in-out infinite alternate;
}

.lifeos-weather-motion[data-weather="clear"][data-night="true"] .lifeos-weather-sky {
  inset: 0 0 23% 31%;
  background:
    radial-gradient(1.7px 1.7px at 18% 21%, #f6e8ca 65%, transparent 100%),
    radial-gradient(1.2px 1.2px at 34% 42%, #f0e5da 65%, transparent 100%),
    radial-gradient(1.2px 1.2px at 61% 14%, #f0e5da 65%, transparent 100%),
    radial-gradient(1.5px 1.5px at 64% 57%, #d9e9ff 65%, transparent 100%),
    radial-gradient(1.2px 1.2px at 72% 28%, #eef3fd 65%, transparent 100%),
    radial-gradient(1.4px 1.4px at 87% 41%, #f8e3c0 65%, transparent 100%),
    radial-gradient(1.2px 1.2px at 92% 18%, #eef3fd 65%, transparent 100%);
  animation: lifeos-weather-stars 11s ease-in-out infinite alternate;
}

.lifeos-weather-motion[data-weather="cloudy"] .lifeos-weather-wash,
.lifeos-weather-motion[data-weather="fog"] .lifeos-weather-wash {
  inset: -10% -16% 22% 8%;
  background:
    radial-gradient(ellipse at 78% 28%, #d1e4f746, transparent 45%),
    radial-gradient(ellipse at 52% 46%, #adbfce3b, transparent 39%);
  animation: lifeos-weather-clouds 20s ease-in-out infinite alternate;
}

.lifeos-weather-motion[data-weather="fog"] .lifeos-weather-sky {
  inset: 17% -19% -9% 8%;
  background:
    radial-gradient(ellipse at 58% 63%, #d9e4ef54, transparent 39%),
    radial-gradient(ellipse at 80% 67%, #b3c6db67, transparent 47%);
  animation: lifeos-weather-clouds 24s ease-in-out infinite alternate-reverse;
}

.lifeos-weather-motion:is([data-weather="rain"], [data-weather="storm"]) .lifeos-weather-sky,
.lifeos-weather-motion:is([data-weather="rain"], [data-weather="storm"])::after {
  content: "";
  inset: -85px -15% 0 12%;
  background: repeating-linear-gradient(90deg, #cbdef480 0 1px, transparent 1px 29px);
  -webkit-mask-image: repeating-linear-gradient(180deg, transparent 0 33px, #000 34px 55px, transparent 57px 85px);
  mask-image: repeating-linear-gradient(180deg, transparent 0 33px, #000 34px 55px, transparent 57px 85px);
  opacity: .43;
  transform: skewX(-17deg);
  animation: lifeos-weather-rain .88s linear infinite;
}

.lifeos-weather-motion:is([data-weather="rain"], [data-weather="storm"])::after {
  left: 14%;
  background: repeating-linear-gradient(90deg, #a0bfe489 0 1px, transparent 1px 47px);
  opacity: .31;
  animation-duration: 1.25s;
  animation-delay: -.43s;
}

.lifeos-weather-motion[data-weather="storm"] .lifeos-weather-wash {
  background: radial-gradient(ellipse at 79% 22%, #9c93d76b, #6b72a347 30%, transparent 62%);
  animation: lifeos-weather-glow 12s ease-in-out infinite alternate;
}

.lifeos-weather-motion[data-weather="snow"] .lifeos-weather-sky,
.lifeos-weather-motion[data-weather="snow"]::after {
  content: "";
  inset: -120px -4% 0 19%;
  background:
    radial-gradient(2px 2px at 21% 32%, #edf5ffe0 55%, transparent 100%) 0 0 / 83px 120px,
    radial-gradient(1.3px 1.3px at 67% 71%, #e5f2ffd8 55%, transparent 100%) 13px 17px / 101px 120px;
  opacity: .58;
  animation: lifeos-weather-snow 9s linear infinite;
}

.lifeos-weather-motion[data-weather="snow"]::after {
  inset-inline-start: 26%;
  opacity: .28;
  animation-duration: 14s;
  animation-delay: -4s;
}

.lifeos-weather-motion[data-paused="true"] :is(span, div),
.lifeos-weather-motion[data-paused="true"]::after {
  animation-play-state: paused;
}

#root .lifeos-weather-motion-toggle {
  display: inline-flex;
  align-items: center;
  min-height: 2.1rem;
  margin-top: .25rem;
  padding: 0 .48rem;
  border: 1px solid #dbe5f274;
  border-radius: .45rem;
  background: #122139bf;
  color: #f0e6d2;
  font-size: .78rem;
  font-weight: 620;
}
#root .lifeos-weather-motion-toggle:hover { background: #1d304a; }

@keyframes lifeos-weather-glow {
  from { opacity: .55; transform: translateX(-2%) scale(1); }
  to { opacity: 1; transform: translateX(2%) scale(1.09); }
}
@keyframes lifeos-weather-stars {
  from { opacity: .53; }
  to { opacity: .94; }
}
@keyframes lifeos-weather-clouds {
  from { transform: translateX(-6%); }
  to { transform: translateX(7%); }
}
@keyframes lifeos-weather-rain {
  from { transform: skewX(-17deg) translateY(0); }
  to { transform: skewX(-17deg) translateY(85px); }
}
@keyframes lifeos-weather-snow {
  from { transform: translateY(0); }
  to { transform: translateY(120px); }
}

@media (prefers-reduced-motion: reduce), print {
  .lifeos-weather-motion :is(span, div), .lifeos-weather-motion::after { animation: none !important; }
  #root .lifeos-weather-motion-toggle { display: none; }
}

.lifeos-weather-motion[data-weather="partly-cloudy"] .lifeos-weather-wash {
  background: radial-gradient(ellipse at 81% 15%, #e9c48555, transparent 57%);
  animation: lifeos-weather-glow 15s ease-in-out infinite alternate;
}
.lifeos-weather-motion[data-weather="partly-cloudy"][data-night="true"] .lifeos-weather-wash {
  background: radial-gradient(ellipse at 81% 15%, #bee1ff38, transparent 57%);
}
.lifeos-weather-motion[data-weather="partly-cloudy"] .lifeos-weather-sky {
  background:
    radial-gradient(ellipse at 72% 57%, #e5ebf543, transparent 35%),
    radial-gradient(ellipse at 61% 68%, #c9d6eb37, transparent 38%);
  animation: lifeos-weather-clouds 19s ease-in-out infinite alternate;
}
