/* ==========================================================================
   Woodside Photography Studio — the booking application's own stylesheet.

   Every component the three booking mounts (_tools/app-mounts.cjs) and the
   proofing gallery (gallery.php) use, and NOTHING ELSE — admin.css is the
   staff area's own sheet. Written against assets/css/site.css's :root
   (read, never added to): --ink, --char/-2/-3, --seal/-dk/-lt,
   --brass/-dk/-lt, --signal/-lt, --bone/-2, --paper, --line/-2, --body,
   --muted/-lt, --warm-line, --warm-ink, --serif, --sans, --wrap, --r,
   --r-lg, --shadow, --shadow-lg.
   ========================================================================== */

/* ------------------------------------------------------- the booking card */

.booking { margin: 1.6rem 0; }

.booking-steps {
  display: flex; flex-wrap: wrap; gap: 1.4rem; list-style: none; margin: 0 0 1.4rem; padding: 0;
}
.booking-step { display: flex; align-items: center; gap: .5rem; font-size: .88rem; color: var(--muted); }
.booking-step-n {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.6rem; height: 1.6rem; border-radius: 50%;
  background: var(--bone-2); color: var(--char-2); font: 700 .82rem/1 var(--sans);
  flex: none;
}
.booking-step-t { font-weight: 600; color: var(--char-2); }

.booking-panel {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: clamp(1.2rem, 3vw, 1.8rem); box-shadow: var(--shadow);
}

/* ------------------------------------------------------------------ form */

.bk-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.bk-field { display: flex; flex-direction: column; gap: .35rem; }
.bk-field--wide { grid-column: 1 / -1; }
.bk-field label { font-size: .8rem; font-weight: 600; color: var(--muted); }
.booking-panel input,
.booking-panel select,
.booking-panel textarea {
  font: inherit; font-size: .95rem; padding: .6rem .75rem;
  border: 1px solid var(--line-2); border-radius: var(--r); background: var(--paper); color: var(--body);
  width: 100%;
}
.booking-panel input:focus,
.booking-panel select:focus,
.booking-panel textarea:focus { outline: 2px solid var(--seal-dk); outline-offset: 1px; }
.booking-panel textarea { resize: vertical; }

.bk-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.bk-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-top: 1.2rem; }
.bk-note { margin: 0; color: var(--muted); }

.bk-alert.bk-err {
  margin: 1rem 0 0; padding: .8rem 1rem; border-radius: var(--r);
  background: var(--signal-lt); color: #5a1b1f; font-size: .9rem; border: 1px solid #f0c3c3;
}

.bk-spin { position: relative; color: transparent !important; pointer-events: none; }
.bk-spin::after {
  content: ""; position: absolute; inset: 0; margin: auto; width: 1rem; height: 1rem;
  border: 2px solid rgba(255,255,255,.5); border-top-color: #fff; border-radius: 50%;
  animation: bk-spin-rotate .7s linear infinite;
}
@keyframes bk-spin-rotate { to { transform: rotate(360deg); } }

.bk-summary { margin-top: 1rem; padding: 1rem 1.1rem; background: var(--bone); border-radius: var(--r); }
.bk-summary dl { display: grid; grid-template-columns: auto 1fr; gap: .35rem 1rem; margin: 0; }
.bk-summary dt { color: var(--muted); font-size: .85rem; }
.bk-summary dd { margin: 0; font-weight: 600; color: var(--char-2); text-align: right; }

.bk-done { padding: 1rem 0; }
.bk-done h3 { margin: 0 0 .3rem; font: 600 1.3rem/1.3 var(--serif); color: var(--char-2); }
.bk-ref { color: var(--muted); font-size: .9rem; margin: 0 0 .8rem; }

/* -------------------------------------------------------------- the slots */

.slot-grid { margin: 1rem 0; }
.avail-empty { color: var(--muted); font-size: .92rem; margin: .4rem 0; }
.avail-price { font-weight: 600; color: var(--brass-dk); margin: 0 0 .6rem; }

.slot-row { padding: .7rem 0; border-bottom: 1px solid var(--line); }
.slot-row:last-child { border-bottom: none; }
.slot-row-name { margin: 0 0 .5rem; font-weight: 600; color: var(--char-2); font-size: .88rem; }
.slot-row-btns { display: flex; flex-wrap: wrap; gap: .5rem; }

.slot-btn {
  padding: .5rem .85rem; border-radius: 999px; border: 1px solid var(--line-2);
  background: var(--paper); color: var(--char-2); font: 600 .85rem/1 var(--sans); cursor: pointer;
}
.slot-btn:hover { border-color: var(--seal-dk); }
.slot-btn.is-chosen { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ---------------------------------------------------------- date checker */

.avail { margin: 1rem 0; }
.date-status-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.date-status {
  display: flex; justify-content: space-between; align-items: center;
  padding: .6rem .9rem; border-radius: var(--r); border: 1px solid var(--line); font-size: .92rem;
}
.date-status span:first-child { font-weight: 600; color: var(--char-2); }
.date-status--free { background: var(--seal-lt); border-color: var(--warm-line); }
.date-status--free span:last-child { color: var(--seal-dk); font-weight: 700; }
.date-status--unavailable { background: var(--bone); }
.date-status--unavailable span:last-child { color: var(--muted); font-weight: 700; }

/* ============================================================================
   THE PROOFING GALLERY
   ============================================================================ */

.gallery-counter {
  position: sticky; top: 0; z-index: 5; margin: 0 0 1.2rem; padding: .8rem 1.1rem;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg);
  font: 600 .95rem/1.3 var(--sans); color: var(--char-2); box-shadow: var(--shadow);
}

.proof-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; margin-bottom: 1.6rem;
}
.proof-fig {
  margin: 0; position: relative; background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow);
}
.proof-fig img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; background: var(--bone-2); }
.proof-fig figcaption { padding: .55rem .7rem; font-size: .8rem; color: var(--muted); }

.proof-heart {
  position: absolute; top: .5rem; right: .5rem; width: 2.2rem; height: 2.2rem;
  border-radius: 50%; border: none; background: rgba(22,21,20,.55); color: #fff;
  font-size: 1.1rem; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.proof-heart[aria-pressed="true"] { background: var(--signal); }
.proof-heart:hover { background: rgba(22,21,20,.75); }
.proof-heart[aria-pressed="true"]:hover { background: #8a2a2f; }

.gallery-submit { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin: 1.4rem 0; }

.gallery-confirm {
  border: none; border-radius: var(--r-lg); padding: 1.6rem; max-width: 420px; width: calc(100% - 2rem);
  box-shadow: var(--shadow-lg);
}
.gallery-confirm::backdrop { background: rgba(22,21,20,.6); }
.gallery-confirm h2 { margin: 0 0 .6rem; font: 600 1.2rem/1.3 var(--serif); color: var(--char-2); }
.gallery-confirm p { margin: 0 0 1.2rem; color: var(--muted); }
.gallery-confirm .row-actions { display: flex; gap: .7rem; justify-content: flex-end; }

.numbered.selection-list { counter-reset: none; }

@media (max-width: 620px) {
  .bk-grid { grid-template-columns: 1fr; }
  .gallery-counter { position: static; }
}
