/**
 * Design Tokens & Shared Components
 *
 * Extracted from channel-page-modern.css for reuse across pages
 * that need design tokens without the full channel-specific styles.
 *
 * Contains:
 * - CSS Custom Properties (:root)
 * - .btn-modern button styles
 * - .btn-vote
 * - Utility classes (.visually-hidden, .text-muted, .text-truncate)
 */

/* ============================================
   DESIGN TOKENS (CSS Custom Properties)
   ============================================ */
:root {
  /* Color Palette - Modern neutral with accent */
  --color-bg-primary: #ffffff;
  --color-bg-secondary: #f8fafc;
  --color-bg-tertiary: #f1f5f9;
  --color-surface: #ffffff;
  --color-surface-elevated: #ffffff;
  --color-border-light: #e2e8f0;
  --color-border-medium: #cbd5e1;
  --color-border-dark: #94a3b8;

  /* Text colors with proper contrast */
  --color-text-primary: #0f172a;
  --color-text-secondary: #475569;
  --color-text-tertiary: #64748b;
  --color-text-muted: #94a3b8;

  /* Accent colors - Modern blue with purple tint */
  --color-accent: #3b82f6;
  --color-accent-hover: #2563eb;
  --color-accent-light: #dbeafe;
  --color-accent-gradient: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);

  /* Semantic colors */
  --color-success: #10b981;
  --color-success-light: #d1fae5;
  --color-warning: #f59e0b;
  --color-error: #ef4444;

  /* Shadows - Layered for depth */
  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);

  /* Border radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Spacing scale (based on 8px grid) */
  --space-xs: 0.5rem;   /* 8px */
  --space-sm: 0.75rem;  /* 12px */
  --space-md: 1rem;     /* 16px */
  --space-lg: 1.5rem;   /* 24px */
  --space-xl: 2rem;     /* 32px */
  --space-2xl: 3rem;    /* 48px */
  --space-3xl: 4rem;    /* 64px */

  /* Typography */
  --font-sans: 'GothamPro', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Open Sans Condensed', 'GothamPro-Medium', sans-serif;

  --text-xs: 0.75rem;      /* 12px */
  --text-sm: 0.875rem;     /* 14px */
  --text-base: 1rem;       /* 16px */
  --text-lg: 1.125rem;     /* 18px */
  --text-xl: 1.25rem;      /* 20px */
  --text-2xl: 1.5rem;      /* 24px */
  --text-3xl: 1.875rem;    /* 30px */
  --text-4xl: 2.25rem;     /* 36px */
  --text-5xl: 3rem;        /* 48px */

  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;

  --line-height-tight: 1.25;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.75;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 200ms ease;
  --transition-slow: 300ms ease;

  /* Layout */
  --container-max-width: 1200px;
  --content-max-width: 65ch;
}

/* ============================================
   MODERN BUTTON STYLES
   ============================================ */
.btn-modern {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-md);
  font-size: var(--text-base);
  font-weight: var(--font-semibold);
  font-family: var(--font-sans);
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
  min-width: 140px;
}

.btn-modern--primary {
  background: var(--color-accent);
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn-modern--primary:hover {
  background: var(--color-accent-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
  color: white;
  text-decoration: none;
}

.btn-modern--secondary {
  background: var(--color-surface);
  color: var(--color-text-primary);
  border: 2px solid var(--color-border-medium);
}

.btn-modern--secondary:hover {
  background: var(--color-bg-tertiary);
  border-color: var(--color-border-dark);
  text-decoration: none;
}

.btn-modern--gradient {
  background: var(--color-accent-gradient);
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-modern--gradient:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
  color: white;
  text-decoration: none;
}

/* Vote button specific */
.btn-vote {
  min-width: 100px;
  font-size: var(--text-sm);
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

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

.text-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
.btn-modern:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

@media (prefers-contrast: high) {
  .btn-modern--primary {
    border: 2px solid currentColor;
  }
}
