/* ==========================================================================
   Hotel Staff Directory — one shared look for every page.
   Colors, fonts, the logo stripe, the page header, buttons, hotel labels,
   cards, pop-up boxes, messages and the loading box.
   Dark by default; the switch on the main directory picks light or dark for the whole site.
   Color is never the only signal: labels always carry words or symbols too.
   ========================================================================== */
:root {
  --bg: #eef1f4; --surface: #ffffff; --surface-2: #f6f8fa;
  --ink: #18212b; --muted: #5b6876; --line: #d3dae1;
  --accent: #1d3557; --accent-ink: #ffffff; --accent-soft: #e4ebf5; --link: #1a5fa8;
  --hampton: #1a7fd0; --home2: #2b6e2b; --amber: #f4a91c; --amber-soft: #fdf2dc; --amber-ink: #7a5200;
  --warn: #c2410c; --warn-bg: #fff1e6; --ok: #2b6e2b;
  --shadow: 0 10px 30px rgb(15 23 30 / .18);
  --radius: 10px;
  --f-body: "Barlow", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --f-display: "Barlow Condensed", "Arial Narrow", Arial, sans-serif;
  --f-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
/* Dark unless light was picked with the switch on the main directory (see /shared/mode.js). */
:root:not([data-theme="light"]) {
    --bg: #0e1318; --surface: #161d24; --surface-2: #1c252d;
    --ink: #e4eaf0; --muted: #97a4b1; --line: #2b3640;
    --accent: #9cc3ef; --accent-ink: #0e1318; --accent-soft: #1d2b3d; --link: #9cc3ef;
    --hampton: #1673b3; --home2: #327f2b; --amber: #d8930f; --amber-soft: #3a2c10; --amber-ink: #f2c46b;
    --warn: #fb923c; --warn-bg: #3a2112; --ok: #6fcf6f;
    --shadow: 0 10px 30px rgb(0 0 0 / .5);
    color-scheme: dark;
  }

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.45 var(--f-body); }
h1, h2, h3 { font-family: var(--f-display); line-height: 1.1; }
a { color: var(--link); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- logo stripe across the top of every page ---------- */
/* Two identical color cycles make the rightward loop seamless. */
.hs-stripe { position: relative; display: block; flex: 0 0 5px; width: 100%; min-height: 5px; height: 5px; overflow: hidden; background: linear-gradient(90deg, var(--hampton) 0 33.34%, var(--amber) 33.34% 66.67%, var(--home2) 66.67%); }
.hs-stripe::before {
  content: ''; position: absolute; top: 0; bottom: 0; left: 0; width: 200%; pointer-events: none;
  background: linear-gradient(90deg,
    var(--hampton) 0 16.666667%, var(--amber) 16.666667% 33.333333%, var(--home2) 33.333333% 50%,
    var(--hampton) 50% 66.666667%, var(--amber) 66.666667% 83.333333%, var(--home2) 83.333333% 100%);
  animation: hs-stripe-drift 60s linear infinite;
}
@keyframes hs-stripe-drift { from { transform: translateX(-50%); } to { transform: translateX(0); } }
/* Requested exception: keep only the decorative header moving, including in reduced-motion mode. */
@media (prefers-reduced-motion: reduce) { .hs-stripe::before { animation: hs-stripe-drift 60s linear infinite !important; } }
@media print { .hs-stripe::before { animation: none !important; } }

/* ---------- page header: ← Directory · flags · title · actions ---------- */
.hs-top { display: flex; align-items: center; gap: 12px 16px; flex-wrap: wrap; padding: 12px 20px;
  background: var(--surface); border-bottom: 1px solid var(--line); }
.hs-top.sticky { position: sticky; top: 0; z-index: 10; }
.hs-brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.hs-flags { display: grid; grid-template-columns: repeat(3, 8px); gap: 3px; flex: none; }
.hs-flags i { display: block; height: 30px; border-radius: 2px; }
.hs-flags i:nth-child(1) { background: var(--hampton); }
.hs-flags i:nth-child(2) { background: var(--amber); }
.hs-flags i:nth-child(3) { background: var(--home2); }
.hs-title h1 { margin: 0; font-size: 28px; font-weight: 700; letter-spacing: .01em; line-height: 1; }
.hs-title p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.hs-right { margin-left: auto; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
@media (max-width: 600px) { .hs-top { padding: 10px 14px; } .hs-title h1 { font-size: 24px; } .hs-right { margin-left: 0; width: 100%; } }

/* ---------- "Signed in as" bar under the header (added by /shared/whoami.js) ---------- */
.hs-who { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 6px 20px;
  background: var(--surface-2); border-bottom: 1px solid var(--line); font-size: 13.5px; color: var(--ink); }
.hs-who-i { font-size: 14px; }
.hs-who-note { color: var(--muted); }
.hs-who-a { margin-left: auto; font-weight: 700; color: var(--link); }
.hs-who-a + .hs-who-a { margin-left: 0; }
@media (max-width: 600px) { .hs-who { padding: 6px 14px; } .hs-who-note { display: none; } }
.hs-veil.hs-idle { z-index: 10000; }   /* "Still there?" sits above any loading cover */

/* ---------- buttons ---------- */
.hs-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 7px 14px;
  border-radius: 8px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink);
  font: 600 14px/1.2 var(--f-body); text-decoration: none; white-space: nowrap; cursor: pointer; }
.hs-btn:hover { border-color: var(--muted); }
.hs-btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.hs-btn.primary:hover { filter: brightness(1.12); }
.hs-btn.danger { background: transparent; border-color: var(--warn); color: var(--warn); }
.hs-btn.danger.solid { background: var(--warn); color: #fff; }
.hs-btn.sm { min-height: 30px; padding: 4px 10px; font-size: 13px; }
.hs-btn[disabled], .hs-btn:disabled { opacity: .5; cursor: default; filter: none; }

/* ---------- hotel labels (always with the hotel's name) ---------- */
.hs-tag { display: inline-block; font: 700 12px/1.5 var(--f-body); padding: 1px 9px; border-radius: 99px; color: #fff; white-space: nowrap; vertical-align: middle; }
.hs-tag.hi { background: var(--hampton); }
.hs-tag.h2 { background: var(--home2); }
.hs-tag.none { background: transparent; color: var(--muted); border: 1px dashed var(--muted); }
.hs-tag.off { background: transparent; color: var(--muted); border: 1px dashed var(--muted); }

/* ---------- cards ---------- */
.hs-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }

/* ---------- pop-up boxes ---------- */
.hs-veil { position: fixed; inset: 0; z-index: 60; background: rgb(10 15 20 / .5); display: flex; align-items: flex-start;
  justify-content: center; padding: 72px 12px 24px; overflow-y: auto; }
.hs-dialog { width: 100%; max-width: 480px; background: var(--surface); color: var(--ink); border: 1px solid var(--line);
  border-radius: 12px; padding: 20px; box-shadow: var(--shadow); }
.hs-dialog h2 { margin: 0 0 8px; font-size: 24px; }
.hs-dialog .hs-row { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }

/* ---------- saved / error message at the bottom ---------- */
.hs-toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 90; max-width: 90vw;
  background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 8px; font-weight: 600;
  box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: opacity .2s; }
.hs-toast.show { opacity: 1; }
.hs-toast.bad { background: var(--warn); color: #fff; }
.hs-toast.bad::before { content: "⚠ "; }

/* ---------- loading box ---------- */
.hs-cover { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px;
  background: color-mix(in srgb, var(--bg) 70%, transparent); backdrop-filter: blur(2px); cursor: progress; }
.hs-loadcard { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; padding: 16px 22px; font-weight: 600; box-shadow: var(--shadow); max-width: 420px; }
.hs-spin { flex: none; width: 30px; height: 30px; border-radius: 50%; border: 4px solid var(--line);
  border-top-color: var(--hampton); border-right-color: var(--amber); border-bottom-color: var(--home2);
  animation: hs-spin .9s linear infinite; }
@keyframes hs-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .hs-spin { animation-duration: 3s; } .hs-toast { transition: none; } }

@media print { .hs-stripe, .hs-top, .hs-who, .hs-idle, .hs-toast, .hs-cover { display: none !important; } }


.hs-save-status{position:fixed;bottom:12px;right:12px;z-index:45;border:1px solid var(--line);border-radius:8px;padding:8px 12px;max-width:calc(100vw - 24px);background:var(--surface);color:var(--ink);font-size:13px;box-shadow:0 2px 12px #0002;pointer-events:none}
:focus-visible{outline:3px solid var(--accent);outline-offset:3px}
@media print{.hs-save-status{display:none!important}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;transition-duration:.01ms!important}}
