/* Shared VideoViral palette. public/theme.css points here so both apps ship
   the same tokens, including when Creator is built from its own Docker context. */
:root {
  color-scheme: dark;
  --vv-bg: #0b0b0b;
  --vv-surface: #141414;
  --vv-raised: #1c1c1c;
  --vv-hover: #242424;
  --vv-border: #2c2c2c;
  --vv-text: #f5f5f5;
  --vv-secondary: #d0d0d0;
  --vv-muted: #a8a8a8;
  --vv-accent: #ff3d8d;
  --vv-accent-hover: #ff69a7;
  --vv-accent-soft: #2b101c;
  --vv-on-accent: #0b0b0b;
  --vv-success: #55d995;
  --vv-success-soft: #10251b;
  --vv-warning: #f7c66a;
  --vv-warning-soft: #2b2112;
  --vv-danger: #ff7489;
  --vv-danger-soft: #2c1419;
  --vv-info: #8ec5ff;
  --vv-info-soft: #14202d;
  --vv-shadow: #00000066;
  --vv-overlay: #000000b8;
  --vv-focus: #ff3d8d66;
  /* DarkMovie design system v1: highlight for news, numbers and cost; never a button fill. */
  --vv-highlight: #d4ff27;
  --vv-highlight-soft: #232a0a;
  --dm-font-display: 'Space Grotesk', sans-serif;
  --dm-font-ui: 'Inter', system-ui, sans-serif;
  --dm-radius-sm: 6px;
  --dm-radius-md: 10px;
  --dm-radius-lg: 14px;
  --dm-radius-pill: 999px;
  --dm-space-1: 4px;
  --dm-space-2: 8px;
  --dm-space-3: 12px;
  --dm-space-4: 16px;
  --dm-space-6: 24px;
  --dm-space-8: 32px;
  --dm-space-12: 48px;
  --dm-instant: 100ms;
  --dm-fast: 160ms;
  --dm-base: 240ms;
  --dm-slow: 400ms;
  --dm-ease: cubic-bezier(0.2, 0, 0, 1);
  --dm-ease-in: cubic-bezier(0, 0, 0.2, 1);
  --dm-ease-out: cubic-bezier(0.4, 0, 1, 1);
  --dm-tap: 44px;
  background: var(--vv-bg);
  color: var(--vv-text);
  accent-color: var(--vv-accent);
  scrollbar-color: var(--vv-border) var(--vv-bg);
}

::selection { background: var(--vv-accent); color: var(--vv-on-accent); }
:focus-visible { outline: 2px solid var(--vv-accent); outline-offset: 3px; }
input, textarea, select { caret-color: var(--vv-accent); }
input::placeholder, textarea::placeholder { color: var(--vv-muted); opacity: 1; }
input::file-selector-button {
  background: var(--vv-hover);
  color: var(--vv-text);
  border: 1px solid var(--vv-border);
  border-radius: 6px;
  padding: 6px 10px;
  margin-right: 10px;
}
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px var(--vv-raised) inset;
  -webkit-text-fill-color: var(--vv-text);
  caret-color: var(--vv-accent);
}
dialog::backdrop { background: var(--vv-overlay); }

/* Keep the navigation and canvas black; cards supply the depth. */
html body, html body.platform, html body.landing,
html body.platform > header, html body.platform .platform-sidebar,
html[data-platform="videoviral"] body,
html[data-theme="dark"] .app-shell,
html[data-theme="dark"] .topbar,
html[data-theme="dark"] .sidebar { background: var(--vv-bg); }

/* Primary actions use dark lettering: white on this pink has poor contrast. */
html body .button.primary,
html body.platform .button.primary,
html body.platform .sidebar-new,
html body.platform #account-button,
html body.platform .sidebar-account .studio-avatar,
html body.platform .dashboard-studio .journey-switch button[aria-pressed="true"],
html[data-theme="dark"] .primary {
  background: var(--vv-accent);
  border-color: var(--vv-accent);
  color: var(--vv-on-accent);
}
html body .button.primary:hover:not(:disabled),
html body.platform .sidebar-new:hover,
html[data-theme="dark"] .primary:hover:not(:disabled) {
  background: var(--vv-accent-hover);
  border-color: var(--vv-accent-hover);
  color: var(--vv-on-accent);
}
html body .button.primary:disabled,
html[data-theme="dark"] .primary:disabled {
  background: var(--vv-raised);
  border-color: var(--vv-border);
  color: var(--vv-muted);
  opacity: 1;
}

/* DarkMovie highlight: lime marks balances, counts and scores. Pink stays for actions. */
html body #header-credit-balance,
html body.platform .wallet-overview h3 strong,
html body.platform .wallet-package-credits {
  color: var(--vv-highlight);
  font-variant-numeric: tabular-nums;
}
html body.platform .wallet-package-credits small { color: var(--vv-muted); }
/* The header balance lives inside the account popover, whose own rule outranks the one above; the journey's
   balance button and cost figure are balances and costs too. Lime is text only here, never a button fill. */
html body #account-popover .header-credit-label #header-credit-balance,
html body #journey-balance-button,
html body .journey-balance strong,
html body .journey-cost > div:first-child strong:last-child {
  color: var(--vv-highlight);
  font-variant-numeric: tabular-nums;
}
html body .clips-count,
html body .clips-layout .clips-count {
  background: var(--vv-highlight-soft);
  color: var(--vv-highlight);
  border-radius: var(--dm-radius-sm);
  font-variant-numeric: tabular-nums;
}
html body .clips-score,
html body .clips-card-kicker .clips-score {
  background: var(--vv-highlight-soft);
  color: var(--vv-highlight);
}
html body .clips-status-filters button,
html body .button,
html body .clips-count {
  transition: background-color var(--dm-instant) var(--dm-ease), border-color var(--dm-instant) var(--dm-ease), color var(--dm-instant) var(--dm-ease);
}
@media (prefers-reduced-motion: reduce) {
  html body .clips-status-filters button,
  html body .button,
  html body .clips-count { transition: none; }
}

/* Browser printouts remain economical and readable. */
@media print {
  :root { color-scheme: light; background: white; color: black; }
  html body { background: white; color: black; }
}

/* DS v1: typography, ledger alignment and print use the shared tokens. */
html body,html body.platform {font-family:var(--dm-font-ui)}
html body h1,html body h2,html body h3,html body.platform h1,html body.platform h2,html body.platform h3 {font-family:var(--dm-font-display)}
.wallet-ledger {table-layout:fixed;width:100%;font-variant-numeric:tabular-nums}
.wallet-ledger .ledger-date {width:176px}.wallet-ledger .ledger-credits {width:112px}
.wallet-ledger th:last-child,.wallet-ledger td:last-child {text-align:right}
.wallet-ledger td {overflow-wrap:anywhere}
@media(max-width:480px){.wallet-ledger .ledger-date{width:104px}}
@media print {:root,html body {--vv-bg:#fff;--vv-surface:#fff;--vv-raised:#fff;--vv-text:#0b0b0b;--vv-secondary:#333;--vv-muted:#555;--vv-border:#bbb;--vv-highlight:#0b0b0b;--vv-highlight-soft:transparent;--vv-accent:#0b0b0b;--vv-success:#0b0b0b}}
