/* ── "Volná kapacita" card (partials/capacity.njk) — non-blocking, bottom right; bottom sheet on phones ── */
.capacity-card {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 90; /* under the mobile menu (99+) and the lightbox (200) */
  width: min(22rem, calc(100vw - 2rem));
  padding: 1.75rem 1.75rem 1.5rem;
  background: var(--white);
  border-radius: 14px;
  border-top: 3px solid var(--warm);
  box-shadow: 0 18px 50px rgba(44, 40, 36, 0.18), 0 2px 8px rgba(44, 40, 36, 0.08);
  opacity: 0;
  transform: translateY(1.5rem);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.capacity-card.is-visible { opacity: 1; transform: none; }
.capacity-card .label { margin-bottom: 0.6rem; padding-right: 2rem; }
.capacity-text {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  line-height: 1.35;
  color: var(--charcoal);
  margin-bottom: 1.25rem;
}
.capacity-cta { display: block; text-align: center; border-radius: 999px; }
.capacity-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 2.25rem;
  height: 2.25rem;
  display: grid;
  place-items: center;
  background: none;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  color: var(--warm);
}
.capacity-close:hover { background: var(--cream); }
.capacity-close:focus-visible { outline: 2px solid var(--warm); outline-offset: 2px; }
.capacity-close svg { width: 1.1rem; height: 1.1rem; stroke: currentColor; stroke-width: 1.6; fill: none; stroke-linecap: round; }

/* Collapsed state: brown rounded pill in the same corner */
.capacity-pill {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 90;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 1.3rem 0.8rem 1.1rem;
  background: var(--warm);
  color: var(--white);
  border: 1px solid rgba(245, 240, 234, 0.45); /* keeps the edge readable over the dark footer */
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(44, 40, 36, 0.22);
  opacity: 0;
  transform: translateY(0.75rem) scale(0.96);
  transition: opacity 0.35s ease, transform 0.35s ease, background 0.2s;
}
.capacity-pill.is-visible { opacity: 1; transform: none; }
.capacity-pill.is-visible.is-away { opacity: 0; pointer-events: none; }
.capacity-pill:hover { background: var(--charcoal); }
.capacity-pill:focus-visible { outline: 2px solid var(--warm); outline-offset: 3px; }
.capacity-pill { max-width: calc(100vw - 2rem); }
.capacity-pill-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.capacity-pill-dot {
  flex-shrink: 0;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #5FD07A; /* "available" green */
  animation: capacity-pulse 2.4s ease-out infinite;
}
@keyframes capacity-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(95, 208, 122, 0.7); }
  70%  { box-shadow: 0 0 0 0.45rem rgba(95, 208, 122, 0); }
  100% { box-shadow: 0 0 0 0 rgba(95, 208, 122, 0); }
}

@media (max-width: 600px) {
  .capacity-pill { right: 1rem; bottom: calc(1rem + env(safe-area-inset-bottom)); }
  .capacity-card {
    right: 1rem;
    left: 1rem;
    bottom: calc(1rem + env(safe-area-inset-bottom));
    width: auto;
    padding: 1.4rem 1.25rem 1.2rem;
  }
  .capacity-text { font-size: 1.2rem; margin-bottom: 1rem; }
}

@media (max-width: 380px) {
  .capacity-pill { letter-spacing: 0.08em; font-size: 0.7rem; padding: 0.75rem 1.1rem 0.75rem 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  .capacity-card, .capacity-pill { transition: opacity 0.2s linear; transform: none; }
  .capacity-pill-dot { animation: none; }
}
