/* ======================================
   Next event weather forecast
====================================== */

.next-event-weather {
  margin-top: 18px;
  padding: 15px;
  border: 1px solid #e9dfd8;
  border-radius: 16px;
  background:
    linear-gradient(
      145deg,
      #fffdfb 0%,
      #f7f2ed 100%
    );
}

.next-event-weather[hidden],
.next-event-weather-state[hidden],
.next-event-weather-data[hidden] {
  display: none;
}

.next-event-weather-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.next-event-weather-kicker {
  display: block;
  color: #8c6b6f;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.14em;
  line-height: 1;
}

.next-event-weather-header h3 {
  margin: 5px 0 0;
  color: #4f1821;
  font-size: 16px;
  line-height: 1.35;
}

.next-event-weather-target {
  flex: 0 0 auto;
  min-height: 25px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #efe5df;
  color: #6d3d43;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.5;
}

.next-event-weather-target:empty {
  display: none;
}

.next-event-weather-state {
  margin-top: 13px;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 11px 12px;
  border: 1px dashed #d9cbc2;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.72);
  color: #655b5d;
}

.next-event-weather-state.is-error {
  border-color: rgba(179, 38, 46, 0.3);
  background: #fff3f3;
  color: #9e2730;
}

.next-event-weather-state p {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.65;
}

.next-event-weather-state-icon {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #efe5df;
  color: #6d3d43;
  font-size: 12px;
  font-weight: 900;
}

.next-event-weather-state-icon.is-loading {
  animation:
    next-event-weather-pulse
    1.3s
    ease-in-out
    infinite;
}

.next-event-weather-data {
  margin-top: 13px;
}

.next-event-weather-summary {
  display: flex;
  align-items: center;
  gap: 12px;
}

.next-event-weather-icon {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 15px;
  background: #ffffff;
  box-shadow:
    0 8px 20px
    rgba(74, 45, 49, 0.09);
  font-size: 27px;
}

.next-event-weather-summary strong,
.next-event-weather-summary span {
  display: block;
}

.next-event-weather-summary strong {
  color: #3f2025;
  font-size: 18px;
  line-height: 1.25;
}

.next-event-weather-summary div span {
  margin-top: 4px;
  color: #786d6f;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.5;
}

.next-event-weather-metrics {
  margin: 13px 0 0;
  display: grid;
  grid-template-columns:
    repeat(
      3,
      minmax(0, 1fr)
    );
  gap: 8px;
}

.next-event-weather-metrics div {
  min-width: 0;
  padding: 10px 8px;
  border: 1px solid #ece3de;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
  text-align: center;
}

.next-event-weather-metrics dt {
  color: #887c7e;
  font-size: 10px;
  font-weight: 800;
}

.next-event-weather-metrics dd {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
  color: #4f1821;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.35;
}

.next-event-weather-attribution {
  margin: 10px 0 0;
  color: #968b8d;
  font-size: 9px;
  line-height: 1.5;
  text-align: right;
}

.next-event-weather-attribution a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

@keyframes next-event-weather-pulse {
  0%,
  100% {
    opacity: 0.42;
    transform: scale(0.92);
  }

  50% {
    opacity: 1;
    transform: scale(1);
  }
}

@media screen and (max-width: 480px) {
  .next-event-weather {
    margin-top: 15px;
    padding: 13px;
  }

  .next-event-weather-metrics {
    gap: 6px;
  }

  .next-event-weather-metrics div {
    padding: 9px 6px;
  }

  .next-event-weather-metrics dd {
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .next-event-weather-state-icon.is-loading {
    animation: none;
  }
}
