/* Branch status banner (js/branch-status.js): one calm line under the sticky top bar while staff have the branch stopped.
   A fixed layer (the page never moves when it shows), dark like the bar, a thin colour edge per reason, 0.6 s fade. */
.bs {
  --bs-c: var(--red, #e5232f);
  --bs-t: 0.6s;
  position: fixed; z-index: 39; inset-inline: 0; top: var(--bar-full, 64px);
  display: flex; justify-content: center;
  padding: 8px var(--margin, 16px) 0;
  pointer-events: none;
  opacity: 0; transform: translateY(-6px);
  transition: opacity var(--bs-t) var(--ease-soft, ease), transform var(--bs-t) var(--ease-out, ease);
}
.bs.is-in { opacity: 1; transform: none; }
.bs[hidden] { display: none; }
.bs[data-reason="power"] { --bs-c: var(--yellow, #f5c518); }
.bs[data-reason="maintenance"] { --bs-c: var(--blue-strong, #4a88ff); }
.bs[data-reason="internet"] { --bs-c: var(--blue-strong, #4a88ff); }
.bs[data-reason="technical"] { --bs-c: var(--red-strong, #ff3946); }

.bs-card {
  pointer-events: auto;
  position: relative; box-sizing: border-box; overflow: hidden;
  display: flex; align-items: flex-start; gap: 12px;
  width: 100%; max-width: 1080px;
  padding: 10px 8px 10px 16px;
  background: rgba(19, 19, 23, 0.94);
  border: 1px solid color-mix(in srgb, var(--bs-c) 32%, rgba(255, 255, 255, 0.08));
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  color: var(--ink, #f3f3f1);
  font-family: var(--font-text, "Cairo", system-ui, sans-serif);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transition: border-color var(--bs-t) ease;
}
[dir="rtl"] .bs-card { padding: 10px 16px 10px 8px; }
.bs-mark {
  flex: none; align-self: stretch; width: 3px; border-radius: 3px; margin-block: 2px;
  background: var(--bs-c);
  transition: background-color var(--bs-t) ease;
}
.bs-body { flex: 1; min-width: 0; padding-block: 2px; }
.bs-line { margin: 0; font-size: var(--step-small, 0.9rem); line-height: 1.5; overflow-wrap: anywhere; }
.bs-head { font-weight: 800; }
.bs-when { color: var(--muted, #a9a9b0); font-weight: 600; }
.bs-dot { color: var(--muted, #a9a9b0); }
.bs-wait {
  color: var(--ink, #f3f3f1); font-weight: 700; white-space: nowrap;
  text-decoration: underline; text-underline-offset: 0.3em; text-decoration-thickness: 1px;
  text-decoration-color: color-mix(in srgb, var(--bs-c) 70%, transparent);
  transition: text-decoration-color 0.6s ease, color 0.6s ease;
}
@media (hover: hover) and (pointer: fine) { .bs-wait:hover { text-decoration-color: currentColor; } }
.bs-wait:focus-visible, .bs-x:focus-visible { outline: 2px solid var(--blue-strong, #4a88ff); outline-offset: 2px; border-radius: 6px; }
.bs-note { margin: 2px 0 0; font-size: var(--step-small, 0.9rem); line-height: 1.45; color: var(--muted, #a9a9b0); overflow-wrap: anywhere; }
.bs-note[hidden] { display: none; }
.bs-x {
  flex: none; display: inline-grid; place-items: center;
  width: 36px; height: 36px; margin: -4px 0;
  background: none; border: 0; border-radius: 10px; color: var(--muted, #a9a9b0); cursor: pointer;
  transition: color 0.6s ease, background-color 0.6s ease;
}
@media (hover: hover) and (pointer: fine) { .bs-x:hover { color: var(--ink, #f3f3f1); background: rgba(255, 255, 255, 0.06); } }

/* wide screens: a narrower card at the inline end, clear of the page titles and the portal's member header (inline start) */
@media (min-width: 900px) {
  .bs { justify-content: flex-end; }
  .bs-card { width: auto; max-width: min(700px, 100%); }
}
/* phones: the dots become line breaks, so each part reads on its own line */
@media (max-width: 640px) {
  .bs { padding-top: 6px; }
  .bs-card { gap: 10px; border-radius: 12px; }
  .bs-line .bs-dot { display: none; }
  .bs-head, .bs-when { display: block; }
  .bs-wait { display: inline-block; margin-top: 2px; }
}

/* ---------- member portal while the branch is stopped (js/portal*.js read js/branch-status.js) ---------- */
/* the zone box: the "full" area turns into the stop note + the waiting-list button */
.pn-zone-full.is-stop { border-top-color: color-mix(in srgb, var(--yellow, #f5c518) 40%, var(--surface-2, #1e1e23)); color: var(--ink, #f3f3f1); }
/* the floor: seats stay readable but quiet, nothing to tap */
.pn-map .pn-seat { transition: opacity 0.6s ease, border-color 0.6s ease, background-color 0.6s ease, color 0.6s ease; }
.pn-map.is-stopped .pn-seat { opacity: 0.5; cursor: default; }
@media (hover: hover) and (pointer: fine) { .pn-map.is-stopped .pn-seat.is-free:hover { border-color: #6a6a73; } }
/* waiting pill / sheet: paused, places kept */
.pn-wpill.is-paused b { color: var(--muted, #a9a9b0); font-weight: 600; }
.pn-wtext.is-paused { color: var(--ink, #f3f3f1); }
/* menu: Buy time / Top up are off while stopped */
.is-branch-stopped #pn-menu-buy, .is-branch-stopped #pn-menu-topup { cursor: not-allowed; }
.pn-stop-cards p { color: var(--muted, #a9a9b0); }
