/* ═══════════════════════════════════════════════════════════════════════════
   STATUS UI — one family for every message, confirm window, result and empty
   state on the player site.

   Owner 2026-10-09, second direction: "make everything that looks AI — all
   these notifications / tips / reminders — look way cooler, like the winning
   animation on the house games". Every moment uses the site's event kit
   (src/components/ui/fx + ui-fx.css, from the house games' win card) in its tone:
     success / money in   pop + glow + one light sweep + sparks, count-up on the amount
     process              pop + steps (FxSteps)
     waiting / warning    crisp entrance, amber
     error                crisp entrance, red — no sparks, no shake
     neutral / info       crisp entrance, crystal; empty states the subtle neutral one
   Rules: a card gets a tinted edge + a light from its top-left corner in its tone
   (never a solid coloured fill), the status dot is a small glowing gem, text stays
   white / --text-muted, amounts white 700 tabular, no icons in circles, no ALL-CAPS.
   Motion: transform / opacity only, over within 0.9 s; reduced motion = a plain fade.

   Pieces (React helpers in src/components/ui/StatusUi.tsx):
     .gz-msg (+ --error | --success | --warn | --info | --process, + --box | --result,
              + fx-pop | fx-enter)                           message: gem dot + text, or an event card
         > .gz-msg__body > .gz-msg__title + .gz-msg__text, + .gz-msg__steps + .gz-msg__actions
     .gz-state (+ --pending | --ok | --bad | --info | --off)  status word with a dot ("Sent")
     .gz-facts > div > dt + dd (+ --plain)                   label / value list, hairlines
     .gz-empty > __title + __text + __actions                two quiet lines, subtle neutral entrance
     .gz-layer > .gz-dialog > __title __lead __body __note __actions   confirm / small dialog
     .gz-btn (+ --primary | --secondary | --quiet, --sm, --block)  buttons inside these
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --gz-line: rgba(255, 255, 255, 0.07);          /* hairline on any of the dark surfaces */
  --gz-quiet-bg: rgba(255, 255, 255, 0.035);     /* a note set apart inside a panel */
  --gz-tone-error: var(--danger, #f87171);
  --gz-tone-success: var(--success, #2ddd1e);
  --gz-tone-warn: var(--warning, #f59e0b);
  --gz-tone-info: var(--focus-ring, #8fd6ff);
  --gz-tone-off: var(--text-dim, #82a0b6);
}

/* ── Message: a glowing tone dot + plain text; boxed = an event card ───────── */
.gz-msg {
  --fx: var(--gz-tone-info);
  --fx-rgb: 143, 214, 255;
  --gz-dot: var(--gz-tone-off);
  --gz-dot-glow: 0;
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  min-width: 0;
  margin: 0;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
  color: var(--text-muted, #a8bfdc);
  text-align: left;
  overflow-wrap: anywhere;
}
/* the dot: a small gem in the tone, lit from inside */
.gz-msg::before {
  content: '';
  flex: none;
  width: 7px;
  height: 7px;
  margin-top: calc(0.725em - 3.5px);   /* centred on the first line */
  border-radius: 50%;
  background: var(--gz-dot);
  box-shadow: 0 0 0 3px rgba(var(--fx-rgb), calc(var(--gz-dot-glow) * .14)), 0 0 9px rgba(var(--fx-rgb), calc(var(--gz-dot-glow) * .75));
}
.gz-msg--error { --fx: var(--gz-tone-error); --fx-rgb: var(--danger-rgb, 248, 113, 113); --gz-dot: var(--gz-tone-error); --gz-dot-glow: 1; color: #e9eff6; }
.gz-msg--warn { --fx: var(--gz-tone-warn); --fx-rgb: var(--warning-rgb, 245, 158, 11); --gz-dot: var(--gz-tone-warn); --gz-dot-glow: 1; color: #e9eff6; }
.gz-msg--success { --fx: var(--gz-tone-success); --fx-rgb: var(--success-rgb, 45, 221, 30); --gz-dot: var(--gz-tone-success); --gz-dot-glow: 1; }
.gz-msg--info { --gz-dot: var(--gz-tone-info); --gz-dot-glow: .8; }
.gz-msg--process { --fx: var(--info, #38bdf8); --fx-rgb: var(--info-rgb, 56, 189, 248); --gz-dot: var(--fx); --gz-dot-glow: 1; }
.gz-msg--plain::before { display: none; }
/* success: the dot pings once as the message lands (a ring that grows and fades) */
.gz-msg--success.gz-msg--fx::after {
  content: '';
  position: absolute;
  left: -3.5px;
  top: calc(0.725em - 7px);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1.5px solid var(--fx);
  opacity: 0;
  pointer-events: none;
  animation: gz-ping .7s .14s cubic-bezier(.2, .7, .3, 1);
}
@keyframes gz-ping {
  0% { opacity: .9; transform: scale(.4); }
  100% { opacity: 0; transform: scale(2.1); }
}
.gz-msg__body { position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.gz-msg__title { margin: 0; font-size: 14px; font-weight: 700; line-height: 1.35; color: #fff; }
.gz-msg__title + .gz-msg__text { color: var(--text-muted, #a8bfdc); }
.gz-msg__text { margin: 0; }
.gz-msg b,
.gz-msg strong { font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; }
.gz-msg__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.gz-msg__steps { margin-top: 8px; flex-wrap: wrap; row-gap: 6px; }

/* Event card (boxed / result): the win card's surface, calmer — a tinted edge and a light from
   the top-left corner in the tone, the inset highlight; success adds the soft green glow. */
.gz-msg--box {
  isolation: isolate;
  padding: 11px 14px 12px;
  border: 1px solid rgba(var(--fx-rgb), .3);
  border-radius: var(--radius-lg, 8px);
  background:
    radial-gradient(140% 190% at 0% 0%, rgba(var(--fx-rgb), .15) 0%, rgba(var(--fx-rgb), 0) 56%),
    linear-gradient(180deg, rgba(255, 255, 255, .04) 0%, rgba(255, 255, 255, .015) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07);
}
.gz-msg--box:not(.gz-msg--success):not(.gz-msg--error):not(.gz-msg--warn):not(.gz-msg--process) { border-color: rgba(var(--fx-rgb), .18); }
.gz-msg--box.gz-msg--success {
  border-color: rgba(var(--fx-rgb), .5);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .09),
    0 0 0 1px rgba(var(--fx-rgb), .08),
    0 0 30px -10px rgba(var(--fx-rgb), .4);
}
.gz-msg--box.gz-msg--fx::after { left: 10.5px; top: calc(11px + 0.725em - 7px); }   /* the ping sits on the dot */
/* a result after an action: a little more air, the title a step up */
.gz-msg--result { padding: 13px 16px 14px; }
.gz-msg--result::before { margin-top: calc(0.725em - 1.5px); }
.gz-msg--result.gz-msg--fx::after { left: 12.5px; top: calc(13px + 0.725em - 5px); }
.gz-msg--result .gz-msg__title { font-size: 15px; }
.gz-msg--center { justify-content: center; text-align: center; }

/* ── Status word with a glowing dot (lists: withdrawals, tickets, bets …) ───── */
.gz-state {
  --gz-dot: var(--gz-tone-off);
  --gz-dot-rgb: 130, 160, 182;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--text-muted, #a8bfdc);
  white-space: nowrap;
  text-transform: none;
  letter-spacing: normal;
}
.gz-state::before {
  content: '';
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gz-dot);
  box-shadow: 0 0 7px rgba(var(--gz-dot-rgb), .7);
}
.gz-state--pending { --gz-dot: var(--gz-tone-warn); --gz-dot-rgb: var(--warning-rgb, 245, 158, 11); }
.gz-state--ok { --gz-dot: var(--gz-tone-success); --gz-dot-rgb: var(--success-rgb, 45, 221, 30); }
.gz-state--bad { --gz-dot: var(--gz-tone-error); --gz-dot-rgb: var(--danger-rgb, 248, 113, 113); }
.gz-state--info { --gz-dot: var(--gz-tone-info); --gz-dot-rgb: 143, 214, 255; }
.gz-state--off { --gz-dot: var(--gz-tone-off); color: var(--text-dim, #82a0b6); }
.gz-state--off::before { box-shadow: none; }

/* ── Facts: label left, value right, hairlines between rows ─────────────────── */
.gz-facts { display: flex; flex-direction: column; min-width: 0; margin: 0; padding: 0; }
.gz-facts > div {
  display: flex;
  flex-wrap: wrap;               /* a long amount drops under its label — never broken */
  align-items: baseline;
  justify-content: space-between;
  column-gap: 16px;
  row-gap: 2px;
  min-width: 0;
  padding: 9px 0;
  border-top: 1px solid var(--gz-line);
}
.gz-facts > div:last-child { border-bottom: 1px solid var(--gz-line); }
.gz-facts dt {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--text-muted, #a8bfdc);
}
.gz-facts dd {
  margin: 0 0 0 auto;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  color: #fff;
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.gz-facts dd small { font-size: 12px; font-weight: 600; color: var(--text-dim, #82a0b6); }
.gz-facts .is-plus { color: var(--gz-tone-success); }
/* compact, no rules (e.g. a fee + "you get" pair under a form) */
.gz-facts--plain > div,
.gz-facts--plain > div:last-child { padding: 3px 0; border: 0; }

/* ── Empty state: two quiet lines, no picture ───────────────────────────────── */
.gz-empty {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 0;
  padding: 32px 20px 36px;
  text-align: center;
  animation: fx-enter .22s cubic-bezier(.33, 1, .68, 1) backwards;
}
/* the subtle neutral moment: a faint crystal light behind the two lines */
.gz-empty::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 14px;
  z-index: -1;
  width: min(320px, 90%);
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(143, 214, 255, .07), rgba(143, 214, 255, 0));
  transform: translateX(-50%);
  pointer-events: none;
}
.gz-empty__title { margin: 0; font-size: 14px; font-weight: 700; line-height: 1.35; color: #fff; }
.gz-empty__text { margin: 0; max-width: 360px; font-size: 13px; font-weight: 500; line-height: 1.45; color: var(--text-dim, #82a0b6); }
.gz-empty__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 12px; }

/* ── Buttons used inside messages and dialogs (same as .og-btn / the cashier's) ─ */
.gz-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: var(--radius-md, 6px);
  background: var(--bg-elevated, #3e596b);
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--dur-fast, .16s) var(--ease-out, ease), opacity var(--dur-fast, .16s) var(--ease-out, ease);
}
.gz-btn--primary { background: var(--accent, #1474e1); color: var(--accent-text, #fff); }
.gz-btn--secondary { background: var(--bg-elevated, #3e596b); color: #fff; }
.gz-btn--quiet { background: transparent; color: var(--text-muted, #a8bfdc); }
.gz-btn--block { width: 100%; }
.gz-btn--sm { min-height: 36px; padding: 0 14px; font-size: 13px; }
@media (hover: hover) {
  .gz-btn--primary:not(:disabled):hover { background: var(--accent-hover, #1a82f0); }
  .gz-btn--secondary:not(:disabled):hover,
  .gz-btn:not(.gz-btn--primary):not(.gz-btn--quiet):not(:disabled):hover { background: var(--bg-elevated-hover, #4b6a7e); }
  .gz-btn--quiet:not(:disabled):hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
}
.gz-btn:active:not(:disabled) { opacity: 0.88; }
.gz-btn:disabled { opacity: var(--disabled-opacity, .5); cursor: not-allowed; }
.gz-btn:focus-visible { outline: 2px solid var(--focus-ring, #8fd6ff); outline-offset: 2px; }
@media (pointer: coarse) { .gz-btn--sm { min-height: 44px; } }

/* ── Dialog: a dim layer + one neutral card ─────────────────────────────────── */
.gz-layer {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(3, 10, 16, 0.62);
  animation: gz-fade-in .16s var(--ease-out, ease-out);
}
.gz-dialog {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  max-width: 400px;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 20px;
  background: var(--bg-secondary, #213545);
  border: 1px solid var(--border-color, #2f4553);
  border-radius: var(--radius-lg, 8px);
  box-shadow: 0 24px 56px -16px rgba(0, 0, 0, 0.6);
  color: var(--text-primary, #fff);
  text-align: left;
  font-family: inherit;
  animation: gz-fade-in .16s var(--ease-out, ease-out);
}
.gz-dialog__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.gz-dialog__title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.005em;
  color: #fff;
}
.gz-dialog__lead { margin: 0; font-size: 14px; font-weight: 500; line-height: 1.55; color: var(--text-muted, #a8bfdc); }
.gz-dialog__lead strong,
.gz-dialog__lead b { font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; white-space: nowrap; }
.gz-dialog__body { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.gz-dialog__note { margin: 0; font-size: 13px; font-weight: 500; line-height: 1.45; color: var(--text-dim, #82a0b6); }
.gz-dialog__actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 2px; }
.gz-dialog__actions > .gz-btn:only-child { grid-column: 1 / -1; }
.gz-dialog__actions .gz-btn { overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 360px) {
  .gz-dialog { padding: 16px; }
  .gz-dialog__actions { grid-template-columns: minmax(0, 1fr); }
  .gz-dialog__actions > .gz-btn--primary { order: -1; }
}

/* ── House-game bet errors (.og-error, originals-ui.css) in the same family: a quiet strip with a
   red dot, white text. Doubled class = wins over the kit rule whatever loads first. ── */
.og-error.og-error {
  position: relative;
  padding: 8px 12px 8px 26px;
  background: rgba(255, 255, 255, 0.035);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07);
  color: #e9eff6;
  font-weight: 600;
  text-align: left;
}
.og-error.og-error::before {
  content: '';
  position: absolute;
  left: 12px;
  top: calc(8px + 0.675em - 3px);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gz-tone-error);
}

/* ── In-game refusal messages (phone toast on the stage .sg-m-error-toast, HiLo's .hilo-notice): a
   neutral card with a small dot — no dark-red box, no red text, no icon; a short fade. ── */
.sg-m-error-toast.sg-m-error-toast,
.hilo-notice.hilo-notice {
  background: var(--bg-card, #2a4152);
  border: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), var(--shadow-lg);
  color: #e9eff6;
  text-align: left;
  animation: gz-fade-in .16s var(--ease-out, ease-out);
}
.sg-m-error-toast.sg-m-error-toast { display: flex; align-items: flex-start; gap: 9px; }
.sg-m-error-toast.sg-m-error-toast > svg { display: none; }
.sg-m-error-toast.sg-m-error-toast::before,
.hilo-notice.hilo-notice::before {
  content: '';
  flex: none;
  width: 6px;
  height: 6px;
  margin-top: calc(0.65em - 3px);
  border-radius: 50%;
  background: var(--gz-tone-error);
}
.hilo-notice.hilo-notice::before { display: inline-block; margin: 0 8px 0 0; vertical-align: 0.1em; }
.sg-m-error-toast.hilo-toast-info::before,
.hilo-notice.hilo-notice.info::before { background: var(--gz-tone-info); }
@media (prefers-reduced-motion: reduce) {
  .sg-m-error-toast.sg-m-error-toast,
  .hilo-notice.hilo-notice { animation: none; }
}

@keyframes gz-fade-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .gz-layer,
  .gz-dialog { animation: none; }
  .gz-btn { transition: none; }
}

/* ── Copied: a small success moment on a copy button (the button keeps its own words) ──
   A green-lit face with one light sweep, the check pops in; over in 0.7 s. */
.acc-copy__btn.is-copied,
.acc-icon-btn.is-copied,
.cp-copy.is-copied {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(var(--success-rgb), .26) 0%, rgba(var(--success-rgb), .1) 100%), var(--bg-elevated, #3e596b);
  box-shadow: inset 0 0 0 1px rgba(var(--success-rgb), .55), 0 0 18px -6px rgba(var(--success-rgb), .55);
  color: #fff;
}
.acc-copy__btn.is-copied::after,
.acc-icon-btn.is-copied::after,
.cp-copy.is-copied::after {
  content: '';
  position: absolute;
  top: -25%;
  bottom: -25%;
  left: 0;
  width: 45%;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, .22) 50%, rgba(255, 255, 255, 0) 100%);
  transform: translateX(-130%) skewX(-14deg);
  pointer-events: none;
  animation: fx-sweep .6s .05s cubic-bezier(.4, 0, .2, 1) forwards;
}
.acc-copy__btn.is-copied > i,
.acc-copy__btn.is-copied > svg,
.acc-icon-btn.is-copied > i,
.cp-copy.is-copied > svg {
  animation: gz-check-pop .42s cubic-bezier(.34, 1.56, .64, 1) backwards;
}
@keyframes gz-check-pop {
  from { opacity: 0; transform: scale(.4) rotate(-20deg); }
}

/* ── The same subtle neutral moment for the site's other empty states (search no results, Favourites,
   Recently played, the 404 page): a crisp fade-up and a faint crystal light behind the lines ── */
.search-modal-state-message,
.fav-empty,
.rp-empty,
.not-found {
  position: relative;
  isolation: isolate;
  animation: fx-enter .22s cubic-bezier(.33, 1, .68, 1) backwards;
}
.search-modal-state-message::before,
.fav-empty::before,
.rp-empty::before,
.not-found::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 8%;
  z-index: -1;
  width: min(360px, 90%);
  height: min(160px, 70%);
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(143, 214, 255, .08), rgba(143, 214, 255, 0));
  transform: translateX(-50%);
  pointer-events: none;
}
/* the 404 line: a small crystal gem + the code */
.not-found__code { display: inline-flex; align-items: center; gap: 8px; color: #b9e4ff; }
.not-found__code::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #8fd6ff;
  box-shadow: 0 0 0 3px rgba(143, 214, 255, .14), 0 0 9px rgba(143, 214, 255, .75);
}

/* ── Reduced motion: a plain fade; no ping, no pop ──────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .gz-msg--success.gz-msg--fx::after { animation: none; }
  .acc-copy__btn.is-copied::after, .acc-icon-btn.is-copied::after, .cp-copy.is-copied::after { display: none; }
  .acc-copy__btn.is-copied > i, .acc-copy__btn.is-copied > svg, .acc-icon-btn.is-copied > i, .cp-copy.is-copied > svg { animation: none; }
  .gz-empty, .search-modal-state-message, .fav-empty, .rp-empty, .not-found { animation: gz-fade-in .2s ease backwards; }
}
