/* ══════════════════════════════════════════════════════════════════
   FYM Casino — overlays-lodge.css
   One modal language for every popup surface (UI-polish audit,
   recon item 10). Covers the overlays.js family (showModal /
   showConfirm / showToast / showCelebration / confirmBigBet) plus
   the notifications.js surfaces (bell drawer, detail modal,
   fym-toast) so all of them speak Obsidian-Vault lodge: black felt
   #16140b→#0a0906, gold hairline rgba(233,195,73,·), Bodoni serif
   display, square edges.

   Load LAST among stylesheets (after obsidian-vault.css). Every
   selector is body.ov-scoped, so specificity also wins over the
   legacy .modal-overlay / .toast rules in style.css + theme.css
   regardless of link order.
   ══════════════════════════════════════════════════════════════════ */

/* ── Modal frame (showModal / showConfirm / confirmBigBet) ────────
   `.modal-overlay--lodge` is stamped by overlays.js only — legacy
   .modal-overlay consumers (#pf-modal etc.) keep their own look. */

body.ov .modal-overlay--lodge {
  display: flex;
  position: fixed;
  inset: 0;
  z-index: 1200;                       /* above notif drawer + celebration */
  background: rgba(4, 3, 2, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: lodge-overlay-in 240ms cubic-bezier(0.25, 1, 0.32, 1);
}

body.ov .modal-overlay--lodge .modal-card {
  background: linear-gradient(180deg, #16140b 0%, #0a0906 100%);
  border: 1px solid rgba(233, 195, 73, 0.38);
  border-radius: 0;
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.72),
    inset 0 0 0 1px rgba(233, 195, 73, 0.06);
  padding: 26px 22px 20px;
  max-width: 400px;
  width: 100%;
  position: relative;
  color: #e7e4d6;
  animation: lodge-modal-pop 260ms cubic-bezier(0.22, 0.8, 0.26, 1);
}
/* Inner plaque hairline — the double-frame that reads "engraved". */
body.ov .modal-overlay--lodge .modal-card::before {
  content: '';
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(233, 195, 73, 0.13);
  pointer-events: none;
}

body.ov .modal-overlay--lodge .modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  min-width: 28px;                     /* opt out of the OV 44px floor */
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: transparent;
  border: 1px solid rgba(233, 195, 73, 0.18);
  border-radius: 0;
  color: #bfb79c;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  transition: all 120ms ease;
  z-index: 1;
}
body.ov .modal-overlay--lodge .modal-close:hover {
  color: #e9c349;
  border-color: #e9c349;
  background: rgba(233, 195, 73, 0.06);
}

body.ov .modal-overlay--lodge .modal-label {
  font-family: var(--font-display, 'Bodoni Moda', Georgia, serif);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: #e9c349;
  margin: 0 0 6px;
}
/* Variant accents — error/danger contexts get the oxblood wax. */
body.ov .modal-overlay--lodge[data-variant="error"]  .modal-label { color: #e0726d; }
body.ov .modal-overlay--lodge[data-variant="danger"] .modal-label { color: #e0726d; }

body.ov .modal-overlay--lodge .modal-title {
  font-family: var(--font-display, 'Bodoni Moda', Georgia, serif);
  font-style: italic;
  font-weight: 700;
  font-size: 23px;
  line-height: 1.15;
  color: #f3ead0;
  margin: 0 0 10px;
}

body.ov .modal-overlay--lodge .modal-divider {
  height: 1px;
  border: none;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(233, 195, 73, 0.45) 18%,
    rgba(233, 195, 73, 0.45) 82%,
    transparent 100%);
  margin: 0 0 14px;
}

body.ov .modal-overlay--lodge .modal-body {
  font-family: var(--font-body, 'Manrope', system-ui, sans-serif);
  font-size: 13.5px;
  line-height: 1.6;
  color: #bfb79c;
  margin: 0 0 18px;
}
body.ov .modal-overlay--lodge .modal-body b,
body.ov .modal-overlay--lodge .modal-body strong { color: #f0dd92; }
body.ov .modal-overlay--lodge .modal-body code {
  font-size: 12px;
  color: #e9c349;
  background: rgba(233, 195, 73, 0.07);
  padding: 1px 5px;
}

body.ov .modal-overlay--lodge .modal-actions {
  display: flex;
  gap: 10px;
}

body.ov .modal-overlay--lodge .modal-btn {
  flex: 1;
  min-height: 44px;
  padding: 12px 14px;
  font-family: var(--font-body, 'Manrope', system-ui, sans-serif);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border-radius: 0;
  cursor: pointer;
  transition: all 140ms ease;
}
/* Primary — liquid-gold gradient (confirm + the unstyled legacy
   'primary' variant social.js passes). */
body.ov .modal-overlay--lodge .modal-btn--confirm,
body.ov .modal-overlay--lodge .modal-btn--primary {
  background: linear-gradient(180deg, #f0dd92 0%, #e9c349 48%, #c9992e 100%);
  border: 1px solid #e9c349;
  color: #171204;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    0 6px 18px rgba(233, 195, 73, 0.22);
}
body.ov .modal-overlay--lodge .modal-btn--confirm:hover,
body.ov .modal-overlay--lodge .modal-btn--primary:hover {
  background: linear-gradient(180deg, #f6e7a8 0%, #f0dd92 48%, #d3a838 100%);
}
body.ov .modal-overlay--lodge .modal-btn--confirm:active,
body.ov .modal-overlay--lodge .modal-btn--primary:active {
  transform: translateY(1px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
/* Secondary — ghost with gold hairline. */
body.ov .modal-overlay--lodge .modal-btn--cancel {
  background: transparent;
  border: 1px solid rgba(233, 195, 73, 0.25);
  color: #bfb79c;
}
body.ov .modal-overlay--lodge .modal-btn--cancel:hover {
  color: #e9c349;
  border-color: rgba(233, 195, 73, 0.55);
  background: rgba(233, 195, 73, 0.05);
}
/* Danger — oxblood wax. */
body.ov .modal-overlay--lodge .modal-btn--danger {
  background: linear-gradient(180deg, #8c2f28 0%, #5c1d18 100%);
  border: 1px solid rgba(224, 114, 109, 0.45);
  color: #ffd9d4;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
}
body.ov .modal-overlay--lodge .modal-btn--danger:hover {
  background: linear-gradient(180deg, #a83a30 0%, #6e2620 100%);
}

@keyframes lodge-overlay-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes lodge-modal-pop {
  from { opacity: 0; transform: translateY(10px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Toast stack (overlays.js showToast) ──────────────────────────
   The (0,3,1) specificity here deliberately buries the legacy
   `.toast { position:fixed; animation: … toastOut 2.5s forwards }`
   from style.css/theme.css, which piled every toast onto one spot
   and force-hid it at 2.8 s. */

body.ov .toast-stack {
  position: fixed;
  top: calc(var(--fym-safe-top, env(safe-area-inset-top, 0px)) + 12px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 1300;                       /* feedback stays visible over modals */
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 400px;
  width: calc(100% - 24px);
  pointer-events: none;
}

body.ov .toast-stack .toast {
  position: static;                    /* neutralise legacy fixed pile-up */
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(180deg, #16140b 0%, #0a0906 100%);
  border: 1px solid rgba(233, 195, 73, 0.30);
  border-left: 3px solid rgba(233, 195, 73, 0.65);
  border-radius: 0;
  padding: 11px 12px 11px 14px;
  font-family: var(--font-body, 'Manrope', system-ui, sans-serif);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
  text-align: left;                    /* legacy centred it */
  color: #e7e4d6;
  box-shadow:
    0 14px 40px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(233, 195, 73, 0.08);
  pointer-events: auto;
  animation: lodge-toast-in 240ms cubic-bezier(0.25, 1, 0.32, 1);
}
body.ov .toast-stack .toast[data-type="success"] { border-left-color: #4cbf8f; }
body.ov .toast-stack .toast[data-type="error"]   { border-left-color: #cf4a40; }
body.ov .toast-stack .toast[data-type="warn"]    { border-left-color: #d9a441; }
body.ov .toast-stack .toast[data-type="info"]    { border-left-color: #e9c349; }

body.ov .toast-stack .toast-icon {
  display: flex;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  font-size: 0;                        /* kill legacy glyph font sizing */
}
body.ov .toast-stack .toast-icon svg {
  display: block;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

body.ov .toast-stack .toast-body { flex: 1; min-width: 0; }

body.ov .toast-stack .toast-action {
  background: linear-gradient(180deg, #f0dd92 0%, #e9c349 60%, #c9992e 100%);
  border: none;
  border-radius: 0;
  color: #171204;
  padding: 6px 12px;
  min-height: 28px;
  min-width: 28px;
  font-family: var(--font-body, 'Manrope', system-ui, sans-serif);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

body.ov .toast-stack .toast-close {
  background: transparent;
  border: none;
  color: #8f8a78;
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
  padding: 4px 6px;
  min-height: 28px;
  min-width: 28px;
  flex-shrink: 0;
  transition: color 120ms ease;
}
body.ov .toast-stack .toast-close:hover { color: #e9c349; }

body.ov .toast-stack .toast--leaving {
  animation: lodge-toast-out 200ms cubic-bezier(0.25, 1, 0.32, 1) forwards;
}

@keyframes lodge-toast-in {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes lodge-toast-out {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(-12px); }
}

/* ── Celebration (showCelebration) ──────────────────────────────── */

body.ov .celebration {
  background: rgba(3, 2, 1, 0.78);
}
body.ov .celebration--mid { background: rgba(3, 2, 1, 0.5); }

body.ov .celebration-ornament {
  display: flex;
  justify-content: center;
  margin: 0 0 10px;
  animation: lodge-cel-orn-in 420ms cubic-bezier(0.25, 1, 0.32, 1) both;
}
body.ov .celebration-ornament svg {
  filter: drop-shadow(0 3px 12px rgba(233, 195, 73, 0.35));
}

body.ov .celebration-label {
  font-family: var(--font-display, 'Bodoni Moda', Georgia, serif);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: #e9c349;
  text-indent: 0.42em;                 /* optically re-centre the tracking */
}

/* Liquid-gold amount — gradient-clipped Bodoni with a warm bloom. */
body.ov .celebration-amount {
  background: linear-gradient(180deg,
    #fbf3d0 0%, #f0dd92 32%, #e9c349 58%, #a97c1f 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 6px 26px rgba(233, 195, 73, 0.38));
}

/* Meta enters 260 ms late so it never crosses the amount mid-flight
   (the amount rises 40 px during its 480 ms entry). */
body.ov .celebration-meta {
  color: #bfb79c;
  letter-spacing: 0.12em;
  animation: lodge-cel-meta-in 320ms ease 260ms both;
}

body.ov .celebration-ray {
  background: linear-gradient(to top,
    rgba(233, 195, 73, 0.55) 0%,
    transparent 100%);
}
body.ov .celebration-particle {
  background: #f0dd92;
  box-shadow: 0 0 6px rgba(233, 195, 73, 0.8);
}

/* Light tier — plaque chip in the house felt. */
body.ov .celebration--light {
  background: linear-gradient(180deg, #16140b 0%, #0a0906 100%);
  border: 1px solid rgba(233, 195, 73, 0.35);
  border-radius: 0;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.55);
}
body.ov .celebration--light .celebration-amount {
  filter: none;
}

@keyframes lodge-cel-orn-in {
  from { opacity: 0; transform: translateY(-10px) scale(0.9); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes lodge-cel-meta-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Notifications drawer refinements (bell panel) ────────────────
   obsidian-vault.css already lays the felt; this fixes what it
   missed: header actions wrapping to two lines, dead .notif-title
   selectors (markup uses .notif-item-title), flat icon chips. */

body.ov .notif-panel-head {
  display: flex;
  align-items: center;
  gap: 8px;
}
body.ov .notif-panel-title { flex: 1; white-space: nowrap; }
body.ov .notif-mark-all,
body.ov .notif-clear-all {
  white-space: nowrap;
  font-size: 10px;
  padding: 6px 8px;
  min-height: 32px;
  min-width: 32px;
  flex-shrink: 0;
}

body.ov .notif-item-icon {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 28%, #2c2510 0%, #14100a 72%);
  border: 1px solid rgba(233, 195, 73, 0.22);
  box-shadow:
    inset 0 1px 0 rgba(233, 195, 73, 0.12),
    0 2px 6px rgba(0, 0, 0, 0.4);
  color: #e9c349;
}
body.ov .notif-item-icon svg { width: 20px; height: 20px; }

body.ov .notif-item-title {
  color: #f0dd92;
  font-weight: 600;
  font-size: 13px;
}
body.ov .notif-item-time {
  color: #8f8a78;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
body.ov .notif-item-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #e9c349;
  box-shadow: 0 0 8px rgba(233, 195, 73, 0.6);
  flex-shrink: 0;
}

/* Base for the house notification emblems wherever they land. */
body.ov .notif-glyph { display: inline-block; vertical-align: middle; }

/* Detail modal icon + fym-toast icon carry the same emblem size. */
body.ov .notif-modal-icon { line-height: 0; }
body.ov .notif-modal-icon svg { width: 44px; height: 44px; }
body.ov .notif-modal-icon .material-symbols-outlined { font-size: 36px !important; }

body.ov .fym-toast-icon { line-height: 0; filter: none; }
body.ov .fym-toast-icon svg {
  width: 26px;
  height: 26px;
  filter: drop-shadow(0 3px 8px rgba(233, 195, 73, 0.35));
}
body.ov .fym-toast-title {
  color: #f0dd92;
  font-family: var(--font-body, 'Manrope', system-ui, sans-serif);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
}
body.ov .fym-toast-sub { color: #bfb79c; font-size: 10.5px; }

/* ── Reduced motion ──────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  body.ov .modal-overlay--lodge,
  body.ov .modal-overlay--lodge .modal-card,
  body.ov .toast-stack .toast,
  body.ov .celebration-ornament,
  body.ov .celebration-meta { animation-duration: 1ms; animation-delay: 0ms; }
}
