/*! Capital District site-changelog — What’s new FAB + sheet */
.cd-changelog-fab {
  position: fixed;
  right: max(0.75rem, env(safe-area-inset-right, 0px));
  bottom: max(0.75rem, env(safe-area-inset-bottom, 0px));
  z-index: 45;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-width: 44px;
  min-height: 44px;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--card) / 0.92);
  color: hsl(var(--muted-foreground));
  font: 500 0.8125rem/1.2 Inter, system-ui, sans-serif;
  letter-spacing: 0.01em;
  box-shadow: 0 1px 2px hsl(var(--foreground) / 0.06), 0 4px 14px hsl(var(--foreground) / 0.06);
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: opacity 0.15s ease, transform 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.cd-changelog-fab:hover {
  color: hsl(var(--foreground));
  background: hsl(var(--card));
}
.cd-changelog-fab:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px hsl(var(--background)), 0 0 0 4px hsl(var(--ring));
}
.cd-changelog-fab[data-demoted="true"] {
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
}
.cd-changelog-fab__icon {
  display: inline-flex;
  width: 1rem;
  height: 1rem;
  opacity: 0.85;
}
.cd-changelog-fab__label {
  white-space: nowrap;
}

@media (max-width: 420px) {
  .cd-changelog-fab {
    padding: 0.55rem;
  }
  .cd-changelog-fab__label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
  }
}

.cd-changelog-scrim {
  position: fixed;
  inset: 0;
  z-index: 54;
  background: hsl(var(--foreground) / 0.28);
  border: 0;
  padding: 0;
  margin: 0;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}
.cd-changelog-scrim[data-open="true"] {
  opacity: 1;
  pointer-events: auto;
}

.cd-changelog-sheet {
  position: fixed;
  z-index: 55;
  display: flex;
  flex-direction: column;
  background: hsl(var(--card));
  color: hsl(var(--foreground));
  border: 1px solid hsl(var(--border));
  box-shadow: 0 12px 40px hsl(var(--foreground) / 0.14);
  outline: none;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

/* Mobile: bottom sheet */
@media (max-width: 719px) {
  .cd-changelog-sheet {
    left: 0;
    right: 0;
    bottom: 0;
    max-height: min(88vh, 40rem);
    border-radius: calc(var(--radius) + 2px) calc(var(--radius) + 2px) 0 0;
    transform: translateY(12px);
  }
  .cd-changelog-sheet[data-open="true"] {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }
}

/* Desktop: right dock */
@media (min-width: 720px) {
  .cd-changelog-sheet {
    top: 0;
    right: 0;
    bottom: 0;
    width: min(26rem, 100vw);
    max-width: 100%;
    border-radius: var(--radius) 0 0 var(--radius);
    transform: translateX(12px);
  }
  .cd-changelog-sheet[data-open="true"] {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
  }
}

.cd-changelog-sheet__handle {
  display: none;
  width: 2.25rem;
  height: 0.25rem;
  margin: 0.55rem auto 0;
  border-radius: 999px;
  background: hsl(var(--border));
}
@media (max-width: 719px) {
  .cd-changelog-sheet__handle { display: block; }
}

.cd-changelog-sheet__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem 0.65rem;
  border-bottom: 1px solid hsl(var(--border));
}
.cd-changelog-sheet__titles {
  min-width: 0;
}
.cd-changelog-sheet__kicker {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: hsl(var(--muted-foreground));
}
.cd-changelog-sheet__title {
  margin: 0.15rem 0 0;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.25;
}
.cd-changelog-sheet__close {
  flex: 0 0 auto;
  min-width: 44px;
  min-height: 44px;
  margin: -0.35rem -0.35rem 0 0;
  padding: 0.4rem 0.65rem;
  border-radius: calc(var(--radius) - 4px);
  border: 1px solid transparent;
  background: transparent;
  color: hsl(var(--muted-foreground));
  font: 500 0.8125rem/1 Inter, system-ui, sans-serif;
  cursor: pointer;
}
.cd-changelog-sheet__close:hover {
  background: hsl(var(--accent));
  color: hsl(var(--foreground));
}
.cd-changelog-sheet__close:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px hsl(var(--background)), 0 0 0 4px hsl(var(--ring));
}

.cd-changelog-tabs {
  display: flex;
  gap: 0.35rem;
  padding: 0.65rem 1rem;
  overflow-x: auto;
  border-bottom: 1px solid hsl(var(--border));
  scrollbar-width: thin;
}
.cd-changelog-tab {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid hsl(var(--border));
  background: transparent;
  color: hsl(var(--muted-foreground));
  font: 500 0.75rem/1 Inter, system-ui, sans-serif;
  cursor: pointer;
  white-space: nowrap;
}
.cd-changelog-tab[aria-selected="true"] {
  color: hsl(var(--foreground));
  background: hsl(var(--secondary));
  border-color: hsl(var(--border));
  font-weight: 600;
}
.cd-changelog-tab:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px hsl(var(--background)), 0 0 0 4px hsl(var(--ring));
}

.cd-changelog-body {
  flex: 1 1 auto;
  overflow: auto;
  padding: 0.85rem 1rem 1.25rem;
  -webkit-overflow-scrolling: touch;
}
.cd-changelog-body__heading {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  font-weight: 600;
}
.cd-changelog-body__meta {
  margin: 0 0 0.85rem;
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
}
.cd-changelog-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.cd-changelog-item {
  padding: 0.7rem 0.75rem;
  border: 1px solid hsl(var(--border));
  border-radius: calc(var(--radius) - 2px);
  background: hsl(var(--muted) / 0.35);
}
.cd-changelog-item__date {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: hsl(var(--muted-foreground));
}
.cd-changelog-item__text {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.45;
}
.cd-changelog-item__rooms {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.45rem;
}
.cd-changelog-room {
  display: inline-flex;
  align-items: center;
  min-height: 1.35rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--background));
  color: hsl(var(--muted-foreground));
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.cd-changelog-empty {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.45;
  color: hsl(var(--muted-foreground));
}
.cd-changelog-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  .cd-changelog-fab,
  .cd-changelog-scrim,
  .cd-changelog-sheet {
    transition: none;
  }
  .cd-changelog-fab[data-demoted="true"] {
    transform: none;
  }
  .cd-changelog-sheet,
  .cd-changelog-sheet[data-open="true"] {
    transform: none;
  }
}
