/* ==========================================================================
   globals.css — Single Source of Truth
   --------------------------------------------------------------------------
   All design tokens (colors, radii, fonts, spacing, shadows, transitions)
   and shared component styles live HERE. Every other stylesheet consumes
   these custom properties. Change a value in :root below and it cascades
   across the entire site — no hunting through dashboard.css, public.css,
   navbar.css, etc.

   Load order: globals.css is loaded directly via <link> alongside
   navbar.css on every page, so tokens are always defined.

   A small set of legacy variable aliases is preserved for older page
   styles that still read them; new code should prefer the --color-*,
   --radius-*, --space-*, --font-* semantic names.

   Body/chrome theming for `site-body` pages is centralized in navbar.css,
   so one chrome tweak applies consistently across templates.
   ========================================================================== */

/* --- Fonts --- */
@import url("https://fonts.googleapis.com/css2?family=Geist:wght@100..900&family=Geist+Mono:wght@100..900&family=Newsreader:ital,opsz,wght@0,6..72,200..800;1,6..72,200..800&display=swap");

/* Brand-colored text caret across every input/textarea/contenteditable on
   the site. Only affects the blinking cursor — not the text or selection. */
input,
textarea,
[contenteditable="true"] {
  caret-color: var(--color-brand);
}

:root {
  /* ================================================================
     COLOR PALETTE
     ================================================================ */

  /* Backgrounds */
  --color-bg:               #0f0f11;
  --color-bg-elevated:      #161618;
  --color-bg-hover:         #1d1d20;
  --color-bg-surface:       rgba(22, 22, 24, 0.80);
  --color-bg-glass:         rgba(15, 15, 17, 0.92);
  --color-bg-overlay:       rgba(15, 15, 17, 0.72);

  /* Text — neutral grayscale derived from base bg, no hue tint */
  --color-text:             #ededed;
  --color-text-secondary:   #c4c4c4;
  --color-text-muted:       #8a8a8a;
  --color-text-disabled:    #6a6a6a;
  --color-text-inverse:     #0f0f11;

  /* Borders & dividers — neutral grayscale, no accent tint */
  --color-border:           rgba(255, 255, 255, 0.12);
  --color-border-subtle:    rgba(255, 255, 255, 0.06);
  --color-border-strong:    rgba(255, 255, 255, 0.22);
  --color-divider:          rgba(255, 255, 255, 0.08);

  /* Brand / accent — fully neutralized to white/gray derived from base */
  --color-accent:           #ededed;
  --color-accent-hover:     #ffffff;
  --color-accent-active:    #c4c4c4;
  --color-accent-light:     #ededed;
  --color-accent-subtle:    rgba(255, 255, 255, 0.06);
  --color-accent-glow:      rgba(255, 255, 255, 0.10);

  /* Brand blurple — sampled from the site logo (median ~#626cff). */
  --color-brand:            #626cff;
  --color-brand-rgb:        98, 108, 255;
  --color-brand-hover:      #737bff;
  --color-brand-active:     #5762ff;
  --color-brand-light:      #8f96ff;
  --color-brand-text:       #d0d3ff;
  --color-brand-muted:      rgba(98, 108, 255, 0.2);
  --color-brand-strong:     rgba(98, 108, 255, 0.32);
  --color-brand-solid:      rgba(98, 108, 255, 0.4);
  --color-brand-subtle:     rgba(98, 108, 255, 0.12);
  --color-brand-glow:       rgba(98, 108, 255, 0.45);
  /* Icon color — logo blurple for glyph accents site-wide. */
  --color-icon:             #626cff;
  --color-icon-hover:       var(--color-brand);

  /* Full ramp — fully neutralized to grayscale derived from base */
  --color-blue-50:          #f5f5f5;
  --color-blue-100:         #ededed;
  --color-blue-200:         #d6d6d6;
  --color-blue-300:         #b5b5b5;
  --color-blue-400:         #8f8f8f;
  --color-blue-500:         #ededed;
  --color-blue-600:         #c4c4c4;
  --color-blue-700:         #8a8a8a;
  --color-blue-800:         #5a5a5a;
  --color-blue-900:         #2a2a2c;

  /* Status colors */
  --color-success:          #4ade80;
  --color-success-bg:       rgba(74, 222, 128, 0.12);
  --color-warning:          #fbbf24;
  --color-warning-bg:       rgba(251, 191, 36, 0.12);
  --color-danger:           #ef4444;
  --color-danger-hover:     #dc2626;
  --color-danger-bg:        rgba(239, 68, 68, 0.12);
  --color-info:             var(--color-brand-light);

  /* Pill/badge palette — neutralized from accent tint to glass white */
  --color-pill-bg:          rgba(255, 255, 255, 0.08);
  --color-pill-bg-strong:   rgba(255, 255, 255, 0.14);
  --color-pill-border:      rgba(255, 255, 255, 0.28);
  --color-pill-text:        #ededed;

  /* ================================================================
     TYPOGRAPHY
     ================================================================ */

  --font-sans:   'Geist', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-serif:  'Newsreader', Georgia, serif;
  --font-mono:   'Geist Mono', ui-monospace, Menlo, Monaco, Consolas, 'Courier New', monospace;
  --font-display: 'Newsreader', Georgia, serif;

  --font-weight-light:     300;
  --font-weight-normal:    400;
  --font-weight-medium:    500;
  --font-weight-semibold:  600;
  --font-weight-bold:      700;
  --font-weight-extrabold: 800;

  --font-size-xs:   0.75rem;   /* 12px */
  --font-size-sm:   0.8125rem; /* 13px */
  --font-size-base: 0.875rem;  /* 14px */
  --font-size-md:   1rem;      /* 16px */
  --font-size-lg:   1.125rem;  /* 18px */
  --font-size-xl:   1.25rem;   /* 20px */
  --font-size-2xl:  1.5rem;    /* 24px */
  --font-size-3xl:  2rem;      /* 32px */
  --font-size-4xl:  2.5rem;    /* 40px */

  --line-height-tight:  1.15;
  --line-height-snug:   1.35;
  --line-height-normal: 1.5;
  --line-height-loose:  1.75;

  /* ================================================================
     RADIUS — 4px standard; pills/circles use --radius-pill / 50%.
     ================================================================ */

  --radius-ui:   0.25rem; /* 4px */
  --radius-none: 0;
  --radius-xs:   var(--radius-ui);
  --radius-sm:   var(--radius-ui);
  --radius-md:   var(--radius-ui);
  --radius-lg:   var(--radius-ui);
  --radius-xl:   var(--radius-ui);
  --radius-2xl:  var(--radius-ui);
  --radius-pill: 9999px;

  /* ================================================================
     SPACING
     ================================================================ */

  --space-0:  0;
  --space-1:  0.25rem;   /* 4px */
  --space-2:  0.5rem;    /* 8px */
  --space-3:  0.75rem;   /* 12px */
  --space-4:  1rem;      /* 16px */
  --space-5:  1.25rem;   /* 20px */
  --space-6:  1.5rem;    /* 24px */
  --space-8:  2rem;      /* 32px */
  --space-10: 2.5rem;    /* 40px */
  --space-12: 3rem;      /* 48px */
  --space-16: 4rem;      /* 64px */

  /* ================================================================
     SHADOWS
     ================================================================ */

  --shadow-none:    none;
  --shadow-xs:      0 1px 2px rgba(0, 0, 0, 0.18);
  --shadow-sm:      0 2px 4px rgba(0, 0, 0, 0.20);
  --shadow-md:      0 4px 12px rgba(0, 0, 0, 0.25);
  --shadow-lg:      0 8px 24px rgba(0, 0, 0, 0.30);
  --shadow-xl:      0 16px 40px rgba(0, 0, 0, 0.40);
  --shadow-accent:  0 0 24px rgba(255, 255, 255, 0.10);
  --shadow-accent-strong: 0 0 32px rgba(255, 255, 255, 0.18);

  /* ================================================================
     TRANSITIONS
     ================================================================ */

  --ease-out:     cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out:  cubic-bezier(0.65, 0, 0.35, 1);
  --ease-linear:  linear;

  --duration-instant: 80ms;
  --duration-fast:    150ms;
  --duration-base:    220ms;
  --duration-slow:    320ms;

  --transition-fast: var(--duration-fast) var(--ease-out);
  --transition-base: var(--duration-base) var(--ease-out);
  --transition-slow: var(--duration-slow) var(--ease-out);

  /* ================================================================
     LAYOUT
     ================================================================ */

  --navbar-height: 64px;
  --max-content-width:    1280px;
  --container-padding:    1.5rem;

  /* ================================================================
     LEGACY VARIABLE ALIASES
     Keep older names working so existing CSS files don't need rewriting.
     All alias to the semantic tokens above.
     ================================================================ */

  /* dashboard / dmca / faq / history / noti / premium */
  --primary-bg:       var(--color-bg);
  --secondary-bg:     var(--color-bg-elevated);
  --card-bg:          var(--color-bg-surface);
  --accent-color:     var(--color-accent);
  --accent-hover:     var(--color-accent-hover);
  --text-primary:     var(--color-text);
  --text-secondary:   var(--color-text-secondary);
  --text-muted:       var(--color-text-muted);
  --border-color:     var(--color-border);

  /* dashboard pill legacy */
  --pill-blue-base:       var(--color-accent);
  --pill-blue-text:       var(--color-pill-text);
  --pill-blue-border:     var(--color-pill-border);
  --pill-blue-bg-strong:  var(--color-pill-bg-strong);
  --pill-blue-bg-soft:    var(--color-pill-bg);

  /* poster-modal legacy */
  --color-primary-900:    var(--color-bg);
  --color-secondary-800:  var(--color-bg-elevated);
  --color-secondary-600:  var(--color-border);
  --color-slate-100:      var(--color-text);
  --color-slate-400:      var(--color-text-secondary);
  --color-slate-600:      var(--color-text-muted);
  --color-slate-800:      var(--color-border);

  /* legacy navbar aliases */
  --site-chrome-text-muted:      var(--color-text-muted);
  --site-chrome-text-secondary:  var(--color-text-secondary);
}

/* ==========================================================================
   BASE ELEMENT STYLES
   ========================================================================== */

html {
  scroll-behavior: smooth;
}

html, body {
  font-family: var(--font-sans);
  background-color: var(--color-bg);
  color: var(--color-text);
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

[x-cloak] { display: none !important; }

/* ==========================================================================
   UNIFIED BUTTON SYSTEM
   Either `class="btn btn-primary"` (preferred) OR `class="btn-primary"`
   alone both work — every standalone variant includes the base properties.
   `btn-accent` is the same solid brand fill as `btn-primary`, named for
   marketing/store CTAs that should not inherit app chrome semantics.
   ========================================================================== */

.btn,
.btn-primary,
.btn-accent,
.btn-secondary,
.btn-ghost,
.btn-danger,
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-tight);
  /* Baseline height that `.filter-input` also honors so side-by-side
     button+input controls line up without per-instance `h-[...]` hacks. */
  min-height: 2.55rem;
  box-sizing: border-box;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--color-text);
  cursor: pointer;
  transition:
    background var(--transition-base),
    border-color var(--transition-base),
    color var(--transition-base),
    box-shadow var(--transition-base),
    transform var(--transition-fast);
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
}

.btn:hover,
.btn-ghost:hover,
.btn-outline:hover { transform: translateY(-1px); }
.btn:active,
.btn-ghost:active,
.btn-outline:active { transform: translateY(0); }

.btn:disabled,
.btn.is-disabled,
.btn-primary:disabled,
.btn-accent:disabled,
.btn-secondary:disabled,
.btn-ghost:disabled,
.btn-danger:disabled,
.btn-outline:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  pointer-events: none;
}

/* Flat primary CTA — logo blurple (#626cff), no motion. */
.btn-primary {
  background: var(--color-brand);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow: none;
  transform: none;
  transition:
    background var(--transition-base),
    border-color var(--transition-base),
    color var(--transition-base),
    box-shadow var(--transition-base);
}
.btn-primary:hover {
  background: var(--color-brand-hover);
  border-color: rgba(255, 255, 255, 0.3);
  color: #ffffff;
  box-shadow: none;
  transform: none;
}
.btn-primary:active {
  background: var(--color-brand-active);
  border-color: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  box-shadow: none;
  transform: none;
}
.btn-primary:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
  box-shadow: none;
}

/* Solid brand CTA — same fill as .btn-primary, for public/marketing surfaces. */
.btn-accent {
  background: var(--color-brand);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow: none;
  transform: none;
  transition:
    background var(--transition-base),
    border-color var(--transition-base),
    color var(--transition-base),
    box-shadow var(--transition-base);
}
.btn-accent:hover {
  background: var(--color-brand-hover);
  border-color: rgba(255, 255, 255, 0.3);
  color: #ffffff;
  box-shadow: none;
  transform: none;
}
.btn-accent:active {
  background: var(--color-brand-active);
  border-color: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  box-shadow: none;
  transform: none;
}
.btn-accent:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
  box-shadow: none;
}

.btn-secondary {
  background: var(--color-bg-elevated);
  color: var(--color-text);
  border-color: var(--color-border);
  transform: none;
  transition:
    background var(--transition-base),
    border-color var(--transition-base),
    color var(--transition-base);
}
.btn-secondary:hover {
  background: var(--color-bg-hover);
  border-color: var(--color-border-strong);
  transform: none;
}
.btn-secondary:active {
  transform: none;
}

.btn-ghost {
  background: transparent;
  color: var(--color-text-secondary);
  border-color: transparent;
}
.btn-ghost:hover {
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.04);
}

.btn-danger {
  background: var(--color-bg-elevated);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.3);
  transition:
    background var(--transition-base),
    border-color var(--transition-base),
    color var(--transition-base),
    box-shadow var(--transition-base);
}
.btn-danger:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.45);
  transform: none;
}
.btn-danger:active {
  transform: none;
}

.btn-outline {
  background: transparent;
  color: var(--color-accent-light);
  border-color: var(--color-accent-light);
}
.btn-outline:hover {
  background: var(--color-accent-subtle);
  color: var(--color-text);
}

/* Sizes */
.btn-xs { padding: var(--space-1) var(--space-2); font-size: var(--font-size-xs); border-radius: var(--radius-xs); }
.btn-sm { padding: var(--space-1) var(--space-3); font-size: var(--font-size-sm); border-radius: var(--radius-sm); }
.btn-lg { padding: var(--space-3) var(--space-6); font-size: var(--font-size-md); border-radius: var(--radius-lg); }
.btn-xl { padding: var(--space-4) var(--space-8); font-size: var(--font-size-lg); border-radius: var(--radius-lg); }

/* Shape modifiers */
.btn-pill  { border-radius: var(--radius-pill); }
.btn-block { width: 100%; }
.btn-icon  { padding: var(--space-2); aspect-ratio: 1; }

/* Style modifiers */
.btn-gradient {
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-hover));
  border-color: transparent;
  color: var(--color-text-inverse);
}
.btn-gradient:hover {
  background: linear-gradient(135deg, var(--color-accent-hover), var(--color-blue-700));
  border-color: transparent;
}

/* ==========================================================================
   UTILITY: SHARED SURFACES
   ========================================================================== */

.surface-card {
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
}

.surface-glass {
  background: var(--color-bg-glass);
  border: 1px solid var(--color-border-subtle);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.surface-elevated {
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

/* ==========================================================================
   UNIFIED CARD SYSTEM
   .card — base container. Modifiers add hover lift, glow, etc.
   ========================================================================== */

.card {
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  color: var(--color-text);
  transition:
    border-color var(--transition-base),
    box-shadow var(--transition-base),
    transform var(--transition-base);
}

.card-glass {
  background: var(--color-bg-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.card-interactive { cursor: pointer; }
.card-interactive:hover {
  border-color: var(--color-border-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.card-accent {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-accent);
}

/* ==========================================================================
   UNIFIED FORM CONTROLS
   .input, .select, .textarea all share the same look.
   ========================================================================== */

.input,
.select,
.textarea {
  display: block;
  width: 100%;
  padding: var(--space-2) var(--space-3);
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  color: var(--color-text);
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  outline: none;
  transition:
    border-color var(--transition-base),
    box-shadow var(--transition-base),
    background var(--transition-base);
}

.input::placeholder,
.textarea::placeholder {
  color: var(--color-text-muted);
}

.input:hover,
.select:hover,
.textarea:hover {
  border-color: var(--color-border-strong);
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-glow);
  background: var(--color-bg-hover);
}

.input:disabled,
.select:disabled,
.textarea:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.textarea { min-height: 7rem; resize: vertical; }

.input-sm { padding: var(--space-1) var(--space-2); font-size: var(--font-size-sm); }
.input-lg { padding: var(--space-3) var(--space-4); font-size: var(--font-size-md); }

.label {
  display: block;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-1);
  letter-spacing: 0.02em;
}

.helper-text {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-1);
}

.field-error {
  font-size: var(--font-size-xs);
  color: var(--color-danger);
  margin-top: var(--space-1);
}

.form-page-layer {
  position: relative;
  z-index: 1;
}

.form-preview-poster-col {
  flex: 3 1 0;
}

.form-preview-backdrop-col {
  flex: 8 1 0;
}

.form-preview-focus {
  --tw-ring-color: var(--color-accent-light);
}

.form-icon-accent,
.form-media-genres {
  color: var(--color-icon);
}

.form-icon-muted {
  color: var(--color-text-muted);
}

.form-payment-option {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(15, 15, 17, 0.6);
}

.form-accent-checkbox {
  accent-color: var(--color-brand);
}

/* ==========================================================================
   UNIFIED PILL / BADGE SYSTEM
   ========================================================================== */

.pill,
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3);
  font-family: var(--font-sans);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-tight);
  letter-spacing: 0.02em;
  color: var(--color-pill-text);
  background: var(--color-pill-bg);
  border: 1px solid var(--color-pill-border);
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

.pill-accent,
.badge-accent {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-text-inverse);
}

.pill-outline,
.badge-outline {
  background: transparent;
  color: var(--color-accent-light);
  border-color: var(--color-accent-light);
}

.pill-success, .badge-success { background: var(--color-success-bg); color: var(--color-success); border-color: rgba(74,222,128,0.32); }
.pill-warning, .badge-warning { background: var(--color-warning-bg); color: var(--color-warning); border-color: rgba(251,191,36,0.32); }
.pill-danger,  .badge-danger  { background: var(--color-danger-bg);  color: var(--color-danger);  border-color: rgba(239,68,68,0.32); }

/* Dot indicator inside pills */
.pill .dot,
.badge .dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: currentColor;
  display: inline-block;
}

/* ==========================================================================
   LINKS
   ========================================================================== */

.link {
  color: var(--color-accent-light);
  text-decoration: none;
  transition: color var(--transition-fast);
}
.link:hover { color: var(--color-accent); text-decoration: underline; }

/* ==========================================================================
   TYPOGRAPHY HELPERS
   ========================================================================== */

.text-muted      { color: var(--color-text-muted); }
.text-secondary  { color: var(--color-text-secondary); }
.text-accent     { color: var(--color-accent-light); }
.text-danger     { color: var(--color-danger); }
.text-success    { color: var(--color-success); }
.text-mono       { font-family: var(--font-mono); }

/* ==========================================================================
   ICON COLOR DEFAULTS
   ========================================================================== */

.lucide-icon {
  color: var(--color-icon);
}

.icon-muted .lucide-icon,
.lucide-icon.icon-muted {
  color: var(--color-text-muted);
}

.icon-on-primary .lucide-icon,
.lucide-icon.icon-on-primary,
.btn .lucide-icon,
.btn-primary .lucide-icon,
.btn-accent .lucide-icon,
.btn-secondary .lucide-icon,
.btn-ghost .lucide-icon,
.btn-danger .lucide-icon,
.btn-outline .lucide-icon,
.icon-contextual .lucide-icon,
:is(.pill, .badge, [class*="-pill"], [class*="-badge"], [class*="-chip"], [id*="-pill"], [id*="-badge"], [id*="-chip"]) .lucide-icon {
  color: currentColor;
}
/* ==========================================================================
   PAGINATION - compact site-wide previous / page / next control.
   ========================================================================== */

.site-pagination,
.browse-pagination.site-pagination,
.dash-pagination.site-pagination,
.pagination.site-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(1rem, 3vw, 2rem);
  flex-wrap: nowrap;
  width: 100%;
  margin: 1.5rem auto 0;
  padding: 0.25rem 0;
  color: var(--color-text-muted);
}

.site-pagination__link,
.site-pagination__status {
  min-height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.48rem;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0;
  line-height: 1;
}

.site-pagination__link {
  color: var(--color-text);
  text-decoration: none;
  text-transform: uppercase;
  font-weight: 600;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  transition: color 0.15s ease, opacity 0.15s ease, transform 0.15s ease;
}

.browse-pagination.site-pagination .site-pagination__link {
  min-width: 2rem;
}

.site-pagination__link:hover,
.site-pagination__link:focus-visible {
  color: #ffffff;
  outline: none;
}

.site-pagination__link:not(.is-disabled):hover {
  transform: translateX(var(--site-pagination-hover-shift, 0));
}

.site-pagination__link--prev {
  --site-pagination-hover-shift: -2px;
  order: 1;
}

.site-pagination__link--next {
  --site-pagination-hover-shift: 2px;
  order: 3;
}

.site-pagination__link.is-disabled,
.site-pagination__link:disabled {
  color: var(--color-text-disabled);
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.site-pagination__status {
  color: var(--color-text-muted);
  font-weight: 500;
  text-transform: none;
  margin: 0;
  order: 2;
}

.site-pagination__current {
  color: var(--color-text);
  font-weight: 700;
}

.site-pagination .lucide-icon {
  color: currentColor;
  font-size: 0.85em;
}

.site-pagination .dash-pagination-buttons {
  display: contents;
}

@media (max-width: 520px) {
  .site-pagination,
  .browse-pagination.site-pagination,
  .dash-pagination.site-pagination,
  .pagination.site-pagination {
    gap: 0.8rem;
  }

  .site-pagination__link,
  .site-pagination__status {
    font-size: 0.75rem;
  }

  .site-pagination__link {
    padding: 0.25rem;
  }
}

/* ==========================================================================
   TOAST — unified styling for the global toast system (static/js/utils.ts).
   Surface stays neutral gray regardless of type; only the left border
   carries the status hue (success / error / warning / info).
   ========================================================================== */

.scenepacks-global-toast-container {
  position: fixed;
  right: 12px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(420px, calc(100vw - 24px));
  pointer-events: none;
}

.scenepacks-global-toast {
  pointer-events: auto;
  width: 100%;
  padding: 14px;
  border-radius: var(--radius-xl);
  background-color: var(--color-bg-elevated);
  color: var(--color-text);
  font-size: 14px;
  line-height: 1.45;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-text-muted);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.02);
  overflow: hidden;
  opacity: 0;
  transform: translateX(32px);
  /* Enter/leave animation is driven by opacity + transform class state.
     Alpine's
     `x-show` / `x-transition` would set `display: none` after the
     leave fade and snap remaining toasts up with no animation —
     using class state keeps the leaving toast in the flex flow until
     the FLIP animator (in alpine-stores.ts) splices it out and
     animates the slide-up of survivors.
     `will-change` promotes the toast to its own compositor layer
     so the fade + slide animate on the GPU. The previous
     `backdrop-filter: blur(18px)` was dropped because it forced a
     re-blur every animation frame and was the biggest single FPS
     hit on the original implementation. */
  transition: opacity 200ms ease, transform 200ms ease;
  will-change: transform, opacity;
}

.scenepacks-global-toast.is-visible {
  opacity: 1;
  transform: translateX(0);
}

/* Status hue on the left border and matching icon tint. Surface/body
   text stay neutral so the toast never paints the whole card green/red. */
.scenepacks-global-toast--success { border-left-color: #4ade80; }
.scenepacks-global-toast--error   { border-left-color: #fb7185; }
.scenepacks-global-toast--warning { border-left-color: #fbbf24; }
.scenepacks-global-toast--info    { border-left-color: var(--color-text-muted); }

.scenepacks-global-toast-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-text-muted);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  font-size: 14px;
}
.scenepacks-global-toast-icon i,
.scenepacks-global-toast-icon .lucide-icon {
  color: currentColor;
}
.scenepacks-global-toast--success .scenepacks-global-toast-icon { color: #4ade80; }
.scenepacks-global-toast--error .scenepacks-global-toast-icon   { color: #fb7185; }
.scenepacks-global-toast--warning .scenepacks-global-toast-icon { color: #fbbf24; }
.scenepacks-global-toast--info .scenepacks-global-toast-icon    { color: var(--color-text-muted); }

.scenepacks-global-toast-message {
  flex: 1;
  color: var(--color-text);
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.scenepacks-global-toast-close {
  background: transparent;
  border: 0;
  color: var(--color-text-muted);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 4px;
  margin-left: 4px;
  border-radius: 999px;
  transition: color 0.15s ease, background 0.15s ease;
}
.scenepacks-global-toast-close:hover {
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.10);
}
.scenepacks-global-toast-close i {
  color: inherit;
}

/* ==========================================================================
   DIVIDER
   ========================================================================== */

.divider {
  height: 1px;
  background: var(--color-divider);
  border: 0;
  margin: var(--space-6) 0;
}

/* Page/section subtitles span the content column; wrap only at viewport edge. */
[class$="-subtitle"]:not(.combined-modal-subtitle) {
  max-width: none;
}
