/* guest-portal.css (was styles.css) - global styles for index.html (login, calendar, modals, form inputs).
   Tailwind utilities come from the CDN script; only custom rules live here. */
body { background-color:var(--bg); color:var(--ink);
  background-image:linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size:40px 40px; }
.fade-in { animation: fadeIn .3s ease-in-out; }
@keyframes fadeIn { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:none; } }
::-webkit-scrollbar { width:6px; height:6px; }
::-webkit-scrollbar-thumb { background:var(--line); border-radius:3px; }
.calendar-day { min-height:90px; }
@media (max-width:640px) { .calendar-day { min-height:70px; } }
.inp { width:100%; border:1px solid var(--line); background:var(--panel); color:var(--ink); border-radius:6px; padding:6px 10px; font-size:14px; }
.inp::placeholder { color:var(--mute); opacity:.7; }
.inp:focus { outline:2px solid var(--acc); outline-offset:-1px; }
.modal { position:fixed; inset:0; background:rgba(15,23,42,.5); backdrop-filter:blur(4px); z-index:50; display:flex; align-items:center; justify-content:center; padding:1rem; }
.modal.hidden { display:none; }
/* admin calendar */
.acal-cell { min-height:84px; width:100%; }
@media (max-width:640px) { .acal-cell { min-height:64px; } }
.tl-cell { min-width:28px; height:28px; }
#rules-modal { z-index:55; }   /* opened from the booking-success screen: must sit above #booking-modal */
.inp:disabled { background:var(--grid); }

/* ==========================================================================
   THEMES - the same three as the main site (index.html): Light, Plain (white), Dark.
   Tokens match css/styles.css section 01. The choice is shared with the main site via
   localStorage "h8-theme" (js/guest/theme-init.js applies it, js/guest/theme-switch.js
   handles the .theme-btn buttons). The portal is built from Tailwind utility classes, so
   the rules below remap those utilities onto the tokens.
   ========================================================================== */
:root {
  --v:#6d3fe0; --pk:#c9246a; --on:#fff; --bg:#f6f8fc; --panel:#fff; --ink:#0f1b33; --mute:#516079;
  --ao:.1; --line:#d3dcea; --grid:#e7edf6; --acc:#0b5fd1; --hot:#b45309; --ok:#0b8a4f; --brand-dk:#1e3a8a;
  color-scheme:light;
}
:root[data-theme="dark"] {
  --v:#a78bfa; --pk:#ff5fa2; --on:#04122a; --bg:#071a33; --panel:#0b2447; --ink:#e6f1ff; --mute:#8fb0d6;
  --ao:.38; --line:#1f4274; --grid:#0f2c52; --acc:#5ec8f2; --hot:#ffb000; --ok:#4be39a; --brand-dk:#14396b;
  color-scheme:dark;
}
:root[data-theme="white"] {
  --v:#1f4fd8; --pk:#1f4fd8; --on:#fff; --bg:#fff; --panel:#fff; --ink:#111827; --mute:#4b5563;
  --ao:0; --line:#d9dde3; --grid:#f3f4f6; --acc:#1f4fd8; --hot:#374151; --ok:#15803d; --brand-dk:#1a3a9c;
  color-scheme:light;
}

/* theme switch button (one in the login corner, one in the top bar) */
.theme-btn { flex:none; width:38px; height:38px; border:1px solid var(--line); background:var(--panel); color:var(--ink);
  border-radius:6px; font:18px ui-monospace, Consolas, monospace; cursor:pointer; transition:.2s; }
.theme-btn:hover { border-color:var(--acc); }
.theme-btn.login-corner { position:absolute; top:16px; right:16px; z-index:5; }

/* surfaces, text, borders */
html[data-theme] .text-slate-800, html[data-theme] .text-slate-700,
html[data-theme] .hover\:text-slate-800:hover, html[data-theme] .hover\:text-slate-700:hover { color:var(--ink); }
html[data-theme] .text-slate-600, html[data-theme] .text-slate-500, html[data-theme] .text-slate-400,
html[data-theme] .hover\:text-slate-600:hover { color:var(--mute); }
html[data-theme] .bg-white { background-color:var(--panel); }
html[data-theme] .bg-white\/80 { background-color:color-mix(in srgb, var(--panel) 80%, transparent); }
html[data-theme] .bg-slate-50, html[data-theme] .bg-slate-100,
html[data-theme] .hover\:bg-slate-50:hover, html[data-theme] .hover\:bg-slate-100:hover, html[data-theme] .hover\:bg-white:hover { background-color:var(--grid); }
html[data-theme] .bg-slate-200 { background-color:var(--line); }
html[data-theme] .border-slate-100, html[data-theme] .border-slate-200, html[data-theme] .border-slate-300 { border-color:var(--line); }
html[data-theme] .divide-slate-100 > :not([hidden]) ~ :not([hidden]),
html[data-theme] .divide-slate-200 > :not([hidden]) ~ :not([hidden]) { border-color:var(--line); }
html[data-theme] #login-view { background:transparent; }
html[data-theme] nav.sticky { background-color:color-mix(in srgb, var(--panel) 88%, transparent); backdrop-filter:blur(8px); }
html[data-theme] .bg-brand-900 { background-color:var(--brand-dk); }

/* brand accent follows the theme accent */
html[data-theme] .bg-brand-600, html[data-theme] .bg-brand-700 { background-color:var(--acc); color:var(--on); }
html[data-theme] .hover\:bg-brand-700:hover, html[data-theme] .hover\:bg-brand-800:hover { background-color:color-mix(in srgb, var(--acc) 85%, #000); }
html[data-theme] .text-brand-600, html[data-theme] .text-brand-700, html[data-theme] .text-brand-800,
html[data-theme] .hover\:text-brand-800:hover { color:var(--acc); }
html[data-theme] .bg-brand-50, html[data-theme] .bg-brand-100 { background-color:color-mix(in srgb, var(--acc) 12%, var(--panel)); }
html[data-theme] .border-brand-100 { border-color:color-mix(in srgb, var(--acc) 25%, var(--panel)); }
html[data-theme] .border-brand-500, html[data-theme] .border-brand-600 { border-color:var(--acc); }
html[data-theme] .ring-brand-600 { --tw-ring-color:var(--acc); }

/* Plain: flat, no shadows, borders carry the structure (like the main site) */
:root[data-theme="white"] .shadow, :root[data-theme="white"] .shadow-sm, :root[data-theme="white"] .shadow-md,
:root[data-theme="white"] .shadow-lg, :root[data-theme="white"] .shadow-2xl { box-shadow:none; }
:root[data-theme="white"] #guest-room-portal { border:1px solid var(--line); }

/* Dark: tinted status colours rebuilt on the dark palette (opaque, so grids and cards stay crisp) */
:root[data-theme="dark"] :is(.bg-blue-50,.bg-blue-100,.bg-blue-100\/60) { background-color:color-mix(in srgb, var(--acc) 16%, var(--panel)); }
:root[data-theme="dark"] :is(.bg-emerald-50,.bg-emerald-100,.bg-green-100,.bg-teal-100,.hover\:bg-emerald-100:hover) { background-color:color-mix(in srgb, var(--ok) 16%, var(--panel)); }
:root[data-theme="dark"] :is(.bg-amber-50,.bg-amber-100,.bg-amber-200) { background-color:color-mix(in srgb, var(--hot) 18%, var(--panel)); }
:root[data-theme="dark"] :is(.bg-red-50,.bg-red-100,.bg-rose-50,.hover\:bg-red-50:hover,.hover\:bg-rose-100:hover) { background-color:color-mix(in srgb, var(--pk) 16%, var(--panel)); }
:root[data-theme="dark"] .bg-purple-100 { background-color:color-mix(in srgb, var(--v) 18%, var(--panel)); }
:root[data-theme="dark"] :is(.border-blue-100,.border-blue-200) { border-color:color-mix(in srgb, var(--acc) 30%, var(--panel)); }
:root[data-theme="dark"] :is(.border-emerald-100,.border-emerald-200) { border-color:color-mix(in srgb, var(--ok) 30%, var(--panel)); }
:root[data-theme="dark"] :is(.border-amber-200) { border-color:color-mix(in srgb, var(--hot) 30%, var(--panel)); }
:root[data-theme="dark"] :is(.border-rose-100,.border-rose-200,.border-red-100,.border-red-200) { border-color:color-mix(in srgb, var(--pk) 30%, var(--panel)); }
:root[data-theme="dark"] :is(.text-blue-600,.text-blue-700,.text-blue-800,.text-blue-900,.hover\:text-blue-800:hover) { color:var(--acc); }
:root[data-theme="dark"] :is(.text-emerald-600,.text-emerald-700,.text-emerald-800,.text-green-600,.text-teal-600,.hover\:text-emerald-800:hover) { color:var(--ok); }
:root[data-theme="dark"] :is(.text-amber-600,.text-amber-700,.text-amber-800,.text-amber-900) { color:var(--hot); }
:root[data-theme="dark"] :is(.text-red-400,.text-red-500,.text-red-600,.text-rose-600,.text-rose-700,.text-rose-800,.hover\:text-red-600:hover,.hover\:text-red-700:hover) { color:var(--pk); }
:root[data-theme="dark"] .text-purple-700 { color:var(--v); }
:root[data-theme="dark"] :is(.bg-emerald-500,.bg-emerald-600) { background-color:var(--ok); color:var(--on); }
:root[data-theme="dark"] :is(.hover\:bg-emerald-700:hover) { background-color:color-mix(in srgb, var(--ok) 85%, #fff); }
:root[data-theme="dark"] :is(.bg-red-500,.bg-red-600,.bg-rose-600) { background-color:var(--pk); color:var(--on); }
:root[data-theme="dark"] :is(.hover\:bg-red-700:hover,.hover\:bg-rose-700:hover) { background-color:color-mix(in srgb, var(--pk) 85%, #fff); }
:root[data-theme="dark"] .bg-amber-500 { background-color:var(--hot); color:var(--on); }
:root[data-theme="dark"] :is(.bg-slate-700,.bg-slate-800) { background-color:var(--line); color:var(--ink); }
:root[data-theme="dark"] :is(.hover\:bg-slate-800:hover,.hover\:bg-slate-900:hover) { background-color:color-mix(in srgb, var(--line) 80%, #fff); }
:root[data-theme="dark"] :is(.hover\:bg-brand-700:hover,.hover\:bg-brand-800:hover) { background-color:color-mix(in srgb, var(--acc) 85%, #fff); }
:root[data-theme="white"] :is(.bg-slate-700,.bg-slate-800) { background-color:var(--hot); }

/* ==========================================================================
   AMBIENT BACKGROUND - same layers as the main site (styles.css sections 17 and 24):
   page grid (on body, above), drifting glow blobs (.aur), cursor spotlight grid (.spot),
   scroll-progress bar (#pg) and the circuit/particle canvas (#bgcv, here full-page instead
   of hero-only). Driven by js/guest/background.js. Plain theme switches all of it off.
   ========================================================================== */
.aur { position:fixed; inset:0; z-index:-1; overflow:hidden; pointer-events:none; }
.aur i { position:absolute; width:48vmax; height:48vmax; border-radius:50%; filter:blur(100px); opacity:var(--ao); animation:fl 24s ease-in-out infinite alternate; }
.aur i:nth-child(1) { background:var(--acc); top:-18vmax; left:-14vmax; }
.aur i:nth-child(2) { background:var(--v); top:20vh; right:-20vmax; animation-delay:-8s; }
.aur i:nth-child(3) { background:var(--pk); bottom:-24vmax; left:20vw; animation-delay:-15s; }
@keyframes fl { to { transform:translate(8vmax, 6vmax) scale(1.25); } }
.spot { position:fixed; inset:0; z-index:-1; pointer-events:none; opacity:.45;
  background-image:linear-gradient(var(--acc) 1px, transparent 1px), linear-gradient(90deg, var(--acc) 1px, transparent 1px);
  background-size:40px 40px;
  -webkit-mask-image:radial-gradient(300px circle at var(--cx, 50%) var(--cy, -30%), #000, transparent 70%);
  mask-image:radial-gradient(300px circle at var(--cx, 50%) var(--cy, -30%), #000, transparent 70%); }
#pg { position:fixed; top:0; left:0; right:0; height:3px; z-index:65; transform:scaleX(0); transform-origin:0 50%;
  background:linear-gradient(90deg, var(--acc), var(--v), var(--pk), var(--hot)); }
#bgcv { position:fixed; inset:0; width:100%; height:100%; z-index:-1; pointer-events:none; opacity:.55; }
:root[data-theme="white"] .aur, :root[data-theme="white"] .spot, :root[data-theme="white"] #bgcv, :root[data-theme="white"] #pg { display:none; }
:root[data-theme="white"] body { background-image:none; }
@media (prefers-reduced-motion:reduce) { .aur i { animation:none; } }
@media print { .aur, .spot, #pg, #bgcv, .theme-btn { display:none !important; } }
