/**
 * RYDCAST Design System — shared color palette & typography tokens
 * Load before app styles.css on every surface (advertiser, driver, media).
 * Palette locked to the RYDCAST reference (dark charcoal + teal + gold).
 */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap");

:root {
  color-scheme: dark;

  /* —— Brand core (driver RC logo / accents) —— */
  --rc-brand: #00c9b7;
  --rc-brand-strong: #00a896;
  --rc-brand-deep: #0a1018;
  --rc-brand-soft: rgba(0, 201, 183, 0.14);
  --rc-brand-border: rgba(0, 201, 183, 0.38);
  --rc-brand-glow: rgba(0, 201, 183, 0.22);
  --rc-brand-gradient: linear-gradient(145deg, #22fff0 0%, #00c9b7 100%);

  /* —— Earnings / accent gold —— */
  --rc-gold: #fbbf24;
  --rc-gold-strong: #f59e0b;
  --rc-gold-soft: rgba(251, 191, 36, 0.14);

  /* —— Surfaces (dark UI) —— */
  --rc-midnight: #0a1018;
  --rc-void: #060a10;
  --rc-surface-1: #111820;
  --rc-surface-2: #182028;
  --rc-surface-3: #212b36;
  --rc-surface-glass: rgba(17, 24, 32, 0.82);

  /* Card layer (screenshot reference) */
  --rc-card-dark: #161b22;
  --rc-card-dark-elevated: #1a202c;

  /* —— Surfaces (legacy light aliases → dark platform) —— */
  --rc-page: var(--rc-midnight);
  --rc-card: var(--rc-surface-1);
  --rc-card-muted: var(--rc-surface-2);

  /* —— Text —— */
  --rc-text: #ffffff;
  --rc-text-secondary: #9ca3af;
  --rc-text-muted: #6b7280;
  --rc-ink: #ffffff;
  --rc-ink-soft: #d1d5db;

  /* —— Borders & lines —— */
  --rc-line: rgba(255, 255, 255, 0.1);
  --rc-line-strong: rgba(255, 255, 255, 0.16);
  --rc-line-light: rgba(255, 255, 255, 0.12);

  /* —— Semantic —— */
  --rc-info: #22fff0;
  --rc-success: #00c9b7;
  --rc-warning: #fbbf24;
  --rc-danger: #f87171;

  /* —— Legacy aliases (dark apps) —— */
  --bg: var(--rc-midnight);
  --panel: var(--rc-surface-1);
  --panel-2: var(--rc-surface-2);
  --panel-3: var(--rc-surface-3);
  --line: var(--rc-line);
  --text: var(--rc-text);
  --muted: var(--rc-text-secondary);
  --soft: var(--rc-text-muted);
  --green: var(--rc-brand);
  --cyan: var(--rc-info);
  --amber: var(--rc-gold);
  --rose: var(--rc-danger);
  --ink: var(--rc-text);
  --touch: 48px;
  --ease: 180ms cubic-bezier(0.4, 0, 0.2, 1);

  /* —— Shell aliases —— */
  --brand: var(--rc-brand);
  --brand-dark: var(--rc-brand-deep);
  --accent: var(--rc-gold);
  --danger: #f87171;
  --ok: #00c9b7;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
  --shadow-brand: 0 16px 40px rgba(0, 201, 183, 0.18);

  /* —— Phase 1: design tokens —— */
  --rc-surface-0: var(--rc-midnight);

  /* Spacing scale (4px base) */
  --rc-space-1: 4px;
  --rc-space-2: 8px;
  --rc-space-3: 12px;
  --rc-space-4: 16px;
  --rc-space-5: 20px;
  --rc-space-6: 24px;
  --rc-space-7: 32px;
  --rc-space-8: 40px;
  --rc-space-9: 48px;
  --rc-space-10: 64px;
  --rc-space-11: 80px;
  --rc-space-12: 96px;

  /* Radius scale */
  --rc-radius-xs: 4px;
  --rc-radius-sm: 6px;
  --rc-radius-md: 10px;
  --rc-radius-lg: 14px;
  --rc-radius-xl: 20px;
  --rc-radius-pill: 999px;

  /* Layered shadows */
  --rc-shadow-1: 0 1px 1px rgba(0, 0, 0, 0.18), 0 2px 6px rgba(0, 0, 0, 0.14);
  --rc-shadow-2: 0 4px 8px rgba(0, 0, 0, 0.2), 0 12px 24px rgba(0, 0, 0, 0.22);
  --rc-shadow-3: 0 10px 20px rgba(0, 0, 0, 0.28), 0 24px 48px rgba(0, 0, 0, 0.3);
  --rc-shadow-brand: 0 12px 32px rgba(0, 201, 183, 0.24);

  /* Motion grammar */
  --rc-ease: cubic-bezier(0.2, 0.7, 0.1, 1);
  --rc-motion-fast: 120ms;
  --rc-motion-base: 180ms;
  --rc-motion-slow: 260ms;

  /* Focus ring */
  --rc-focus-ring: 0 0 0 2px var(--rc-brand), 0 0 0 4px rgba(0, 201, 183, 0.28);
  --rc-focus-ring-danger: 0 0 0 2px var(--rc-danger), 0 0 0 4px rgba(248, 113, 113, 0.28);

  /* Type scale */
  --rc-text-xs: 11px;
  --rc-text-sm: 13px;
  --rc-text-md: 15px;
  --rc-text-lg: 18px;
  --rc-text-xl: 22px;
  --rc-text-2xl: 28px;
  --rc-text-3xl: 36px;
  --rc-text-display: 48px;
  --rc-font-display: "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --rc-font-body: "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --rc-font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /*
   * RYDCAST LOGO LOCK. Do not eyeball or renegotiate these values.
   * Source: supplied RYDCAST reference lockup.
   * Use assets/rydcast-wave-logo.svg as the canonical horizontal logo.
   * Do not rebuild the lockup from separate HTML icon/text.
   */
  --rc-wordmark-visible-letter-gap-ratio: 0.22;
  --rc-wordmark-tracking: 0.105em;

  /* Platform canvas — flat dark, no ambient haze */
  --rc-platform-gradient: linear-gradient(180deg, var(--rc-midnight) 0%, var(--rc-void) 100%);

  /* Wallet / earnings values — black top to teal base, no shadow layer */
  --rc-compensation-gradient: linear-gradient(
    180deg,
    #061817 0%,
    #00675f 22%,
    #00c9b7 68%,
    #22fff0 100%
  );

  /* Wallet / earnings values — same teal-to-black value gradient everywhere */
  --rc-gold-value-gradient: var(--rc-compensation-gradient);

  font-family: var(--rc-font-body);
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --rc-motion-fast: 0ms;
    --rc-motion-base: 0ms;
    --rc-motion-slow: 0ms;
  }
}

.platform-copyright {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px 16px;
  border-top: 1px solid var(--rc-line);
  background: rgba(6, 10, 16, 0.72);
  color: var(--rc-text-muted);
  text-align: center;
}

.platform-copyright small {
  display: block;
  max-width: min(980px, 100%);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.4;
  text-wrap: balance;
}

.platform-copyright--compact {
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
  border-top-color: var(--rc-line);
  background: transparent;
}

/* —— Platform buttons: transparent fill, green on interaction —— */
:is(
  .primary-action,
  .ghost-button,
  .secondary-action,
  .mode-button,
  .radius-button,
  .subtab,
  .media-button,
  .demo-menu-button,
  .side-nav-demo-toggle,
  .demo-link-button,
  .advertiser-tab-button,
  .backend-tab-button,
  .manager-radius-button,
  .media-tool-btn,
  .primary-btn,
  .ghost-btn,
  .shift-card,
  .nav-btn,
  .action-card button,
  .inline-action,
  .map-result-button,
  .map-zoom-controls button,
  .preview-play-button,
  .script-audio-buttons button,
  .manager-radius-button,
  .creative-radio-card
) {
  background: transparent !important;
  border: 1px solid var(--rc-line-strong) !important;
  color: var(--rc-text-secondary) !important;
  box-shadow: none !important;
  transition:
    border-color var(--rc-motion-base) var(--rc-ease),
    color var(--rc-motion-base) var(--rc-ease),
    background-color var(--rc-motion-base) var(--rc-ease) !important;
}

:is(
  .primary-action,
  .ghost-button,
  .secondary-action,
  .mode-button,
  .radius-button,
  .subtab,
  .media-button,
  .demo-menu-button,
  .side-nav-demo-toggle,
  .demo-link-button,
  .advertiser-tab-button,
  .backend-tab-button,
  .manager-radius-button,
  .media-tool-btn,
  .primary-btn,
  .ghost-btn,
  .shift-card,
  .nav-btn,
  .action-card button,
  .inline-action,
  .map-result-button,
  .map-zoom-controls button,
  .preview-play-button,
  .script-audio-buttons button,
  .creative-radio-card
):hover:not(:disabled) {
  border-color: var(--rc-brand) !important;
  color: var(--rc-brand) !important;
  background: transparent !important;
  box-shadow: none !important;
}

:is(
  .primary-action,
  .ghost-button,
  .secondary-action,
  .mode-button,
  .radius-button,
  .subtab,
  .media-button,
  .demo-menu-button,
  .side-nav-demo-toggle,
  .demo-link-button,
  .advertiser-tab-button,
  .backend-tab-button,
  .manager-radius-button,
  .media-tool-btn,
  .primary-btn,
  .ghost-btn,
  .shift-card,
  .nav-btn,
  .action-card button,
  .inline-action,
  .map-result-button,
  .map-zoom-controls button,
  .preview-play-button,
  .script-audio-buttons button,
  .creative-radio-card
):focus-visible {
  outline: none !important;
  border-color: var(--rc-brand) !important;
  color: var(--rc-brand) !important;
  background: transparent !important;
  box-shadow: none !important;
}

:is(
  .primary-action,
  .ghost-button,
  .secondary-action,
  .mode-button,
  .radius-button,
  .subtab,
  .media-button,
  .demo-menu-button,
  .side-nav-demo-toggle,
  .demo-link-button,
  .advertiser-tab-button,
  .backend-tab-button,
  .manager-radius-button,
  .media-tool-btn,
  .primary-btn,
  .ghost-btn,
  .shift-card,
  .nav-btn,
  .action-card button,
  .inline-action,
  .map-result-button,
  .map-zoom-controls button,
  .preview-play-button,
  .script-audio-buttons button,
  .creative-radio-card
):active:not(:disabled) {
  border-color: var(--rc-brand) !important;
  color: var(--rc-brand) !important;
  background: transparent !important;
  box-shadow: none !important;
}

:is(
  .mode-button.active,
  .radius-button.active,
  .subtab.active,
  .media-button.active,
  .advertiser-tab-button.active,
  .backend-tab-button.active,
  .manager-radius-button.active,
  .side-nav-demo-menu.open .side-nav-demo-toggle,
  .side-nav-demo-links .demo-link-button.active,
  .side-nav-demo-links .demo-link-button--internal.active,
  .demo-controls-panel .mode-button.active,
  .side-nav .mode-button.active,
  .nav-btn.active,
  .shift-card.active,
  .map-result-button.active,
  .creative-radio-card:has(input:checked)
) {
  border-color: var(--rc-brand) !important;
  color: var(--rc-brand) !important;
  background: transparent !important;
  box-shadow: none !important;
}

.danger-button,
.danger-button:hover:not(:disabled) {
  background: transparent !important;
  border-color: rgba(248, 113, 113, 0.45) !important;
  color: #fca5a5 !important;
}

.danger-button:hover:not(:disabled) {
  border-color: #f87171 !important;
  color: #fecaca !important;
}

.nav-btn {
  border-color: transparent !important;
}

.nav-btn:hover:not(:disabled),
.nav-btn.active {
  border-color: var(--rc-brand) !important;
}

.shift-card {
  border-radius: 20px;
}

.creative-radio-card {
  border-radius: 8px;
}

.creative-radio-card input {
  border: 0 !important;
  background: transparent !important;
}
