/*
 * salon-bookings-view.css -- BIFM run stylist-queue-consent-flow, Phase 3.
 * Styles for a stylist's own Bookings at a salon they have joined (sb- namespace). Styled on components/shared.css :root tokens
 * only (with safe fallbacks). Mobile first. Loaded by /start/ugc-consent.html only.
 * Touch targets are 48px with 8px gaps. No colour carries meaning on its own: every status, consent state and rating also has
 * a text label.
 */

#salonBookingsMode { --sb-sticky-top: 56px; }
.sb-wrap { width: 100%; max-width: 560px; margin: 0 auto; padding: 0 0 80px; font-family: var(--font-body, system-ui, sans-serif); color: var(--grey-900, #111827); }
.sb-head { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; }
.sb-head-text { flex: 1 1 auto; min-width: 0; }
.sb-title { margin: 0; font-size: 1.375rem; line-height: 1.2; font-weight: 700; overflow-wrap: anywhere; }
.sb-title:focus { outline: none; }
.sb-updated { margin: 2px 0 0; font-size: 0.8125rem; color: var(--grey-600, #4b5563); min-height: 1.2em; }
.sb-iconbtn {
  flex: 0 0 auto; width: 48px; height: 48px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--grey-200, #e5e7eb); border-radius: 12px; background: var(--white, #fff); color: var(--grey-700, #374151); cursor: pointer;
}
.sb-iconbtn:focus-visible, .sb-btn:focus-visible, .sb-filter:focus-visible, .sb-date input:focus-visible { outline: 2px solid var(--teal-600, #0e7c7b); outline-offset: 2px; }
.sb-iconbtn.is-loading svg { animation: sb-spin 0.9s linear infinite; }
@keyframes sb-spin { to { transform: rotate(360deg); } }
.sb-body:focus { outline: none; }

/* sticky filter bar + totals, just under the app bar (the height is measured in JS into --sb-sticky-top) */
.sb-sticky {
  position: sticky; top: var(--sb-sticky-top, 56px); z-index: 20; margin: 0 0 12px; padding: 8px 0 10px;
  background: var(--white, #fff); border-bottom: 1px solid var(--grey-200, #e5e7eb);
}
.sb-filters { display: flex; gap: 8px; }
.sb-filter {
  flex: 1 1 0; min-width: 0; min-height: 48px; padding: 0 6px; border: 1px solid var(--grey-300, #d1d5db); border-radius: 12px;
  background: var(--white, #fff); color: var(--grey-800, #1f2937); font: inherit; font-size: 0.9375rem; font-weight: 600; cursor: pointer;
}
/* The pressed filter is a solid fill; its state is also exposed to assistive tech through aria-pressed. */
.sb-filter[aria-pressed="true"] { background: var(--teal-600, #0e7c7b); border-color: var(--teal-600, #0e7c7b); color: var(--white, #fff); }
.sb-custom { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; }
.sb-custom[hidden], .sb-range-note[hidden], .sb-totals[hidden], .sb-totals-note[hidden], .sb-banner[hidden] { display: none; }
.sb-date { flex: 1 1 140px; min-width: 0; }
.sb-date label { display: block; margin: 0 0 4px; font-size: 0.8125rem; font-weight: 600; }
.sb-date input { width: 100%; min-height: 48px; padding: 0 10px; border: 1px solid var(--grey-300, #d1d5db); border-radius: 10px; font: inherit; font-size: 1rem; box-sizing: border-box; }
.sb-range-note { flex: 1 0 100%; margin: 0; font-size: 0.8125rem; color: var(--grey-700, #374151); line-height: 1.4; }
.sb-totals { margin: 10px 0 0; font-size: 1rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.sb-totals-note { margin: 2px 0 0; font-size: 0.8125rem; color: var(--grey-600, #4b5563); line-height: 1.4; }

.sb-banner { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; padding: 10px 14px; border-radius: 12px; font-size: 0.9375rem; line-height: 1.4; background: var(--grey-50, #f9fafb); border: 1px solid var(--grey-300, #d1d5db); color: var(--grey-800, #1f2937); }
.sb-banner-text { flex: 1 1 auto; min-width: 0; }
.sb-btn--small { flex: 0 0 auto; padding: 0 14px; }
.sb-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* rows grouped by day */
.sb-day { margin: 0 0 20px; }
.sb-day-title { margin: 0 0 8px; font-size: 0.875rem; font-weight: 700; color: var(--grey-600, #4b5563); }
.sb-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.sb-row {
  padding: 12px 14px; border: 1px solid var(--grey-200, #e5e7eb); border-radius: 14px; background: var(--white, #fff);
  box-shadow: var(--shadow-xs, 0 1px 2px rgba(15, 23, 42, 0.05));
}
.sb-row--done, .sb-row--exc { background: var(--grey-50, #f9fafb); }
.sb-row-main { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 12px; }
.sb-time { font-size: 1.125rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.sb-service { flex: 1 1 140px; min-width: 0; font-size: 1rem; overflow-wrap: anywhere; }
.sb-chip {
  flex: 0 0 auto; padding: 2px 10px; border-radius: 999px; font-size: 0.8125rem; font-weight: 600;
  border: 1px solid var(--grey-300, #d1d5db); background: var(--white, #fff); color: var(--grey-800, #1f2937);
}
.sb-chip--chair { border-color: var(--teal-600, #0e7c7b); color: var(--teal-700, #0f766e); }
.sb-chip--done { background: var(--grey-100, #f3f4f6); }
.sb-chip--exc { border-style: dashed; }
.sb-chip--other { border-style: dotted; }
.sb-row-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; margin: 8px 0 0; font-size: 0.875rem; color: var(--grey-700, #374151); }
.sb-price { font-weight: 700; font-variant-numeric: tabular-nums; }
.sb-dur { color: var(--grey-600, #4b5563); }
/* The consent word is the badge; the border style only adds a second cue. */
.sb-consent { padding: 1px 8px; border-radius: 8px; border: 1px solid var(--grey-300, #d1d5db); font-size: 0.8125rem; font-weight: 600; }
.sb-consent--approved { border-color: var(--teal-600, #0e7c7b); color: var(--teal-700, #0f766e); }
.sb-consent--pending { border-style: dashed; }
.sb-consent--declined { border-width: 2px; }
.sb-consent--expired, .sb-consent--unknown { border-style: dotted; }
.sb-rating { display: inline-flex; align-items: baseline; gap: 6px; font-weight: 600; }
.sb-stars { color: var(--amber-600, #b45309); letter-spacing: 1px; }
.sb-rating--none { color: var(--grey-600, #4b5563); font-weight: 400; }

.sb-btn {
  min-height: 48px; min-width: 48px; padding: 0 18px; border: 0; border-radius: 12px; cursor: pointer;
  font: inherit; font-size: 0.9375rem; font-weight: 700; background: var(--teal-600, #0e7c7b); color: var(--white, #fff);
}
.sb-btn:hover { background: var(--teal-700, #0f766e); }

.sb-skeleton { display: flex; flex-direction: column; gap: 8px; }
.sb-skel { height: 76px; border-radius: 14px; background: linear-gradient(90deg, var(--grey-100, #f3f4f6) 25%, var(--grey-50, #f9fafb) 50%, var(--grey-100, #f3f4f6) 75%); background-size: 200% 100%; animation: sb-shimmer 1.4s linear infinite; }
@keyframes sb-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

.sb-message { margin: 0 0 16px; padding: 18px 16px; border: 1px solid var(--grey-200, #e5e7eb); border-radius: 14px; background: var(--white, #fff); }
.sb-message-title { margin: 0 0 6px; font-size: 1.0625rem; font-weight: 700; }
.sb-message-body { margin: 0 0 12px; font-size: 0.9375rem; line-height: 1.45; color: var(--grey-700, #374151); }
.sb-message .sb-btn { margin-top: 4px; }
.sb-message--lost { border-color: var(--grey-400, #9ca3af); }
.sb-message--notice { background: var(--grey-50, #f9fafb); }

@media (prefers-reduced-motion: reduce) {
  .sb-iconbtn.is-loading svg, .sb-skel { animation: none; }
}
