.htmx-indicator {
  display: none;
}

.htmx-request.htmx-indicator {
  display: flex;
}

.dashboard-section,
.forecast-card {
  contain: layout paint;
}

.forecast-card {
  content-visibility: auto;
  contain-intrinsic-size: 28rem;
}

.theme-switch {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: inline-flex;
  gap: 0;
  border: 1px solid rgb(203 213 225);
  border-radius: 0.5rem;
  overflow: hidden;
  background: rgb(248 250 252);
}

.dark .theme-switch {
  border-color: rgb(51 65 85);
  background: rgb(15 23 42);
}

.theme-switch button {
  border: 0;
  border-radius: 0;
  padding: 0.45rem 0.7rem;
  font-size: 0.875rem;
  color: rgb(15 23 42);
  background: transparent;
}

.dark .theme-switch button {
  color: rgb(248 250 252);
}

.theme-switch button + button {
  border-left: 1px solid rgb(203 213 225);
}

.dark .theme-switch button + button {
  border-left-color: rgb(51 65 85);
}

.theme-switch button[data-active="true"] {
  background: rgb(37 99 235);
  color: white;
}

@media (max-width: 640px) {
  .theme-switch {
    position: static;
    margin-bottom: 1rem;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .theme-switch button {
    width: 100%;
    padding: 0.5rem 0.4rem;
  }
}
