/* ==========================================================================
   VideoNoteGPT Design Tokens (T3.1)
   Single source of truth for spacing, type steps, colors, focus, and targets.
   ========================================================================== */

:root {
  /* 8-point spacing scale */
  --space-0: 0px;
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 40px;
  --space-6: 48px;
  --space-7: 56px;
  --space-8: 64px;

  /* Type scale */
  --step-3xs: 0.618rem;
  --step-2xs: 0.694rem;
  --step-xs:  0.786rem;
  --step-sm:  0.886rem;
  --step-md:  1rem;
  --step-base: 1rem;
  --step-lg:  1.272rem;
  --step-xl:  1.618rem;
  --step-2xl: 2.058rem;
  --step-3xl: 2.618rem;
  --step-4xl: 3.330rem;
  --step-5xl: 4.236rem;

  /* Neutral surfaces and text */
  --color-text-main: #111111;
  --color-text-muted: #555555;
  --color-text-inverse: #ffffff;
  --color-bg-page: #FAFAFA;
  --color-bg-surface: #f8f9fa;
  --color-bg-elevated: #ffffff;
  --color-border-subtle: #E5E5E5;
  --color-border-strong: #9aa0a6;

  /* One primary colour for the single main action per view */
  --color-primary: #111111;
  --color-primary-hover: #333333;
  --color-primary-active: #000000;
  --color-primary-contrast: #ffffff;

  /* Status colours — always paired with text or an icon */
  --color-success: #188038;
  --color-success-bg: #e6f4ea;
  --color-success-border: #ceead6;
  --color-success-text: #0d652d;

  --color-warning: #b06000;
  --color-warning-bg: #fef7e0;
  --color-warning-border: #feefc3;
  --color-warning-text: #8a4800;

  --color-error: #d93025;
  --color-error-bg: #fce8e6;
  --color-error-border: #fad2cf;
  --color-error-text: #b3261e;

  --color-info: #111111;
  --color-info-bg: #F4F4F4;
  --color-info-border: #E5E5E5;
  --color-info-text: #1A1A1A;

  /* Visible focus ring */
  --focus-ring-color: #111111;
  --focus-ring-width: 2px;
  --focus-ring-offset: 2px;
  --focus-ring: 2px solid var(--focus-ring-color);

  /* Minimum 44 × 44 px touch targets */
  --min-touch-target: 44px;

  /* Common radii & shadows */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 2px rgba(60, 64, 67, 0.12), 0 1px 3px rgba(60, 64, 67, 0.08);
  --shadow-md: 0 4px 12px rgba(60, 64, 67, 0.15), 0 2px 6px rgba(60, 64, 67, 0.10);
  --shadow-lg: 0 12px 32px rgba(60, 64, 67, 0.20), 0 4px 12px rgba(60, 64, 67, 0.12);

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Global box-sizing & focus-visible behavior */
*, *::before, *::after {
  box-sizing: border-box;
}

:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-ring-offset);
}

/* Minimum touch target utility */
.vng-touch-target {
  min-width: var(--min-touch-target);
  min-height: var(--min-touch-target);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Motion accessibility: Respects prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
