/* Booking, Manage and Admin pages — builds on style.css variables and buttons */

.bk-header {
  background: rgba(253,248,245,0.96);
  border-bottom: 1px solid var(--dark3);
  padding: 0 clamp(16px, 4vw, 48px);
}
.bk-header-inner {
  max-width: 1100px;
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.bk-header .logo { color: var(--black); min-height: 44px; }
.bk-back {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
}
.bk-back:hover { color: var(--accent); }

.bk-main {
  max-width: 860px;
  margin: 0 auto;
  padding: clamp(28px, 5vw, 56px) clamp(16px, 4vw, 32px) 80px;
}
.bk-main.wide { max-width: 1100px; }

.bk-title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 400;
  margin-bottom: 8px;
}
.bk-lead { color: var(--text-muted); margin-bottom: 24px; }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* Stepper */
.bk-steps {
  display: flex;
  gap: 6px;
  margin: 8px 0 28px;
  padding: 0;
  counter-reset: step;
  flex-wrap: wrap;
}
.bk-steps li {
  flex: 1 1 0;
  min-width: 0;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-top: 3px solid var(--dark3);
  padding-top: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bk-steps li.done { border-color: var(--accent-dark); }
.bk-steps li.current { border-color: var(--accent); color: var(--text); font-weight: 600; }
@media (max-width: 560px) {
  .bk-steps li span.lbl { display: none; }
  .bk-steps li.current span.lbl { display: inline; }
}

.bk-panel {
  background: var(--white);
  border: 1px solid var(--dark3);
  border-radius: 8px;
  padding: clamp(18px, 4vw, 32px);
}
.bk-panel + .bk-panel { margin-top: 20px; }
.bk-panel h2 {
  font-size: clamp(1.3rem, 3vw, 1.7rem);
  font-weight: 400;
  margin-bottom: 6px;
}
.bk-panel h2:focus { outline: none; }
.bk-panel h3 { font-weight: 400; font-size: 1.15rem; margin: 18px 0 10px; }
.bk-panel .muted, .muted { color: var(--text-muted); font-size: 0.92rem; }

/* Offering cards */
.bk-cat-label { margin: 22px 0 10px; }
.bk-offerings {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
}
.bk-choice-card { position: relative; display: block; }
.bk-choice-card input {
  position: absolute; opacity: 0; width: 1px; height: 1px;
}
.bk-choice-card .card-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  height: 100%;
  min-height: 44px;
  padding: 16px 18px;
  border: 1px solid var(--dark3);
  border-radius: 8px;
  background: var(--dark2);
  cursor: pointer;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
  text-transform: none;
  letter-spacing: normal;
  font-family: Georgia, serif;
  font-size: 1rem;
  font-weight: 400;
  color: var(--text);
}
.bk-choice-card .card-name { font-size: 1.1rem; }
.bk-choice-card .card-meta {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: 13px;
  color: var(--accent-dark);
  font-weight: 600;
}
.bk-choice-card .card-desc { font-size: 0.88rem; color: var(--text-muted); line-height: 1.5; white-space: pre-line; }
.bk-choice-card .card-avail { font-size: 0.82rem; color: var(--text-muted); font-family: 'Helvetica Neue', Arial, sans-serif; }
.bk-choice-card input:checked + .card-body {
  border-color: var(--accent);
  background: #fbeef1;
  box-shadow: 0 0 0 2px var(--accent);
}
.bk-choice-card input:focus-visible + .card-body { outline: 3px solid var(--accent-dark); outline-offset: 2px; }
.bk-choice-card .card-body:hover { border-color: var(--accent); }
.bk-mini-badge {
  align-self: flex-start;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  background: var(--accent);
  color: var(--black);
  padding: 2px 8px;
  border-radius: 20px;
}

/* Pill radio groups (dates, times, choices) */
.bk-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
.bk-pill { position: relative; }
.bk-pill input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.bk-pill span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  min-height: 48px;
  min-width: 48px;
  padding: 8px 16px;
  border: 1px solid var(--dark3);
  border-radius: 24px;
  background: var(--white);
  cursor: pointer;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px;
  color: var(--text);
  text-transform: none;
  letter-spacing: normal;
  font-weight: 500;
  line-height: 1.25;
  text-align: center;
  transition: all var(--transition);
}
.bk-pill span small { font-size: 11px; color: var(--text-muted); font-weight: 400; }
.bk-pill input:checked + span {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--black);
  font-weight: 600;
}
.bk-pill input:checked + span small { color: var(--black); }
.bk-pill input:focus-visible + span { outline: 3px solid var(--accent-dark); outline-offset: 2px; }
.bk-pill span:hover { border-color: var(--accent); }
.bk-dates .bk-pill span { border-radius: 10px; min-width: 76px; }
.bk-choices { flex-direction: column; align-items: stretch; }
.bk-choices .bk-pill span { justify-content: flex-start; flex-direction: row; text-align: left; border-radius: 10px; width: 100%; }

/* Form fields */
.bk-field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 22px; }
.bk-field > label, .bk-field > legend, .bk-q-label {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--text);
  padding: 0;
  margin-bottom: 2px;
}
fieldset.bk-field { border: 0; padding: 0; margin: 0 0 22px; min-width: 0; }
.bk-req { color: var(--accent-dark); }
.bk-opt { color: var(--text-muted); font-weight: 400; font-size: 12px; }
.bk-hint { font-size: 0.85rem; color: var(--text-muted); margin-top: -4px; }
.bk-note {
  font-size: 0.86rem;
  color: var(--text);
  background: var(--dark2);
  border-left: 3px solid var(--accent);
  padding: 10px 14px;
  border-radius: 4px;
}
.bk-followup { margin-top: 6px; }
.bk-followup[hidden] { display: none; }
.bk-error-msg {
  color: #b3261e;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: 13px;
}
.bk-error-msg:empty { display: none; }
.bk-invalid input, .bk-invalid textarea, input.bk-invalid, textarea.bk-invalid { border-color: #b3261e !important; }
.bk-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 640px) { .bk-grid-2 { grid-template-columns: 1fr; } }

.bk-check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  min-height: 44px;
  padding: 10px 0;
  text-transform: none;
  letter-spacing: normal;
  font-family: Georgia, serif;
  font-size: 0.98rem;
  font-weight: 400;
  color: var(--text);
}
.bk-check input[type="checkbox"],
.bk-check input[type="radio"] {
  appearance: auto;
  -webkit-appearance: auto;
  width: 22px; height: 22px;
  flex-shrink: 0;
  margin-top: 1px;
  accent-color: var(--accent-dark);
  padding: 0;
}

.bk-actions {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
  flex-wrap: wrap;
}
.bk-actions .btn-secondary { background: var(--white); }
.btn-primary[disabled], .btn-secondary[disabled] { opacity: 0.55; cursor: not-allowed; }
.btn-danger {
  background: transparent;
  color: #b3261e;
  border: 1px solid #b3261e;
}
.btn-danger:hover { background: #b3261e; color: var(--white); }
.btn-small { padding: 10px 16px !important; font-size: 12px !important; }

.bk-contract {
  white-space: pre-wrap;
  background: var(--dark2);
  border: 1px solid var(--dark3);
  border-radius: 6px;
  padding: 18px;
  font-size: 0.93rem;
  line-height: 1.7;
  max-height: 420px;
  overflow-y: auto;
  overflow-wrap: anywhere;
}
.bk-contract:focus { outline: 3px solid var(--accent); }

.bk-summary { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; font-size: 0.95rem; margin: 10px 0 4px; }
.bk-summary dt { color: var(--text-muted); font-family: 'Helvetica Neue', Arial, sans-serif; font-size: 13px; }
.bk-summary dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 420px) { .bk-summary { grid-template-columns: 1fr; gap: 0; } .bk-summary dd { margin-bottom: 8px; } }

.bk-alert {
  border-radius: 6px;
  padding: 14px 16px;
  margin-bottom: 18px;
  font-size: 0.95rem;
  border: 1px solid var(--dark3);
  background: var(--dark2);
}
.bk-alert.error { border-color: #e7b4ae; background: #fdf0ee; color: #8c1d16; }
.bk-alert.success { border-color: #b7dcc2; background: #effaf2; color: #1e5b33; }
.bk-alert.warn { border-color: #ecd6a2; background: #fff8e6; color: #6b4e00; }
.bk-alert:empty { display: none; }

.bk-empty {
  text-align: center;
  padding: 24px 12px;
  color: var(--text-muted);
  background: var(--dark2);
  border-radius: 8px;
}
.bk-loading { color: var(--text-muted); padding: 16px 0; }
.bk-loading::before {
  content: '';
  display: inline-block;
  width: 14px; height: 14px;
  margin-right: 10px;
  border: 2px solid var(--dark3);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: bk-spin 0.8s linear infinite;
  vertical-align: -2px;
}
@keyframes bk-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .bk-loading::before { animation: none; } }

.bk-selected-line {
  margin-top: 14px;
  font-size: 0.95rem;
  color: var(--accent-dark);
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-weight: 600;
}

.bk-thanks { text-align: center; padding: clamp(28px, 6vw, 56px) 12px; }
.bk-thanks h2 { font-size: clamp(1.6rem, 4vw, 2.2rem); margin-bottom: 12px; }

/* =============== Admin =============== */
.ad-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--dark3);
  padding-bottom: 10px;
}
.ad-tab {
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--dark3);
  border-radius: 22px;
  background: var(--white);
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: 13px;
  cursor: pointer;
  color: var(--text);
}
.ad-tab[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: var(--black); font-weight: 600; }
.ad-tab:focus-visible { outline: 3px solid var(--accent-dark); outline-offset: 2px; }
.ad-badge {
  display: inline-block;
  min-width: 20px;
  padding: 0 6px;
  margin-left: 4px;
  border-radius: 10px;
  background: var(--black);
  color: var(--white);
  font-size: 11px;
  line-height: 18px;
  text-align: center;
}

.ad-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 16px; }
.ad-toolbar .bk-field { margin-bottom: 0; min-width: 160px; flex: 1 1 180px; }

.ad-booking {
  border: 1px solid var(--dark3);
  border-radius: 8px;
  background: var(--white);
  margin-bottom: 12px;
  overflow: hidden;
}
.ad-booking > summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  align-items: center;
  min-height: 44px;
}
.ad-booking > summary::-webkit-details-marker { display: none; }
.ad-booking > summary:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.ad-booking[open] > summary { border-bottom: 1px solid var(--dark3); background: var(--dark2); }
.ad-booking .ad-when { font-weight: 600; font-family: 'Helvetica Neue', Arial, sans-serif; font-size: 14px; }
.ad-booking .ad-who { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.ad-body { padding: 16px; }
.ad-status {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 12px;
  background: var(--dark3);
  white-space: nowrap;
}
.ad-status.pending { background: #fff1cc; color: #6b4e00; }
.ad-status.approved { background: #d9f2e1; color: #1e5b33; }
.ad-status.declined, .ad-status.cancelled { background: #f1e3e1; color: #7a3b33; }
.ad-status.resched { background: #e6e3fb; color: #3b2f86; }
.ad-status.pay { background: var(--dark2); border: 1px solid var(--dark3); }
.ad-btns { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.ad-section-title {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin: 18px 0 8px;
}
.ad-resched {
  background: #f3f1fd;
  border: 1px solid #d6d0f5;
  border-radius: 6px;
  padding: 12px 14px;
  margin: 10px 0;
}

.ad-slot-day { margin-bottom: 16px; }
.ad-slot-day h3 { font-size: 1rem; margin: 0 0 8px; }
.ad-slot-list { display: flex; flex-direction: column; gap: 6px; }
.ad-slot {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 6px 10px;
  border: 1px solid var(--dark3);
  border-radius: 6px;
  background: var(--white);
  min-height: 52px;
}
.ad-slot .t { font-family: 'Helvetica Neue', Arial, sans-serif; font-weight: 600; font-size: 14px; min-width: 120px; }
.ad-slot .n { flex: 1 1 120px; font-size: 0.88rem; color: var(--text-muted); min-width: 0; overflow-wrap: anywhere; }
.ad-slot .ad-status.open { background: #e5f4ea; color: #1e5b33; }
.ad-slot .ad-status.held { background: #fff1cc; color: #6b4e00; }
.ad-slot .ad-status.booked { background: #d9f2e1; color: #1e5b33; }
.ad-slot .ad-status.requested { background: #e6e3fb; color: #3b2f86; }
.ad-slot .ad-status.blocked, .ad-slot .ad-status.past { background: #eee; color: #555; }
.ad-time-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ad-chip {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--dark2); border: 1px solid var(--dark3); border-radius: 16px;
  padding: 2px 4px 2px 12px; font-family: 'Helvetica Neue', Arial, sans-serif; font-size: 13px;
}
.ad-chip button {
  min-width: 36px; min-height: 36px; border: 0; background: transparent; cursor: pointer;
  font-size: 18px; color: var(--accent-dark); border-radius: 50%;
}

.ad-q {
  border: 1px solid var(--dark3);
  border-radius: 8px;
  background: var(--white);
  padding: 14px;
  margin-bottom: 12px;
}
.ad-q-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.ad-q-head strong { flex: 1 1 auto; font-family: 'Helvetica Neue', Arial, sans-serif; font-size: 13px; color: var(--accent-dark); }
.ad-icon-btn {
  min-width: 44px; min-height: 44px;
  border: 1px solid var(--dark3); border-radius: 6px; background: var(--white);
  cursor: pointer; font-size: 16px; color: var(--text);
}
.ad-icon-btn:hover { border-color: var(--accent); }
.ad-icon-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.ad-choice-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}
.ad-choice-row .bk-check { padding: 0; font-size: 0.85rem; white-space: nowrap; }
@media (max-width: 720px) {
  .ad-choice-row { grid-template-columns: 1fr auto; padding-bottom: 10px; border-bottom: 1px dashed var(--dark3); }
  .ad-choice-row > :nth-child(1), .ad-choice-row > :nth-child(2) { grid-column: 1 / -1; }
}
.ad-inline { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.ad-inline .bk-field { flex: 1 1 140px; margin-bottom: 12px; }

.ad-table-wrap { overflow-x: auto; }
.ad-pkg {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr auto auto;
  gap: 10px;
  align-items: end;
  padding: 12px 0;
  border-bottom: 1px solid var(--dark3);
}
.ad-pkg .bk-field { margin: 0; }
.ad-pkg .name { align-self: center; }
@media (max-width: 720px) {
  .ad-pkg { grid-template-columns: 1fr 1fr; }
  .ad-pkg .name { grid-column: 1 / -1; }
}

.ad-status-list { display: grid; gap: 10px; }
.ad-status-row { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 14px; background: var(--white); border: 1px solid var(--dark3); border-radius: 6px; }
.ok-dot::before, .bad-dot::before { content: ''; display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; }
.ok-dot::before { background: #2e9d57; }
.bad-dot::before { background: #c9302c; }

.ad-mono { font-family: Menlo, Consolas, monospace; font-size: 13px; }
.ad-help ol { padding-left: 20px; list-style: decimal; }
.ad-help li { margin-bottom: 8px; }
.ad-help code { background: var(--dark2); padding: 1px 6px; border-radius: 4px; font-size: 0.9em; overflow-wrap: anywhere; }

/* Skip link becomes visible when focused */
a.sr-only:focus {
  position: fixed !important;
  top: 8px; left: 8px;
  width: auto; height: auto;
  clip: auto; margin: 0;
  padding: 12px 16px;
  background: var(--white);
  border: 2px solid var(--accent-dark);
  border-radius: 6px;
  z-index: 1000;
}

/* Mini event photo on booking cards */
.bk-choice-card .card-img {
  width: calc(100% + 36px);
  max-width: none;
  margin: -16px -18px 8px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center 35%;
  border-radius: 7px 7px 0 0;
}
