/* ZigZagStream brand layer on top of css/zz-tokens.css + css/custom.css (from mockups/css/zs.css, approved).
   Load order: theme/css/styles.css → css/zz-tokens.css → css/custom.css → css/zs.css.
   Rule: no hex in page rules, only tokens. Hex lives only here. */

/* ── Brand tokens: neon green from the logo, on black ─────────────────────── */
:root{
  --primary:#54FF1A; --primary-foreground:#0a0a0a;           /* black text on green (15.7:1); white is unreadable */
  --ring:color-mix(in oklab,#2A7A0C 60%,transparent);        /* neon green on white is 1.3:1: the light ring is the dark green */
  --zz-brand-text:#2A7A0C;                                    /* green text on light cards (5.4:1) */
  --zz-brand-hover:#46E010;                                   /* hover goes darker, never lighter */
  --zz-chart-1:#36A80C;
  --zs-ink:#0a0a0a;                                           /* logo tile */
}
.dark{
  --background:#0b0c0e; --card:#141619; --popover:#191b1f;
  --primary:#54FF1A; --primary-foreground:#0a0a0a;
  --ring:color-mix(in oklab,#54FF1A 60%,transparent);
  --zz-brand-text:#54FF1A; --zz-brand-hover:#46E010;
  --zz-chart-1:#54FF1A;
}
/* "Live" must never look like the brand: live/on-air uses red, brand uses green */
:root,.dark{ --zs-live:#e5242a; --zs-live-ink:#ffffff; }
/* red used as small TEXT (chips, timer): ≥4.5:1 on the card in each theme */
:root{ --zs-live-text:#c81e24; }
.dark{ --zs-live-text:#ff6b6f; }

/* ── Fonts per language: Ravagh (FaNum) for Persian; Inter, then Ravagh, for the rest ──────────
   custom.css sets Ravagh on * (fa's own font). Outside fa, Inter comes first: it owns the Latin letters and the digits
   (ar digits stay Latin), and Ravagh right after it draws Arabic letters before any system font can (STAGE1 §6).
   Zero specificity (:where) and after custom.css, so it only replaces that * default: a class that sets its own font
   (monospace stream keys, chat rows…) still wins. html and body need their own rule (custom.css names them). */
:where(html:not([lang=fa])), :where(html:not([lang=fa])) *{
  font-family:Inter,'Ravagh',ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji";
}
html:not([lang=fa]), html:not([lang=fa]) body{ font-family:Inter,'Ravagh',ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji"; }
html:not([lang=fa]){ --font-sans:Inter,'Ravagh',ui-sans-serif,system-ui,sans-serif; }
html[lang] :is(code,pre,kbd,samp,.font-mono){ font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace; }

/* ── Green only with black on it (light and dark) ─────────────────────────
   Metronic draws a white tick, dot and knob on --primary, which is 1.3:1 on the neon green: the same shapes in --primary-foreground.
   The -mono variants keep theirs (white on --mono). */
.kt-checkbox:not(.kt-checkbox-mono):is(:checked,[aria-checked=true]){
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='9' viewBox='0 0 12 9' fill='none'%3E%3Cpath d='M10.3667 0.541643L4.80007 6.10831L1.56674 2.87498C1.41061 2.71977 1.1994 2.63265 0.979241 2.63265C0.759086 2.63265 0.547876 2.71977 0.391741 2.87498C0.236532 3.03111 0.149414 3.24232 0.149414 3.46248C0.149414 3.68263 0.236532 3.89384 0.391741 4.04998L4.21674 7.87498C4.37288 8.03019 4.58409 8.1173 4.80424 8.1173C5.0244 8.1173 5.23561 8.03019 5.39174 7.87498L11.5417 1.72498C11.6198 1.64751 11.6818 1.55534 11.7241 1.45379C11.7665 1.35224 11.7882 1.24332 11.7882 1.13331C11.7882 1.0233 11.7665 0.914379 11.7241 0.81283C11.6818 0.711281 11.6198 0.619113 11.5417 0.541643C11.3856 0.386434 11.1744 0.299316 10.9542 0.299316C10.7341 0.299316 10.5229 0.386434 10.3667 0.541643Z' fill='%230a0a0a'/%3E%3C/svg%3E");
}
.kt-checkbox-sm:not(.kt-checkbox-mono):is(:checked,[aria-checked=true]){
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='7' viewBox='0 0 10 7' fill='none'%3E%3Cpath d='M8.4932 0.233321L4.03986 4.68665L1.4532 2.09999C1.32829 1.97582 1.15932 1.90613 0.983198 1.90613C0.807074 1.90613 0.638106 1.97582 0.513198 2.09999C0.38903 2.2249 0.319336 2.39386 0.319336 2.56999C0.319336 2.74611 0.38903 2.91508 0.513198 3.03999L3.5732 6.09999C3.69811 6.22415 3.86707 6.29385 4.0432 6.29385C4.21932 6.29385 4.38829 6.22415 4.5132 6.09999L9.4332 1.17999C9.49568 1.11801 9.54528 1.04428 9.57912 0.963038C9.61297 0.881799 9.6304 0.794662 9.6304 0.706655C9.6304 0.618647 9.61297 0.53151 9.57912 0.45027C9.54528 0.369031 9.49568 0.295296 9.4332 0.233321C9.30829 0.109154 9.13932 0.0394592 8.9632 0.0394592C8.78707 0.0394592 8.61811 0.109154 8.4932 0.233321Z' fill='%230a0a0a'/%3E%3C/svg%3E");
}
.kt-checkbox-lg:not(.kt-checkbox-mono):is(:checked,[aria-checked=true]){
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='10' viewBox='0 0 14 10' fill='none'%3E%3Cpath d='M11.8035 1.19582L5.68018 7.31915L2.12351 3.76249C1.95176 3.59176 1.71943 3.49593 1.47726 3.49593C1.23509 3.49593 1.00276 3.59176 0.831013 3.76249C0.660283 3.93424 0.564453 4.16657 0.564453 4.40874C0.564453 4.65091 0.660283 4.88324 0.831013 5.05499L5.03851 9.26249C5.21026 9.43322 5.44259 9.52905 5.68476 9.52905C5.92693 9.52905 6.15926 9.43322 6.33101 9.26249L13.096 2.49749C13.1819 2.41227 13.2501 2.31089 13.2967 2.19918C13.3432 2.08748 13.3672 1.96766 13.3672 1.84665C13.3672 1.72564 13.3432 1.60583 13.2967 1.49413C13.2501 1.38242 13.1819 1.28104 13.096 1.19582C12.9243 1.02509 12.6919 0.92926 12.4498 0.92926C12.2076 0.92926 11.9753 1.02509 11.8035 1.19582Z' fill='%230a0a0a'/%3E%3C/svg%3E");
}
/* indeterminate: custom.css gives every unchecked box the field colour, so the dash had no green under it (white on white) */
.kt-checkbox:not(.kt-checkbox-mono):indeterminate{
  border-color:var(--primary);background-color:var(--primary);
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='none' stroke='%230a0a0a' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M6 10h8'/%3E%3C/svg%3E");
}
.kt-radio:not(.kt-radio-mono):is(:checked,[aria-checked=true]){
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 22' fill='none'%3E%3Ccircle cx='10.9995' cy='11' r='5.86667' fill='%230a0a0a'/%3E%3C/svg%3E");
}
.kt-switch:is(:checked,[aria-checked=true])::before{background-color:var(--primary-foreground)}

/* ── Focus in light mode: the neon outline and field border are 1.3:1 on white; the dark green is 5.4:1 (WCAG 1.4.11) ── */
html:not(.dark) :focus-visible{outline-color:var(--zz-brand-text)}
html:not(.dark) :is(.kt-input,.kt-select,.kt-textarea):is(:focus,:focus-within){border-color:var(--zz-brand-text)}
html:not(.dark) :is(.kt-checkbox,.kt-radio,.kt-switch):focus-visible{--tw-ring-color:var(--zz-brand-text)}
/* links: Metronic's ring is neutral-200 / neutral-700, ~1.1:1 on the card; the brand green (dark green in light mode) */
.kt-link:focus-visible{--tw-ring-color:var(--zz-brand-text);--tw-ring-offset-color:var(--card)}

/* ── Invalid fields: custom.css's unlayered .kt-input border beats Metronic's layered aria-invalid red; restated, focused too ── */
.kt-input[aria-invalid=true],html:not(.dark) .kt-input[aria-invalid=true]:is(:focus,:focus-within){border-color:var(--destructive)}
.kt-input[aria-invalid=true]:is(:focus,:focus-within){border-color:var(--destructive);box-shadow:0 0 0 3px color-mix(in oklab,var(--destructive) 20%,transparent)}

/* ── Brand lockup ───────────────────────────────────────────────────────── */
.zs-brand{display:inline-flex;align-items:center;gap:10px;text-decoration:none}
.zs-mark{display:block;flex:none;border-radius:22%}
.zs-word,.zs-word *{font-family:Inter,system-ui,sans-serif}
.zs-word{font-size:var(--text-lg);font-weight:700;letter-spacing:-.01em;color:var(--mono);white-space:nowrap}
.zs-word b{font-weight:700;color:var(--zz-brand-text)}
.kt-sidebar .small-logo{display:none}
.kt-sidebar-collapse .kt-sidebar:not(:hover) .default-logo{display:none}
.kt-sidebar-collapse .kt-sidebar:not(:hover) .small-logo{display:block}

/* ── Live badge (red, not brand) ────────────────────────────────────────── */
.zs-onair{display:inline-flex;align-items:center;gap:6px;padding:2px 8px;border-radius:999px;font-size:var(--text-xs);font-weight:600;
  background:var(--zs-live);color:var(--zs-live-ink);letter-spacing:.02em}
.zs-onair::before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor;animation:zs-pulse 1.4s ease-in-out infinite}
@keyframes zs-pulse{50%{opacity:.35}}

/* ── The Pro chip (the sidebar's plan badge, the plan page): brand surface, the name in Inter, always LTR ── */
.zs-pro-chip{display:inline-flex;align-items:center;gap:4px;height:22px;padding:0 8px;border-radius:6px;background:var(--primary);color:var(--primary-foreground);
  font-family:Inter,system-ui,sans-serif;font-size:var(--text-xs);font-weight:700;letter-spacing:.02em;line-height:1;white-space:nowrap}
.zs-pro-chip i{font-size:12px;color:inherit}
.zs-pro-chip--sm{height:20px;padding:0 6px}

/* ── Language menu (panel header and auth frame) ───────────────────────── */
.zs-lang-btn{gap:6px}
.zs-lang-btn i{font-size:var(--text-lg)}
.zs-lang-btn .zs-lang-caret{font-size:var(--text-2xs);opacity:.7}
.zs-lang-tick{color:var(--zz-brand-text)}

/* ── Empty state: one full-width card, icon + one-line title + one short line ── */
.zs-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;text-align:center;
  min-block-size:clamp(320px,56vh,520px);padding:48px 24px}
.zs-empty-ico{display:grid;place-items:center;inline-size:64px;block-size:64px;margin-block-end:4px;border-radius:50%;
  background:var(--zz-brand-soft);border:1px solid var(--zz-brand-line);color:var(--zz-brand-text)}
.zs-empty-ico i{font-size:var(--text-2xl)}
.zs-empty-title{font-size:var(--text-lg);line-height:var(--text-lg--line-height);font-weight:600;color:var(--mono)}
.zs-empty-text{max-inline-size:30rem;text-wrap:balance;font-size:var(--text-2sm);line-height:var(--text-2sm--line-height);color:var(--secondary-foreground)}

/* ── Error pages (resources/views/errors). The code takes the page's font: Latin 404 from Inter, ۴۰۴ from Ravagh FaNum in fa ── */
.zs-error{min-block-size:100dvh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:40px;padding:32px 16px}
.zs-error-body{display:flex;flex-direction:column;align-items:center;gap:12px;text-align:center;max-inline-size:28rem}
.zs-error-code{font-size:clamp(4rem,12vw,7rem);font-weight:800;line-height:1;letter-spacing:-.04em;color:var(--zz-brand-text)}
.zs-error-title{font-size:var(--text-xl);font-weight:600;color:var(--mono)}
.zs-error-text{font-size:var(--text-sm);color:var(--secondary-foreground);margin-block-end:12px}

/* ── Not built yet: a menu item or link whose page does not exist is shown dimmed and does nothing (aria-disabled, no href) ── */
.zs-soon{opacity:.5;cursor:default;pointer-events:none}

/* the account menu's address in fa: Latin digits, so an address with digits reads as typed */
html[lang=fa] [data-zs-account=email]{font-family:Inter,'Ravagh',ui-sans-serif,system-ui,sans-serif}
