/*
 * salon-queue-view.css -- BIFM run stylist-queue-consent-flow, Phase 2.
 * Styles for: the stylist's salon queue (sq-), the per-salon drawer sections (yk-salon-section), and the team-invite
 * card and banner (yk-invite-). Styled on components/shared.css :root tokens only (with safe fallbacks). Mobile first.
 * Loaded by /start/ugc-consent.html only; the /manage/ shell never loads it and never fills #ykSalonSections.
 * Touch targets are 48px with 8px gaps. No colour carries meaning on its own: every state also has a text label.
 */

/* ------------------------------------------------------------------ drawer: one section per team salon */
.yk-salon-sections[hidden] { display: none; }
.yk-salon-section { margin: 4px 0 0; }
/* Not an uppercase micro-label like .yk-app-menu-section: this is the salon's NAME, shown as written. */
.yk-salon-section .yk-salon-section-heading {
  margin: 12px 12px 4px;
  padding: 0;
  font-family: var(--font-body, system-ui, sans-serif);
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: normal;
  text-transform: none;
  color: var(--grey-900, #111827);
  overflow-wrap: anywhere;
}

/* ------------------------------------------------------------------ salon queue */
.sq-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); }
.sq-head { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; }
.sq-head-text { flex: 1 1 auto; min-width: 0; }
.sq-title { margin: 0; font-size: 1.375rem; line-height: 1.2; font-weight: 700; overflow-wrap: anywhere; }
.sq-updated { margin: 2px 0 0; font-size: 0.8125rem; color: var(--grey-600, #4b5563); min-height: 1.2em; }
.sq-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;
}
.sq-iconbtn:focus-visible, .sq-btn:focus-visible, .sq-menu-item:focus-visible, .sq-card:focus-visible { outline: 2px solid var(--teal-600, #0e7c7b); outline-offset: 2px; }
.sq-iconbtn.is-loading svg { animation: sq-spin 0.9s linear infinite; }
@keyframes sq-spin { to { transform: rotate(360deg); } }

.sq-welcome, .sq-banner, .sq-pull {
  margin: 0 0 12px; padding: 12px 14px; border-radius: 12px; font-size: 0.9375rem; line-height: 1.4;
}
.sq-welcome { background: var(--teal-50, #f0fdfa); border: 1px solid var(--teal-200, #99f6e4); color: var(--teal-700, #0f766e); font-weight: 600; }
.sq-banner { background: var(--grey-50, #f9fafb); border: 1px solid var(--grey-300, #d1d5db); color: var(--grey-800, #1f2937); }
.sq-pull { text-align: center; color: var(--grey-600, #4b5563); }
.sq-welcome[hidden], .sq-banner[hidden], .sq-pull[hidden], .sq-menu[hidden], .sq-menu-edit[hidden], .sq-menu-error[hidden] { display: none; }
.sq-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.sq-group { margin: 0 0 20px; }
.sq-group-title { margin: 0 0 8px; font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--grey-600, #4b5563); }
.sq-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }

.sq-card {
  position: relative; padding: 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));
}
.sq-card--mine { border-color: var(--teal-300, #5eead4); }
.sq-card--next { border-width: 2px; border-color: var(--teal-600, #0e7c7b); background: var(--teal-50, #f0fdfa); }
.sq-card--done, .sq-card--exc { background: var(--grey-50, #f9fafb); }
.sq-card[aria-busy="true"] { opacity: 0.75; }
.sq-nextup {
  display: inline-block; margin: 0 0 8px; padding: 2px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 700;
  background: var(--teal-600, #0e7c7b); color: var(--white, #fff);
}
.sq-card-main { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 12px; }
.sq-time { font-size: 1.125rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.sq-service { flex: 1 1 140px; min-width: 0; font-size: 1rem; overflow-wrap: anywhere; }
.sq-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);
}
.sq-chip--chair { border-color: var(--teal-600, #0e7c7b); color: var(--teal-700, #0f766e); }
.sq-chip--done { background: var(--grey-100, #f3f4f6); }
.sq-assigned { margin: 8px 0 0; font-size: 0.875rem; color: var(--grey-600, #4b5563); }
.sq-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; }

.sq-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);
}
.sq-btn:hover { background: var(--teal-700, #0f766e); }
.sq-btn:disabled { opacity: 0.55; cursor: default; }
.sq-btn--ghost { background: var(--white, #fff); color: var(--grey-800, #1f2937); border: 1px solid var(--grey-300, #d1d5db); }
.sq-btn--ghost:hover { background: var(--grey-50, #f9fafb); }

.sq-skeleton { display: flex; flex-direction: column; gap: 8px; }
.sq-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: sq-shimmer 1.4s linear infinite; }
@keyframes sq-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

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

/* header menu */
.sq-menu { margin: 0 0 12px; padding: 6px; border: 1px solid var(--grey-200, #e5e7eb); border-radius: 14px; background: var(--white, #fff); }
.sq-menu-item {
  width: 100%; min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 12px;
  border: 0; border-radius: 10px; background: none; cursor: pointer; font: inherit; font-size: 0.9375rem; text-align: left; color: inherit;
}
.sq-menu-item:hover { background: var(--grey-50, #f9fafb); }
.sq-menu-state { flex: 0 1 auto; font-size: 0.8125rem; color: var(--grey-600, #4b5563); text-align: right; }
.sq-menu-edit { padding: 8px 12px 12px; }
.sq-menu-edit-label { display: block; margin: 0 0 6px; font-size: 0.8125rem; font-weight: 600; }
.sq-menu-edit input { width: 100%; min-height: 48px; padding: 0 12px; border: 1px solid var(--grey-300, #d1d5db); border-radius: 10px; font: inherit; font-size: 1rem; box-sizing: border-box; }
.sq-menu-help { margin: 6px 0; font-size: 0.8125rem; color: var(--grey-600, #4b5563); line-height: 1.4; }
.sq-menu-error { margin: 6px 0; font-size: 0.8125rem; color: var(--error, #b91c1c); }
.sq-menu-edit-actions { display: flex; gap: 8px; margin-top: 8px; }

/* ------------------------------------------------------------------ team invite: accept card, state cards, banner */
.yk-invite-host { position: fixed; inset: 0; z-index: 9100; overflow-y: auto; -webkit-overflow-scrolling: touch; background: var(--white, #fff); padding: 24px 16px 40px; }
.yk-invite-card { max-width: 420px; margin: 0 auto; font-family: var(--font-body, system-ui, sans-serif); color: var(--grey-900, #111827); }
.yk-invite-title { margin: 8px 0 8px; font-size: 1.5rem; line-height: 1.2; font-weight: 700; overflow-wrap: anywhere; }
.yk-invite-title:focus { outline: none; }
.yk-invite-who { margin: 0 0 4px; font-size: 1rem; color: var(--grey-800, #1f2937); }
.yk-invite-sub { margin: 0 0 18px; font-size: 1rem; color: var(--grey-700, #374151); line-height: 1.45; }
.yk-invite-help { margin: 6px 0 14px; font-size: 0.8125rem; color: var(--grey-600, #4b5563); line-height: 1.4; }
.yk-invite-card label { display: block; font-size: 0.875rem; font-weight: 600; margin: 0 0 6px; }
.yk-invite-card input[type="text"] { width: 100%; min-height: 48px; padding: 0 12px; border: 1px solid var(--grey-300, #d1d5db); border-radius: 10px; font: inherit; font-size: 1rem; box-sizing: border-box; }
.yk-invite-switch { display: flex !important; align-items: center; gap: 12px; min-height: 48px; font-weight: 600; }
.yk-invite-switch input { width: 24px; height: 24px; flex: 0 0 auto; }
.yk-invite-error { margin: 8px 0; padding: 10px 12px; border-radius: 10px; background: #fef2f2; color: var(--error, #b91c1c); font-size: 0.875rem; }
.yk-invite-error[hidden] { display: none; }
.yk-invite-card .btn-block { margin-top: 8px; }
.yk-invite-pre { margin: 0 0 12px; }

.yk-invite-banner {
  position: fixed; left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom, 0px)); z-index: 9050;
  display: flex; align-items: center; gap: 8px; max-width: 560px; margin: 0 auto; padding: 8px 8px 8px 14px;
  border-radius: 14px; background: var(--grey-900, #111827); color: var(--white, #fff); box-shadow: 0 6px 20px rgba(15, 23, 42, 0.25);
  font-family: var(--font-body, system-ui, sans-serif); font-size: 0.9375rem;
}
.yk-invite-banner-text { flex: 1 1 auto; min-width: 0; line-height: 1.35; }
.yk-invite-banner-open { flex: 0 0 auto; min-height: 48px; padding: 0 14px; border: 0; border-radius: 10px; background: var(--white, #fff); color: var(--grey-900, #111827); font: inherit; font-weight: 700; cursor: pointer; }
.yk-invite-banner-x { flex: 0 0 auto; width: 48px; min-height: 48px; border: 0; background: none; color: var(--white, #fff); font: inherit; font-size: 1.125rem; cursor: pointer; }

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

/* ------------------------------------------------------------------ P4: the Completed bar and the next-card outline */
.sq-consentbar {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + var(--yk-banner-h, 0px)); z-index: 55; max-width: 536px; margin: 0 auto; padding: 10px 12px;
  border: 1px solid var(--teal-600, #0e7c7b); border-radius: 14px; background: var(--white, #fff); box-shadow: 0 6px 20px rgba(15, 23, 42, 0.18);
}
.sq-consentbar[hidden] { display: none; }
.sq-consentbar-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
.sq-consentbar-text { flex: 1 1 auto; margin: 0; font-size: 0.9375rem; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.sq-consentbar-btn[hidden] { display: none; }
.sq-consentbar-btn { flex: 0 0 auto; }
.sq-consentbar-next { margin: 6px 0 0; font-size: 0.8125rem; color: var(--grey-700, #374151); overflow-wrap: anywhere; }
.sq-consentbar-next:empty { display: none; }
.sq-card--spot { outline: 3px solid var(--teal-600, #0e7c7b); outline-offset: 3px; }
@media (prefers-reduced-motion: no-preference) { .sq-card--spot { transition: outline-color 0.2s ease; } }
