/* Loading placeholders that are the shape of what is coming.

   A featureless grey block tells you the page is broken; a block the shape of a
   venue card tells you a venue card is on its way. Everything here reserves the
   space the real thing will occupy, so nothing jumps when it arrives. */

:root {
  --sk-base: #E9EEF5;
  --sk-sheen: #F6F9FD;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --sk-base: #1E2733; --sk-sheen: #27323F; }
}

/* ---- the shimmer every piece shares ---- */
.sk,
.sk-line,
.sk-img,
.sk-pill,
.sk-circle {
  background: linear-gradient(90deg, var(--sk-base) 25%, var(--sk-sheen) 37%, var(--sk-base) 63%);
  background-size: 400% 100%;
  animation: sk-shimmer 1.4s ease-in-out infinite;
  border-radius: 8px;
}

@keyframes sk-shimmer {
  from { background-position: 100% 0; }
  to   { background-position: -100% 0; }
}

/* Someone who has asked for less motion gets a steady block instead of a pulse. */
@media (prefers-reduced-motion: reduce) {
  .sk, .sk-line, .sk-img, .sk-pill, .sk-circle { animation: none; }
}

.sk-line { height: 11px; }
.sk-line--title { height: 15px; width: 62%; }
.sk-line--short { width: 40%; }
.sk-line--long  { width: 88%; }
.sk-pill { height: 20px; width: 64px; border-radius: 999px; }
.sk-circle { border-radius: 50%; }

/* ---- a venue card, waiting ---- */
.sk-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: var(--card);
}
.sk-card__top { height: 148px; }
.sk-card__body { padding: 14px 15px 16px; display: grid; gap: 9px; }
.sk-card__chips { display: flex; gap: 6px; margin-top: 2px; }
.sk-card__foot {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--border);
}
.sk-card__foot .sk-line { width: 38%; }
.sk-card__foot .sk-pill { width: 86px; height: 30px; border-radius: 9px; }

/* ---- a list row, waiting ---- */
.sk-row {
  display: flex; align-items: center; gap: 14px;
  padding: 15px 16px;
  border: 1px solid var(--border); border-radius: 12px;
  background: var(--card);
}
.sk-row + .sk-row { margin-top: 10px; }
.sk-row__ic { width: 42px; height: 42px; flex: none; }
.sk-row__text { flex: 1; display: grid; gap: 8px; }
.sk-row__end { width: 72px; flex: none; }

/* ---- a slot grid, waiting ---- */
.sk-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.sk-slots .sk { height: 42px; border-radius: 10px; }

/* ---- content arriving ----
   A short fade, so rows appear rather than snap into place. Applied to the
   container once the data is in. */
.is-loaded { animation: sk-in .22s ease-out both; }
@keyframes sk-in { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .is-loaded { animation: none; }
}

/* ---- images that do not shove the page around ----
   The box keeps its shape before the file arrives, so text below it stays put. */
.img-hold {
  background: var(--sk-base);
  overflow: hidden;
}
.img-hold > img {
  display: block; width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .25s ease;
}
.img-hold > img.is-in { opacity: 1; }

/* A placeholder wearing a real card's class must not inherit its photo or
   hover behaviour - only its box. */
.sk-ghost { pointer-events: none; }
.sk-ghost .vcard__top { background-image: none !important; }
.sk-ghost .vcard__top::before { display: none; }
.sk-ghost .vcard__body { display: grid; gap: 10px; align-content: start; }
.sk-ghost .vcard__foot { display: flex; justify-content: space-between; align-items: center; }
.sk-ghost .vcard__foot .sk-line { width: 38%; }
.sk-ghost .vcard__foot .sk-pill { width: 92px; height: 32px; border-radius: 9px; }
