/**
 * Checkpoint Page Redesign v2
 * Trivago-inspired, mobile-first design with dark mode support
 *
 * Structure:
 * 1. CSS Variables (Light + Dark Mode)
 * 2. Base Styles
 * 3. Hero Status Card
 * 4. Tab Navigation
 * 5. Info Cards
 * 6. Bottom Navigation
 * 7. Tab Content Areas
 * 8. Utilities & Animations
 */

/* ==========================================================================
   1. CSS VARIABLES
   ========================================================================== */

:root {
  /* Primary Colors - EU/Ukraine inspired */
  --v2-primary: #0057B7;
  --v2-primary-light: #3B82F6;
  --v2-primary-dark: #1e40af;
  --v2-accent: #06B6D4;
  --v2-yellow: #FFD700;

  /* Status Colors (consistent in both modes) */
  --v2-status-green: #10B981;
  --v2-status-green-bg: #ecfdf5;
  --v2-status-yellow: #F59E0B;
  --v2-status-yellow-bg: #fffbeb;
  --v2-status-red: #EF4444;
  --v2-status-red-bg: #fef2f2;

  /* Typography */
  --v2-font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --v2-font-mono: 'SF Mono', Monaco, 'Cascadia Code', monospace;

  /* Font Sizes - Consistent Scale */
  --v2-text-xs: 0.75rem;      /* 12px - labels, badges */
  --v2-text-sm: 0.875rem;     /* 14px - secondary text, meta */
  --v2-text-base: 1rem;       /* 16px - body text */
  --v2-text-lg: 1.125rem;     /* 18px - card titles */
  --v2-text-xl: 1.25rem;      /* 20px - section headers */
  --v2-text-2xl: 1.5rem;      /* 24px - page titles */

  /* Font Weights */
  --v2-font-normal: 400;
  --v2-font-medium: 500;
  --v2-font-semibold: 600;
  --v2-font-bold: 700;

  /* Line Heights */
  --v2-leading-tight: 1.25;
  --v2-leading-normal: 1.5;
  --v2-leading-relaxed: 1.625;

  /* Spacing */
  --v2-space-xs: 4px;
  --v2-space-sm: 8px;
  --v2-space-md: 16px;
  --v2-space-lg: 24px;
  --v2-space-xl: 32px;
  --v2-space-2xl: 48px;

  /* Border Radius */
  --v2-radius-sm: 8px;
  --v2-radius-md: 12px;
  --v2-radius-lg: 16px;
  --v2-radius-xl: 24px;
  --v2-radius-full: 9999px;

  /* Transitions */
  --v2-transition-fast: 150ms ease;
  --v2-transition-normal: 250ms ease;
  --v2-transition-slow: 350ms ease;

  /* Z-index layers */
  --v2-z-dropdown: 100;
  --v2-z-sticky: 200;
  --v2-z-fixed: 300;
  --v2-z-modal: 400;
  --v2-z-toast: 500;
}

/* Light Mode (default) */
:root,
[data-theme="light"] {
  --v2-bg-primary: #FFFFFF;
  --v2-bg-secondary: #F9FAFB;
  --v2-bg-tertiary: #F3F4F6;
  --v2-bg-card: #FFFFFF;
  --v2-bg-hover: #F3F4F6;

  --v2-text-primary: #111827;
  --v2-text-secondary: #6B7280;
  --v2-text-muted: #9CA3AF;
  --v2-text-inverse: #FFFFFF;

  --v2-border: #E5E7EB;
  --v2-border-light: #F3F4F6;

  --v2-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --v2-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --v2-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --v2-shadow-card: 0 2px 8px rgba(0, 0, 0, 0.04);

  --v2-hero-gradient: linear-gradient(135deg, #0057B7 0%, #1e40af 100%);
  --v2-hero-gradient-overlay: rgba(0, 0, 0, 0.1);

  /* Hero text always white (hero bg is always blue gradient) */
  --v2-hero-text: #FFFFFF;
}

/* Dark Mode */
[data-theme="dark"] {
  --v2-bg-primary: #0F172A;
  --v2-bg-secondary: #1E293B;
  --v2-bg-tertiary: #334155;
  --v2-bg-card: #1E293B;
  --v2-bg-hover: #334155;

  --v2-text-primary: #F1F5F9;
  --v2-text-secondary: #94A3B8;
  --v2-text-muted: #64748B;
  --v2-text-inverse: #0F172A;

  --v2-border: #334155;
  --v2-border-light: #475569;

  --v2-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --v2-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
  --v2-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
  --v2-shadow-card: 0 2px 8px rgba(0, 0, 0, 0.2);

  --v2-hero-gradient: linear-gradient(135deg, #1e3a8a 0%, #0c4a6e 100%);
  --v2-hero-gradient-overlay: rgba(0, 0, 0, 0.2);

  /* Hero text stays white even in dark mode */
  --v2-hero-text: #FFFFFF;

  /* Adjust status backgrounds for dark mode */
  --v2-status-green-bg: rgba(16, 185, 129, 0.15);
  --v2-status-yellow-bg: rgba(245, 158, 11, 0.15);
  --v2-status-red-bg: rgba(239, 68, 68, 0.15);
}

/* Dark mode - activated by JavaScript based on time of day (8pm-6am) */
[data-theme="dark"] {
  --v2-bg-primary: #0F172A;
  --v2-bg-secondary: #1E293B;
  --v2-bg-tertiary: #334155;
  --v2-bg-card: #1E293B;
  --v2-bg-hover: #334155;
  --v2-text-primary: #F1F5F9;
  --v2-text-secondary: #94A3B8;
  --v2-text-muted: #64748B;
  --v2-text-inverse: #0F172A;
  --v2-border: #334155;
  --v2-border-light: #475569;
  --v2-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --v2-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
  --v2-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
  --v2-shadow-card: 0 2px 8px rgba(0, 0, 0, 0.2);
  --v2-hero-gradient: linear-gradient(135deg, #1e3a8a 0%, #0c4a6e 100%);
  --v2-hero-gradient-overlay: rgba(0, 0, 0, 0.2);
  --v2-status-green-bg: rgba(16, 185, 129, 0.15);
  --v2-status-yellow-bg: rgba(245, 158, 11, 0.15);
  --v2-status-red-bg: rgba(239, 68, 68, 0.15);
}

/* ==========================================================================
   2. BASE STYLES
   ========================================================================== */

/* Body base styles */
.v2-body {
  font-family: var(--v2-font-family);
  background-color: var(--v2-bg-primary);
  color: var(--v2-text-primary);
  margin: 0;
  padding: 0;
  padding-top: 60px; /* Account for fixed header height */
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Ensure dark mode text color on body */
[data-theme="dark"] .v2-body,
[data-theme="dark"].v2-body,
.v2-body[data-theme="dark"] {
  color: var(--v2-text-primary);
  background-color: var(--v2-bg-primary);
}

.checkpoint-v2 {
  font-family: var(--v2-font-family);
  background: var(--v2-bg-primary);
  color: var(--v2-text-primary);
  min-height: 100vh;
  padding-bottom: 80px; /* Space for bottom nav on mobile */
}

@media (min-width: 768px) {
  .checkpoint-v2 {
    padding-bottom: 0;
  }
}

.checkpoint-v2 * {
  box-sizing: border-box;
}

/* ==========================================================================
   3. HERO STATUS CARD
   ========================================================================== */

.v2-hero {
  background: var(--v2-hero-gradient);
  color: var(--v2-hero-text);
  padding: var(--v2-space-lg);
  padding-top: var(--v2-space-md);
  border-radius: 0 0 var(--v2-radius-xl) var(--v2-radius-xl);
  position: relative;
  overflow: hidden;
}

.v2-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--v2-hero-gradient-overlay);
  pointer-events: none;
}

.v2-hero > * {
  position: relative;
  z-index: 1;
}

/* Checkpoint Identity */
.v2-hero__identity {
  margin-bottom: var(--v2-space-md);
}

.v2-hero__title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 var(--v2-space-xs);
  line-height: 1.2;
}

.v2-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--v2-space-xs);
  padding: var(--v2-space-xs) var(--v2-space-sm);
  background: rgba(255, 255, 255, 0.2);
  border-radius: var(--v2-radius-full);
  font-size: 0.875rem;
  font-weight: 500;
  backdrop-filter: blur(8px);
}

/* Wait Time Display */
.v2-hero__wait {
  display: flex;
  align-items: flex-end;
  gap: var(--v2-space-md);
  margin-bottom: var(--v2-space-md);
}

.v2-hero__time {
  display: flex;
  align-items: baseline;
  gap: var(--v2-space-xs);
}

.v2-hero__time-value {
  font-size: 4rem;
  font-weight: 800;
  line-height: 1;
  font-family: var(--v2-font-mono);
  letter-spacing: -2px;
}

.v2-hero__time-unit {
  font-size: 1.5rem;
  font-weight: 600;
  opacity: 0.9;
}

/* Trend Indicator */
.v2-hero__trend {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: var(--v2-space-xs) var(--v2-space-sm);
  margin-left: var(--v2-space-xs);
  border-radius: var(--v2-radius-full);
  vertical-align: middle;
  font-size: 0.8rem;
  font-weight: 600;
  backdrop-filter: blur(8px);
}

.v2-hero__trend svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.v2-hero__trend-label {
  font-family: var(--v2-font-mono);
  letter-spacing: -0.5px;
}

.v2-hero__trend--up,
.v2-hero__trend--up-slight {
  background: rgba(239, 68, 68, 0.3);
  color: var(--v2-hero-text, #fff);
}

.v2-hero__trend--down,
.v2-hero__trend--down-slight {
  background: rgba(16, 185, 129, 0.3);
  color: var(--v2-hero-text, #fff);
}

/* Status Indicator */
.v2-hero__status {
  display: inline-flex;
  align-items: center;
  gap: var(--v2-space-sm);
  padding: var(--v2-space-sm) var(--v2-space-md);
  border-radius: var(--v2-radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
}

.v2-hero__status--green { background: rgba(16, 185, 129, 0.3); }
.v2-hero__status--yellow { background: rgba(245, 158, 11, 0.3); }
.v2-hero__status--red { background: rgba(239, 68, 68, 0.3); }

.v2-hero__pulse {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: currentColor;
  animation: v2-pulse 2s ease-in-out infinite;
}

.v2-hero__status--green .v2-hero__pulse { background: var(--v2-status-green); }
.v2-hero__status--yellow .v2-hero__pulse { background: var(--v2-status-yellow); }
.v2-hero__status--red .v2-hero__pulse { background: var(--v2-status-red); }

@keyframes v2-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.2); }
}

/* Meta Row */
.v2-hero__meta {
  display: flex;
  align-items: center;
  gap: var(--v2-space-md);
  margin-bottom: var(--v2-space-md);
  font-size: 0.875rem;
  opacity: 0.9;
}

.v2-hero__meta-item {
  display: flex;
  align-items: center;
  gap: var(--v2-space-xs);
}

.v2-hero__queue-count {
  background: rgba(var(--v2-primary-rgb, 13, 110, 253), 0.1);
  padding: 2px 8px;
  border-radius: var(--v2-radius-sm);
  font-weight: 600;
  color: var(--v2-primary, #0d6efd);
}

/* Status Chips (База працює, Рухається, etc.) */
.v2-hero__chips {
  display: contents;
}

.v2-hero__chips .status-chips-container {
  display: contents;
}

.v2-hero__chips .status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--v2-space-xs);
  padding: var(--v2-space-sm) var(--v2-space-md);
  border-radius: var(--v2-radius-full);
  font-size: var(--v2-text-sm);
  font-weight: var(--v2-font-semibold);
  min-height: 44px;
  background: rgba(255, 255, 255, 0.2) !important;
  color: var(--v2-hero-text, #fff) !important;
  border: none;
  backdrop-filter: blur(8px);
}

.v2-hero__chips .status-chip i {
  margin: 0;
}

.v2-hero__chips .status-chip.database-up,
.v2-hero__chips .status-chip.mode-moving,
.v2-hero__chips .status-chip.mode-fast {
  background: rgba(16, 185, 129, 0.3) !important;
}

.v2-hero__chips .status-chip.database-down,
.v2-hero__chips .status-chip.mode-stopped,
.v2-hero__chips .status-chip.weather-ice {
  background: rgba(239, 68, 68, 0.3) !important;
}

.v2-hero__chips .status-chip.mode-slow {
  background: rgba(245, 158, 11, 0.3) !important;
}

.v2-hero__chips .status-chip.weather-fog,
.v2-hero__chips .status-chip.weather-rain,
.v2-hero__chips .status-chip.weather-snow,
.v2-hero__chips .status-chip.weather-wind {
  background: rgba(108, 117, 125, 0.3) !important;
}

.v2-hero__chips .status-chip i {
  color: inherit;
}

/* Action Pills */
.v2-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--v2-space-sm);
}

.v2-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--v2-space-xs);
  padding: var(--v2-space-sm) var(--v2-space-md);
  border-radius: var(--v2-radius-full);
  font-size: var(--v2-text-sm);
  font-weight: var(--v2-font-semibold);
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all var(--v2-transition-fast);
  min-height: 44px;
  min-width: 44px;
  background: rgba(255, 255, 255, 0.2);
  color: inherit;
  backdrop-filter: blur(8px);
}

.v2-pill:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.v2-pill:active {
  transform: translateY(0);
}

.v2-pill--primary {
  background: var(--v2-yellow);
  color: var(--v2-text-primary);
}

.v2-pill--primary:hover {
  background: #ffc800;
}

/* ==========================================================================
   4. TAB NAVIGATION
   ========================================================================== */

.v2-tabs {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  gap: var(--v2-space-sm);
  padding: var(--v2-space-md);
  background: var(--v2-bg-secondary);
  position: sticky;
  top: 60px; /* Below header */
  z-index: var(--v2-z-sticky);
  border-bottom: 1px solid var(--v2-border);
}

.v2-tabs::-webkit-scrollbar {
  display: none;
}

.v2-tab {
  flex: 0 0 auto;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--v2-space-xs);
  padding: var(--v2-space-sm) var(--v2-space-lg);
  border-radius: var(--v2-radius-md);
  background: var(--v2-bg-card);
  border: 2px solid transparent;
  color: var(--v2-text-secondary);
  font-size: var(--v2-text-sm);
  font-weight: var(--v2-font-medium);
  cursor: pointer;
  transition: all var(--v2-transition-fast);
  min-width: 80px;
  min-height: 60px;
  text-decoration: none;
}

.v2-tab:hover {
  background: var(--v2-bg-hover);
  color: var(--v2-text-primary);
}

.v2-tab--active {
  background: var(--v2-primary);
  color: white;
  border-color: var(--v2-primary);
}

.v2-tab--active:hover {
  background: var(--v2-primary-dark);
  color: white;
}

.v2-tab__icon {
  font-size: var(--v2-text-xl);
}

.v2-tab__label {
  white-space: nowrap;
}

/* Desktop tabs - horizontal layout */
@media (min-width: 768px) {
  .v2-tabs {
    justify-content: center;
    gap: var(--v2-space-md);
  }

  .v2-tab {
    flex-direction: row;
    gap: var(--v2-space-sm);
    min-width: auto;
    padding: var(--v2-space-sm) var(--v2-space-xl);
  }
}

/* ==========================================================================
   5. INFO CARDS
   ========================================================================== */

.v2-card {
  background: var(--v2-bg-card);
  border-radius: var(--v2-radius-lg);
  padding: var(--v2-space-lg);
  margin: var(--v2-space-md);
  box-shadow: var(--v2-shadow-card);
  border: 1px solid var(--v2-border);
  transition: all var(--v2-transition-normal);
  scroll-margin-top: 130px; /* Account for sticky header + tabs */
}

.v2-card:hover {
  box-shadow: var(--v2-shadow-md);
}

.v2-card--highlight {
  background: var(--v2-status-green-bg);
  border-color: var(--v2-status-green);
}

/* Recommendation boxes (Best Time / Alternatives) - wrapper for V1 styled content */
.v2-recommendation-box {
  margin-bottom: var(--v2-space-lg);
}

.v2-card--warning {
  background: var(--v2-status-yellow-bg);
  border-color: var(--v2-status-yellow);
}

.v2-card--danger {
  background: var(--v2-status-red-bg);
  border-color: var(--v2-status-red);
}

/* Useful Links Section */
.v2-useful-links {
  background: var(--v2-bg-primary);
  border: 1px solid var(--v2-border);
  border-radius: var(--v2-radius-lg);
  padding: var(--v2-space-lg);
  margin-bottom: var(--v2-space-lg);
}

.v2-useful-links__title {
  display: flex;
  align-items: center;
  gap: var(--v2-space-sm);
  font-size: var(--v2-text-lg);
  font-weight: var(--v2-font-semibold);
  color: var(--v2-text-primary);
  margin: 0 0 var(--v2-space-md);
}

.v2-useful-links__title .v2-icon {
  color: var(--v2-primary);
}

.v2-useful-links__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--v2-space-sm);
}

@media (min-width: 768px) {
  .v2-useful-links__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.v2-useful-links__item {
  display: flex;
  align-items: center;
  gap: var(--v2-space-sm);
  padding: var(--v2-space-md);
  background: var(--v2-bg-secondary);
  border-radius: var(--v2-radius-md);
  color: var(--v2-text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  transition: all var(--v2-transition-fast);
  min-height: 48px;
}

.v2-useful-links__item:hover {
  background: var(--v2-bg-tertiary);
  color: var(--v2-primary);
  transform: translateY(-1px);
}

.v2-useful-links__item .v2-icon {
  flex-shrink: 0;
  opacity: 0.7;
}

.v2-useful-links__item:hover .v2-icon {
  opacity: 1;
}

.v2-useful-links__item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v2-card--clickable {
  cursor: pointer;
}

.v2-card--clickable:hover {
  transform: translateY(-2px);
}

.v2-card__header {
  display: flex;
  align-items: center;
  gap: var(--v2-space-sm);
  margin-bottom: var(--v2-space-md);
}

.v2-card__icon {
  font-size: var(--v2-text-xl);
  flex-shrink: 0;
}

.v2-card__title {
  font-size: var(--v2-text-lg);
  font-weight: var(--v2-font-semibold);
  margin: 0;
  color: var(--v2-text-primary);
  line-height: var(--v2-leading-tight);
}

.v2-card__subtitle {
  font-size: var(--v2-text-sm);
  color: var(--v2-text-secondary);
  margin-top: var(--v2-space-xs);
  line-height: var(--v2-leading-normal);
}

.v2-card__content {
  color: var(--v2-text-secondary);
  font-size: var(--v2-text-sm);
  line-height: var(--v2-leading-normal);
}

.v2-card__footer {
  margin-top: var(--v2-space-md);
  padding-top: var(--v2-space-md);
  border-top: 1px solid var(--v2-border);
}

/* Compact card variant */
.v2-card--compact {
  padding: var(--v2-space-md);
}

.v2-card--compact .v2-card__header {
  margin-bottom: var(--v2-space-sm);
}

/* ==========================================================================
   6. BOTTOM NAVIGATION (Mobile)
   ========================================================================== */

.v2-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-around;
  background: var(--v2-bg-card);
  border-top: 1px solid var(--v2-border);
  padding: var(--v2-space-sm) 0;
  padding-bottom: calc(var(--v2-space-sm) + env(safe-area-inset-bottom, 0px));
  z-index: var(--v2-z-fixed);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.v2-bottom-nav__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: var(--v2-space-sm);
  min-width: 64px;
  min-height: 44px;
  color: var(--v2-text-muted);
  text-decoration: none;
  font-size: var(--v2-text-xs);
  font-weight: var(--v2-font-medium);
  border: none;
  background: transparent;
  cursor: pointer;
  transition: color var(--v2-transition-fast);
}

.v2-bottom-nav__item:hover,
.v2-bottom-nav__item--active {
  color: var(--v2-primary);
}

.v2-bottom-nav__icon {
  font-size: var(--v2-text-xl);
}

/* Hide on desktop */
@media (min-width: 768px) {
  .v2-bottom-nav {
    display: none;
  }
}

/* ==========================================================================
   7. TAB CONTENT AREAS
   ========================================================================== */

.v2-tab-content {
  display: none;
  padding-bottom: var(--v2-space-xl);
}

.v2-tab-content--active {
  display: block;
  animation: v2-fade-in 0.3s ease;
}

@keyframes v2-fade-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Next Tab CTA - encourages users to continue reading */
.v2-next-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--v2-space-md);
  margin-top: var(--v2-space-xl);
  padding: var(--v2-space-lg);
  background: linear-gradient(to bottom, transparent, var(--v2-bg-secondary));
  border-radius: var(--v2-radius-lg);
  text-align: center;
}

.v2-next-section__text {
  font-size: var(--v2-text-sm);
  color: var(--v2-text-muted);
}

.v2-next-section__btn {
  display: inline-flex;
  align-items: center;
  gap: var(--v2-space-sm);
  padding: var(--v2-space-md) var(--v2-space-xl);
  background: var(--v2-primary);
  color: white;
  border: none;
  border-radius: var(--v2-radius-full);
  font-size: var(--v2-text-sm);
  font-weight: var(--v2-font-semibold);
  cursor: pointer;
  transition: all var(--v2-transition-fast);
  min-height: 48px;
  text-decoration: none;
}

.v2-next-section__btn:hover {
  background: var(--v2-primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 87, 183, 0.3);
}

.v2-next-section__btn svg {
  transition: transform var(--v2-transition-fast);
}

.v2-next-section__btn:hover svg {
  transform: translateX(4px);
}

/* NOTE: Alternatives List styles moved to Section 10 (V2 NEARBY ALTERNATIVES) */

/* Forecast Table */
.v2-forecast-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 calc(-1 * var(--v2-space-lg));
  padding: 0 var(--v2-space-lg);
}

.v2-forecast-table {
  width: 100%;
  min-width: 600px;
  border-collapse: collapse;
}

.v2-forecast-table th,
.v2-forecast-table td {
  padding: var(--v2-space-sm) var(--v2-space-md);
  text-align: center;
  border-bottom: 1px solid var(--v2-border);
}

.v2-forecast-table th {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--v2-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.v2-forecast-table td {
  font-weight: 500;
}

/* ==========================================================================
   8. UTILITIES & ANIMATIONS
   ========================================================================== */

/* Status colors */
.v2-status-green { color: var(--v2-status-green); }
.v2-status-yellow { color: var(--v2-status-yellow); }
.v2-status-red { color: var(--v2-status-red); }

/* Text utilities */
.v2-text-primary { color: var(--v2-text-primary); }
.v2-text-secondary { color: var(--v2-text-secondary); }
.v2-text-muted { color: var(--v2-text-muted); }

/* Spacing utilities */
.v2-mb-0 { margin-bottom: 0; }
.v2-mb-sm { margin-bottom: var(--v2-space-sm); }
.v2-mb-md { margin-bottom: var(--v2-space-md); }
.v2-mb-lg { margin-bottom: var(--v2-space-lg); }

/* Skeleton loading */
.v2-skeleton {
  background: linear-gradient(
    90deg,
    var(--v2-bg-tertiary) 25%,
    var(--v2-bg-secondary) 50%,
    var(--v2-bg-tertiary) 75%
  );
  background-size: 200% 100%;
  animation: v2-skeleton-loading 1.5s infinite;
  border-radius: var(--v2-radius-sm);
}

@keyframes v2-skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Theme Toggle Button */
.v2-theme-toggle {
  position: fixed;
  bottom: 100px;
  right: var(--v2-space-md);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--v2-bg-card);
  border: 1px solid var(--v2-border);
  box-shadow: var(--v2-shadow-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.25rem;
  z-index: var(--v2-z-fixed);
  transition: all var(--v2-transition-fast);
}

.v2-theme-toggle:hover {
  transform: scale(1.1);
}

@media (min-width: 768px) {
  .v2-theme-toggle {
    bottom: var(--v2-space-lg);
  }
}

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

/* Print styles */
@media print {
  .v2-bottom-nav,
  .v2-theme-toggle {
    display: none !important;
  }

  .checkpoint-v2 {
    padding-bottom: 0;
  }
}

/* ==========================================================================
   9. V2 BEST TIME RECOMMENDATION
   ========================================================================== */

.v2-best-time {
  display: flex;
  flex-direction: column;
  gap: var(--v2-space-md);
}

.v2-best-time__section {
  display: flex;
  flex-direction: column;
  gap: var(--v2-space-sm);
}

.v2-best-time__section--tomorrow {
  opacity: 0.8;
  padding-top: var(--v2-space-sm);
  border-top: 1px dashed var(--v2-border);
}

.v2-best-time__label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--v2-text-muted);
}

.v2-best-time__slots {
  display: flex;
  gap: var(--v2-space-sm);
  flex-wrap: wrap;
}

.v2-best-time__slot {
  display: flex;
  align-items: center;
  gap: var(--v2-space-xs);
  padding: var(--v2-space-sm) var(--v2-space-md);
  background: var(--v2-bg-tertiary);
  border-radius: var(--v2-radius-md);
  transition: all var(--v2-transition-fast);
}

.v2-best-time__slot--best {
  background: var(--v2-status-green-bg);
  border: 1px solid var(--v2-status-green);
}

.v2-best-time__slot--past {
  opacity: 0.5;
  text-decoration: line-through;
}

.v2-best-time__hour {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--v2-text-primary);
  font-family: var(--v2-font-mono);
}

.v2-best-time__slot--best .v2-best-time__hour {
  color: var(--v2-status-green);
}

.v2-best-time__reduction {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--v2-status-green);
  background: rgba(16, 185, 129, 0.1);
  padding: 2px 6px;
  border-radius: var(--v2-radius-sm);
}

.v2-best-time__footer {
  font-size: 0.75rem;
  color: var(--v2-text-muted);
  display: flex;
  align-items: center;
  gap: var(--v2-space-xs);
  padding-top: var(--v2-space-sm);
  border-top: 1px solid var(--v2-border);
}

/* ==========================================================================
   10. V2 NEARBY ALTERNATIVES (Queue Comparison Card)
   ========================================================================== */

.v2-nearby {
  background: var(--v2-bg-primary);
  border-radius: var(--v2-radius-lg);
  padding: var(--v2-space-lg);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
  border: 1px solid var(--v2-border-color);
  scroll-margin-top: 130px; /* Account for sticky header + tabs */
}

/* Header with icon and title */
.v2-nearby__header {
  display: flex;
  align-items: center;
  gap: var(--v2-space-sm);
  margin-bottom: var(--v2-space-md);
  padding-bottom: var(--v2-space-sm);
  border-bottom: 1px solid var(--v2-border-color);
}

.v2-nearby__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--v2-text-xl);
  color: var(--v2-primary);
  flex-shrink: 0;
}

.v2-nearby__label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--v2-text-primary);
  margin: 0;
}

/* Slots container - vertical stack on mobile, horizontal on desktop */
.v2-nearby__slots {
  display: flex;
  flex-direction: column;
  gap: var(--v2-space-sm);
}

/* Individual slot - card-like row */
.v2-nearby__slot {
  display: flex;
  align-items: center;
  gap: var(--v2-space-md);
  padding: var(--v2-space-md);
  background: var(--v2-bg-secondary);
  border-radius: var(--v2-radius-md);
  text-decoration: none;
  color: inherit;
  transition: all var(--v2-transition-fast);
  border: 1px solid transparent;
}

.v2-nearby__slot:hover {
  background: var(--v2-bg-tertiary);
  border-color: var(--v2-primary);
  transform: translateX(4px);
}

/* Best slot - highlighted with green */
.v2-nearby__slot--best {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(16, 185, 129, 0.04) 100%);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.v2-nearby__slot--best:hover {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(16, 185, 129, 0.08) 100%);
  border-color: #10b981;
}

/* Queue count - large number */
.v2-nearby__queue {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--v2-text-primary);
  font-family: var(--v2-font-mono);
  min-width: 48px;
  text-align: center;
}

.v2-nearby__slot--best .v2-nearby__queue {
  color: #10b981;
}

/* Slot info - name and distance */
.v2-nearby__info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.v2-nearby__name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--v2-text-primary);
}

.v2-nearby__dist {
  font-size: 0.75rem;
  color: var(--v2-text-muted);
}

/* Difference badge */
.v2-nearby__diff {
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--v2-radius-full);
  white-space: nowrap;
}

.v2-nearby__diff--better {
  color: #059669;
  background: rgba(16, 185, 129, 0.15);
}

.v2-nearby__diff--worse {
  color: #dc2626;
  background: rgba(239, 68, 68, 0.1);
}

/* Footer - current queue info */
.v2-nearby__footer {
  margin-top: var(--v2-space-md);
  padding-top: var(--v2-space-sm);
  border-top: 1px dashed var(--v2-border-color);
  font-size: 0.8rem;
  color: var(--v2-text-muted);
  display: flex;
  align-items: center;
  gap: var(--v2-space-xs);
}

.v2-nearby__footer strong {
  color: var(--v2-text-primary);
  font-weight: 600;
}

/* Arrow indicator on slots */
.v2-nearby__arrow {
  color: var(--v2-text-muted);
  opacity: 0;
  transition: opacity var(--v2-transition-fast), transform var(--v2-transition-fast);
}

.v2-nearby__slot:hover .v2-nearby__arrow {
  opacity: 1;
  transform: translateX(4px);
}

/* Dark mode adjustments */
[data-theme="dark"] .v2-nearby {
  background: var(--v2-bg-secondary);
  border-color: var(--v2-border-color);
}

[data-theme="dark"] .v2-nearby__slot {
  background: var(--v2-bg-tertiary);
}

[data-theme="dark"] .v2-nearby__slot--best {
  background: rgba(16, 185, 129, 0.12);
}

/* Mobile */
@media (max-width: 480px) {
  .v2-nearby {
    padding: var(--v2-space-md);
  }

  .v2-nearby__slot {
    padding: var(--v2-space-sm) var(--v2-space-md);
  }

  .v2-nearby__queue {
    font-size: 1.25rem;
    min-width: 40px;
  }

  .v2-nearby__name {
    font-size: 0.85rem;
  }

  .v2-nearby__diff {
    font-size: 0.75rem;
    padding: 3px 8px;
  }
}

/* ==========================================================================
   11. V2 HEADER
   ========================================================================== */

.v2-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: var(--v2-bg-card);
  color: var(--v2-text-primary);
  border-bottom: 1px solid var(--v2-border);
  z-index: var(--v2-z-fixed);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.v2-header__container {
  display: flex;
  align-items: center;
  gap: var(--v2-space-sm);
  height: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--v2-space-md);
}

.v2-header__back {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--v2-radius-md);
  color: var(--v2-text-primary);
  transition: background var(--v2-transition-fast);
}

.v2-header__back:hover {
  background: var(--v2-bg-hover);
}

.v2-header__logo {
  display: flex;
  align-items: center;
  gap: var(--v2-space-sm);
  text-decoration: none;
  color: var(--v2-text-primary);
}

.v2-header__logo img {
  border-radius: var(--v2-radius-sm);
}

.v2-header__brand {
  font-weight: 700;
  font-size: 1.125rem;
  display: none;
  /* Blue badge style matching old version */
  color: #fff;
  background-color: #005bbf;
  padding: 4px 10px;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

@media (min-width: 480px) {
  .v2-header__brand {
    display: inline-block;
  }
}

.v2-header__spacer {
  flex: 1;
}

/* Desktop Navigation */
.v2-header__nav {
  display: none;
  align-items: center;
  gap: var(--v2-space-xs);
  margin-right: var(--v2-space-md);
}

@media (min-width: 768px) {
  .v2-header__nav {
    display: flex;
  }
}

.v2-header__nav-link {
  display: inline-flex;
  align-items: center;
  padding: var(--v2-space-xs) var(--v2-space-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--v2-text-secondary);
  text-decoration: none;
  border-radius: var(--v2-radius-sm);
  transition: all var(--v2-transition-fast);
  white-space: nowrap;
}

.v2-header__nav-link:hover {
  color: var(--v2-text-primary);
  background: var(--v2-bg-hover);
}

.v2-header__nav-link--active {
  color: var(--v2-primary);
  background: rgba(0, 87, 183, 0.1);
}

/* Language dropdown */
.v2-header__lang {
  position: relative;
}

.v2-header__lang-btn {
  display: flex;
  align-items: center;
  gap: var(--v2-space-xs);
  padding: var(--v2-space-sm) var(--v2-space-md);
  border: 1px solid var(--v2-border);
  border-radius: var(--v2-radius-md);
  background: transparent;
  color: var(--v2-text-primary);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--v2-transition-fast);
}

.v2-header__lang-btn:hover {
  background: var(--v2-bg-hover);
  border-color: var(--v2-text-muted);
}

.v2-header__lang-flag {
  font-size: 1.125rem;
}

.v2-header__lang-code {
  display: none;
}

@media (min-width: 480px) {
  .v2-header__lang-code {
    display: block;
  }
}

.v2-header__lang-dropdown {
  position: absolute;
  top: calc(100% + var(--v2-space-xs));
  right: 0;
  min-width: 160px;
  background: var(--v2-bg-card);
  border: 1px solid var(--v2-border);
  border-radius: var(--v2-radius-md);
  box-shadow: var(--v2-shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all var(--v2-transition-fast);
  z-index: var(--v2-z-dropdown);
}

.v2-header__lang-dropdown--open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.v2-header__lang-option {
  display: flex;
  align-items: center;
  gap: var(--v2-space-sm);
  padding: var(--v2-space-sm) var(--v2-space-md);
  color: var(--v2-text-primary);
  text-decoration: none;
  font-size: 0.875rem;
  transition: background var(--v2-transition-fast);
}

.v2-header__lang-option:hover {
  background: var(--v2-bg-hover);
}

.v2-header__lang-option--active {
  background: var(--v2-bg-tertiary);
  font-weight: 600;
}

/* Notification bell button */
.v2-header__notify {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 40px;
  height: 40px;
  border: 1px solid var(--v2-border-color);
  border-radius: 50%;
  background: transparent;
  color: var(--v2-text-primary);
  cursor: pointer;
  text-decoration: none;
  transition: all var(--v2-transition-fast);
}

.v2-header__notify:hover {
  background: var(--v2-bg-hover);
  border-color: var(--v2-primary);
  color: var(--v2-primary);
}

.v2-header__notify-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  animation: v2-notify-pulse 2s infinite;
}

@keyframes v2-notify-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Theme toggle */
.v2-header__theme {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: var(--v2-radius-md);
  background: transparent;
  color: var(--v2-text-primary);
  cursor: pointer;
  transition: background var(--v2-transition-fast);
}

.v2-header__theme:hover {
  background: var(--v2-bg-hover);
}

.v2-header__theme-dark {
  display: none;
}

[data-theme="dark"] .v2-header__theme-light {
  display: none;
}

[data-theme="dark"] .v2-header__theme-dark {
  display: block;
}

/* Menu button */
.v2-header__menu {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: var(--v2-radius-md);
  background: transparent;
  color: var(--v2-text-primary);
  cursor: pointer;
  transition: background var(--v2-transition-fast);
}

.v2-header__menu:hover {
  background: var(--v2-bg-hover);
}

@media (min-width: 768px) {
  .v2-header__menu {
    display: none;
  }
}

/* Mobile menu drawer */
.v2-menu-drawer {
  position: fixed;
  inset: 0;
  z-index: var(--v2-z-modal);
  pointer-events: none;
}

.v2-menu-drawer--open {
  pointer-events: auto;
}

.v2-menu-drawer__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity var(--v2-transition-normal);
}

.v2-menu-drawer--open .v2-menu-drawer__overlay {
  opacity: 1;
}

.v2-menu-drawer__content {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 280px;
  max-width: 85vw;
  background: var(--v2-bg-card);
  transform: translateX(100%);
  transition: transform var(--v2-transition-normal);
  display: flex;
  flex-direction: column;
  visibility: hidden; /* Prevent CLS - hide until opened */
}

.v2-menu-drawer--open .v2-menu-drawer__content {
  visibility: visible;
  transform: translateX(0);
}

.v2-menu-drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--v2-space-md) var(--v2-space-lg);
  border-bottom: 1px solid var(--v2-border);
}

.v2-menu-drawer__title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--v2-text-primary);
}

.v2-menu-drawer__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: var(--v2-radius-md);
  background: transparent;
  color: var(--v2-text-primary);
  cursor: pointer;
}

.v2-menu-drawer__close:hover {
  background: var(--v2-bg-hover);
}

.v2-menu-drawer__nav {
  flex: 1;
  padding: var(--v2-space-md);
  overflow-y: auto;
}

.v2-menu-drawer__link {
  display: flex;
  align-items: center;
  gap: var(--v2-space-md);
  padding: var(--v2-space-md);
  border-radius: var(--v2-radius-md);
  color: var(--v2-text-primary);
  text-decoration: none;
  font-size: 1rem;
  transition: background var(--v2-transition-fast);
}

.v2-menu-drawer__link:hover {
  background: var(--v2-bg-hover);
}

.v2-menu-drawer__link i {
  width: 24px;
  text-align: center;
  color: var(--v2-text-muted);
}

body.v2-menu-open {
  overflow: hidden;
}

/* ==========================================================================
   12. V2 FOOTER
   ========================================================================== */

.v2-footer {
  background: var(--v2-bg-secondary);
  color: var(--v2-text-primary);
  border-top: 1px solid var(--v2-border);
  padding: var(--v2-space-xl) var(--v2-space-md);
  margin-top: var(--v2-space-2xl);
}

.v2-footer__container {
  max-width: 1200px;
  margin: 0 auto;
}

.v2-footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--v2-space-lg);
}

@media (min-width: 640px) {
  .v2-footer__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .v2-footer__grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Footer brand section */
.v2-footer__brand {
  margin-bottom: var(--v2-space-md);
}

.v2-footer__logo {
  display: inline-flex;
  align-items: center;
  gap: var(--v2-space-sm);
  text-decoration: none;
  color: inherit;
  margin-bottom: var(--v2-space-sm);
}

.v2-footer__logo img {
  border-radius: var(--v2-radius-sm);
}

.v2-footer__logo span {
  /* Blue badge style matching old version */
  font-weight: 700;
  font-size: 1.125rem;
  color: #fff;
  background-color: #005bbf;
  padding: 4px 10px;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.v2-footer__tagline {
  font-size: 0.8125rem;
  color: var(--v2-text-muted);
  line-height: 1.5;
  margin: var(--v2-space-sm) 0 0;
}

.v2-footer__section h4 {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--v2-text-muted);
  margin: 0 0 var(--v2-space-md);
}

.v2-footer__links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--v2-space-xs);
}

.v2-footer__links a {
  display: flex;
  align-items: center;
  gap: var(--v2-space-sm);
  color: var(--v2-text-secondary);
  text-decoration: none;
  font-size: 0.9375rem;
  padding: var(--v2-space-sm) var(--v2-space-sm);
  margin: 0 calc(-1 * var(--v2-space-sm));
  border-radius: var(--v2-radius-md);
  transition: all var(--v2-transition-fast);
  min-height: 44px; /* Touch-friendly tap target */
}

.v2-footer__links a:hover,
.v2-footer__links a:focus {
  color: var(--v2-primary);
  background: rgba(var(--v2-primary-rgb, 13, 110, 253), 0.08);
}

.v2-footer__links a:active {
  background: rgba(var(--v2-primary-rgb, 13, 110, 253), 0.15);
}

.v2-footer__links svg {
  flex-shrink: 0;
  opacity: 0.7;
}

.v2-footer__links a:hover svg {
  opacity: 1;
}

.v2-footer__social {
  display: flex;
  gap: var(--v2-space-sm);
  margin-top: var(--v2-space-md);
}

.v2-footer__social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--v2-radius-full);
  background: var(--v2-bg-tertiary);
  color: var(--v2-text-secondary);
  transition: all var(--v2-transition-fast);
}

.v2-footer__social a:hover {
  background: var(--v2-primary);
  color: white;
}

/* Footer links with icons */
.v2-footer__links a {
  display: flex;
  align-items: center;
  gap: var(--v2-space-xs);
}

.v2-footer__links svg {
  flex-shrink: 0;
  opacity: 0.6;
}

.v2-footer__links a:hover svg {
  opacity: 1;
}

/* Footer legal section */
.v2-footer__legal {
  margin-top: var(--v2-space-lg);
  padding-top: var(--v2-space-lg);
  border-top: 1px solid var(--v2-border);
  text-align: center;
}

.v2-footer__legal p {
  font-size: 0.7rem;
  color: var(--v2-text-muted);
  line-height: 1.6;
  margin: 0 0 var(--v2-space-xs) 0;
}

.v2-footer__legal strong {
  color: var(--v2-text-secondary);
}

.v2-footer__domains,
.v2-footer__trademark {
  margin: 0 0 var(--v2-space-xs) 0;
}

.v2-footer__bottom {
  margin-top: var(--v2-space-lg);
  padding-top: var(--v2-space-lg);
  border-top: 1px solid var(--v2-border);
  text-align: center;
}

.v2-footer__copyright {
  font-size: 0.75rem;
  color: var(--v2-text-muted);
  line-height: 1.6;
  margin: 0;
}

.v2-footer__copyright a {
  color: var(--v2-text-secondary);
  text-decoration: none;
}

.v2-footer__copyright a:hover {
  color: var(--v2-primary);
}

/* Language selector (desktop only) */
.v2-footer__lang-selector {
  display: none;
  align-items: center;
  gap: var(--v2-space-sm);
  margin-bottom: var(--v2-space-lg);
  padding-bottom: var(--v2-space-md);
  border-bottom: 1px solid var(--v2-border);
}

@media (min-width: 768px) {
  .v2-footer__lang-selector {
    display: flex;
  }
}

.v2-footer__lang-selector label {
  font-size: 0.8125rem;
  color: var(--v2-text-muted);
  font-weight: 500;
}

.v2-footer__lang-selector select {
  padding: var(--v2-space-xs) var(--v2-space-sm);
  border: 1px solid var(--v2-border);
  border-radius: var(--v2-radius-md);
  background: var(--v2-bg-primary);
  color: var(--v2-text-primary);
  font-size: 0.875rem;
  cursor: pointer;
  min-height: 36px;
  transition: border-color var(--v2-transition-fast);
}

.v2-footer__lang-selector select:hover,
.v2-footer__lang-selector select:focus {
  border-color: var(--v2-primary);
  outline: none;
}

/* Social link (button style) */
.v2-footer__social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--v2-radius-full);
  background: var(--v2-bg-tertiary);
  color: var(--v2-text-secondary);
  border: none;
  cursor: pointer;
  transition: all var(--v2-transition-fast);
  text-decoration: none;
}

.v2-footer__social-link:hover {
  background: var(--v2-primary);
  color: white;
}

/* Telegram dropdown wrapper */
.v2-footer__telegram-wrapper {
  position: relative;
}

.v2-footer__telegram-dropdown {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 280px;
  background: var(--v2-bg-primary);
  border: 1px solid var(--v2-border);
  border-radius: var(--v2-radius-lg);
  box-shadow: var(--v2-shadow-lg);
  z-index: var(--v2-z-dropdown);
  padding: var(--v2-space-sm);
}

.v2-footer__telegram-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--v2-text-muted);
  padding: var(--v2-space-xs) var(--v2-space-sm);
  margin-bottom: var(--v2-space-xs);
}

.v2-footer__telegram-channel {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: var(--v2-space-sm);
  border-radius: var(--v2-radius-md);
  text-decoration: none;
  color: inherit;
  transition: background var(--v2-transition-fast);
}

.v2-footer__telegram-channel:hover {
  background: var(--v2-bg-secondary);
}

.v2-footer__telegram-channel strong {
  font-size: 0.9375rem;
  color: var(--v2-text-primary);
}

.v2-footer__telegram-channel span {
  font-size: 0.8125rem;
  color: var(--v2-text-muted);
}

/* Trustpilot widget */
.v2-footer__trustpilot {
  margin-top: var(--v2-space-lg);
  padding-top: var(--v2-space-md);
  border-top: 1px solid var(--v2-border);
  display: flex;
  justify-content: center;
}

.v2-footer__trustpilot .trustpilot-widget {
  max-width: 400px;
}

/* Popular links grid (2 columns on tablet+) */
.v2-footer__links--grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--v2-space-xs);
}

@media (min-width: 480px) {
  .v2-footer__links--grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Popular checkpoints with queue status */
.v2-footer__links--popular-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--v2-space-xs);
}

@media (min-width: 480px) {
  .v2-footer__links--popular-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.v2-footer__popular-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--v2-space-xs);
  padding: 4px 8px;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

.v2-footer__popular-link:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.v2-footer__popular-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v2-footer__queue-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  font-size: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.v2-footer__queue-indicator--success {
  color: #28a745;
}

.v2-footer__queue-indicator--warning {
  color: #ffc107;
}

.v2-footer__queue-indicator--danger {
  color: #dc3545;
}

/* 5-column layout on large desktop */
@media (min-width: 1200px) {
  .v2-footer__grid {
    grid-template-columns: 1.5fr repeat(4, 1fr);
  }
}

/* ==========================================================================
   9. NATIVE TOOLTIPS (CSS-only, no Bootstrap)
   ========================================================================== */

/* Tooltip via data-tooltip attribute */
[data-tooltip] {
  position: relative;
  cursor: help;
}

[data-tooltip]::before,
[data-tooltip]::after {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--v2-transition-fast), transform var(--v2-transition-fast);
  z-index: var(--v2-z-toast);
}

/* Tooltip arrow */
[data-tooltip]::before {
  content: '';
  bottom: calc(100% + 4px);
  border: 6px solid transparent;
  border-top-color: var(--v2-bg-tertiary);
}

/* Tooltip content */
[data-tooltip]::after {
  content: attr(data-tooltip);
  bottom: calc(100% + 14px);
  padding: var(--v2-space-xs) var(--v2-space-sm);
  background: var(--v2-bg-tertiary);
  color: var(--v2-text-primary);
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
  border-radius: var(--v2-radius-sm);
  box-shadow: var(--v2-shadow-md);
}

[data-tooltip]:hover::before,
[data-tooltip]:hover::after,
[data-tooltip]:focus::before,
[data-tooltip]:focus::after {
  opacity: 1;
  transform: translateX(-50%) translateY(-2px);
}

/* Bottom tooltip variant */
[data-tooltip-position="bottom"]::before {
  bottom: auto;
  top: calc(100% + 4px);
  border-top-color: transparent;
  border-bottom-color: var(--v2-bg-tertiary);
}

[data-tooltip-position="bottom"]::after {
  bottom: auto;
  top: calc(100% + 14px);
}

[data-tooltip-position="bottom"]:hover::before,
[data-tooltip-position="bottom"]:hover::after {
  transform: translateX(-50%) translateY(2px);
}

/* ==========================================================================
   10. NATIVE MODALS (using <dialog> element only)
   Note: For Bootstrap modals, see Section 18
   ========================================================================== */

/* Only apply to actual <dialog> elements, not divs inside Bootstrap modals */
dialog.v2-modal {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  margin: auto;
  padding: 0;
  border: none;
  border-radius: var(--v2-radius-lg);
  background: var(--v2-bg-card);
  box-shadow: var(--v2-shadow-lg);
  overflow: hidden;
}

dialog.v2-modal::backdrop {
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

dialog.v2-modal[open] {
  animation: v2-modal-in 0.2s ease-out;
}

@keyframes v2-modal-in {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(-10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

dialog.v2-modal .v2-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--v2-space-md) var(--v2-space-lg);
  border-bottom: 1px solid var(--v2-border);
}

dialog.v2-modal .v2-modal__title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--v2-text-primary);
  margin: 0;
}

dialog.v2-modal .v2-modal__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: var(--v2-radius-full);
  background: transparent;
  color: var(--v2-text-secondary);
  cursor: pointer;
  transition: background var(--v2-transition-fast);
}

dialog.v2-modal .v2-modal__close:hover {
  background: var(--v2-bg-hover);
}

dialog.v2-modal .v2-modal__body {
  padding: var(--v2-space-lg);
  overflow-y: auto;
  max-height: calc(90vh - 140px);
}

dialog.v2-modal .v2-modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: var(--v2-space-sm);
  padding: var(--v2-space-md) var(--v2-space-lg);
  border-top: 1px solid var(--v2-border);
}

/* ==========================================================================
   11. UTILITY BUTTONS (replacement for Bootstrap buttons)
   ========================================================================== */

.v2-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--v2-space-xs);
  padding: var(--v2-space-sm) var(--v2-space-md);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.5;
  text-decoration: none;
  border: none;
  border-radius: var(--v2-radius-sm);
  cursor: pointer;
  transition: all var(--v2-transition-fast);
}

.v2-btn--primary {
  background: var(--v2-primary);
  color: white;
}

.v2-btn--primary:hover {
  background: var(--v2-primary-dark);
}

.v2-btn--secondary {
  background: var(--v2-bg-tertiary);
  color: var(--v2-text-primary);
}

.v2-btn--secondary:hover {
  background: var(--v2-bg-hover);
}

.v2-btn--outline {
  background: transparent;
  border: 1px solid var(--v2-border);
  color: var(--v2-text-primary);
}

.v2-btn--outline:hover {
  background: var(--v2-bg-hover);
  border-color: var(--v2-primary);
}

.v2-btn--sm {
  padding: var(--v2-space-xs) var(--v2-space-sm);
  font-size: 0.75rem;
}

.v2-btn--lg {
  padding: var(--v2-space-md) var(--v2-space-lg);
  font-size: 1rem;
}

/* ==========================================================================
   12. BREADCRUMB NAVIGATION (Bootstrap replacement)
   ========================================================================== */

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  padding: 0;
  margin: 0 0 var(--v2-space-sm) 0;
  list-style: none;
  font-size: 0.8125rem;
  background: transparent;
}

.breadcrumb-item {
  display: inline-flex;
  align-items: center;
}

.breadcrumb-item + .breadcrumb-item {
  padding-left: var(--v2-space-sm);
}

.breadcrumb-item + .breadcrumb-item::before {
  content: "›";
  padding-right: var(--v2-space-sm);
  color: var(--v2-text-muted);
  font-weight: 400;
}

.breadcrumb-item a {
  color: var(--v2-text-secondary);
  text-decoration: none;
  transition: color var(--v2-transition-fast);
}

.breadcrumb-item a:hover {
  color: var(--v2-primary);
  text-decoration: underline;
}

.breadcrumb-item.active {
  color: var(--v2-text-muted);
}

/* ==========================================================================
   13. BOOTSTRAP BUTTON REPLACEMENTS
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--v2-space-xs);
  padding: var(--v2-space-sm) var(--v2-space-md);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.5;
  text-decoration: none;
  white-space: nowrap;
  vertical-align: middle;
  cursor: pointer;
  user-select: none;
  border: 1px solid transparent;
  border-radius: var(--v2-radius-sm);
  transition: all var(--v2-transition-fast);
  background: var(--v2-bg-tertiary);
  color: var(--v2-text-primary);
}

.btn:hover {
  background: var(--v2-bg-hover);
}

.btn:focus {
  outline: 2px solid var(--v2-primary);
  outline-offset: 2px;
}

.btn:disabled,
.btn.disabled {
  opacity: 0.6;
  pointer-events: none;
}

/* Primary Button */
.btn-primary {
  background: var(--v2-primary);
  border-color: var(--v2-primary);
  color: white;
}

.btn-primary:hover {
  background: var(--v2-primary-dark);
  border-color: var(--v2-primary-dark);
  color: white;
}

/* Secondary Button */
.btn-secondary {
  background: var(--v2-text-secondary);
  border-color: var(--v2-text-secondary);
  color: white;
}

.btn-secondary:hover {
  background: var(--v2-text-primary);
  border-color: var(--v2-text-primary);
  color: white;
}

/* Outline Primary */
.btn-outline-primary {
  background: transparent;
  border-color: var(--v2-primary);
  color: var(--v2-primary);
}

.btn-outline-primary:hover,
.btn-outline-primary.active {
  background: var(--v2-primary);
  border-color: var(--v2-primary);
  color: white;
}

/* Outline Secondary */
.btn-outline-secondary {
  background: transparent;
  border-color: var(--v2-border);
  color: var(--v2-text-secondary);
}

.btn-outline-secondary:hover,
.btn-outline-secondary.active {
  background: var(--v2-bg-hover);
  border-color: var(--v2-text-secondary);
  color: var(--v2-text-primary);
}

/* Button Sizes */
.btn-sm {
  padding: var(--v2-space-xs) var(--v2-space-sm);
  font-size: 0.75rem;
}

.btn-lg {
  padding: var(--v2-space-md) var(--v2-space-lg);
  font-size: 1rem;
}

/* Button Group */
.btn-group {
  display: inline-flex;
  vertical-align: middle;
}

.btn-group > .btn {
  position: relative;
  flex: 0 1 auto;
  border-radius: 0;
}

.btn-group > .btn:first-child {
  border-top-left-radius: var(--v2-radius-sm);
  border-bottom-left-radius: var(--v2-radius-sm);
}

.btn-group > .btn:last-child {
  border-top-right-radius: var(--v2-radius-sm);
  border-bottom-right-radius: var(--v2-radius-sm);
}

.btn-group > .btn:not(:first-child) {
  margin-left: -1px;
}

/* ==========================================================================
   13.5 SVG ICONS (v2 icon system)
   ========================================================================== */

/* Base icon styles */
.v2-icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  vertical-align: -0.125em;
  flex-shrink: 0;
}

/* Icon sizes */
.v2-icon--xs { width: 12px; height: 12px; }
.v2-icon--sm { width: 14px; height: 14px; }
.v2-icon--md { width: 18px; height: 18px; }
.v2-icon--lg { width: 24px; height: 24px; }
.v2-icon--xl { width: 32px; height: 32px; }
.v2-icon--large { width: 64px; height: 64px; display: block; margin: 0 auto; }

/* Icon colors */
.v2-icon--success { color: var(--v2-status-green); }
.v2-icon--warning { color: var(--v2-status-yellow); }
.v2-icon--danger { color: var(--v2-status-red); }
.v2-icon--muted { color: var(--v2-text-muted); }
.v2-icon--primary { color: var(--v2-primary); }

/* Spinning animation for loaders */
.v2-icon--spin {
  animation: v2-icon-spin 1s linear infinite;
}

@keyframes v2-icon-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Icon in buttons and links */
.v2-icon + span,
span + .v2-icon {
  margin-left: 0.35em;
}

/* Facility icons in lists */
.facility .v2-icon,
.facility .icon {
  width: 20px;
  height: 20px;
  margin-right: var(--v2-space-sm);
  color: var(--v2-text-secondary);
}

/* ==========================================================================
   14. MODE TOGGLE BUTTONS (Crossing type selectors)
   ========================================================================== */

/* ==========================================================================
   MODE SELECTOR (Crossing types: car, bus, truck, etc.)
   ========================================================================== */

.v2-mode-selector {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--v2-space-xs);
  padding: var(--v2-space-sm) 0;
}

.v2-mode-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--v2-space-xs);
  padding: var(--v2-space-sm) var(--v2-space-md);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--v2-text-secondary);
  background: var(--v2-bg-tertiary);
  border: 1px solid var(--v2-border);
  border-radius: var(--v2-radius-full);
  cursor: pointer;
  transition: all var(--v2-transition-fast);
}

.v2-mode-btn:hover {
  color: var(--v2-primary);
  background: var(--v2-bg-hover);
  border-color: var(--v2-primary);
}

.v2-mode-btn--active {
  color: white;
  background: var(--v2-primary);
  border-color: var(--v2-primary);
}

.v2-mode-btn--active:hover {
  color: white;
  background: var(--v2-primary-dark);
  border-color: var(--v2-primary-dark);
}

/* Icon-only mode button */
.v2-mode-btn--icon {
  padding: var(--v2-space-sm);
  min-width: 40px;
  height: 40px;
}

.v2-mode-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Notification dot (e.g., for active/alert modes) */
.v2-mode-btn__dot {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 10px;
  height: 10px;
  background: var(--v2-status-red);
  border: 2px solid var(--v2-bg-primary);
  border-radius: 50%;
}

.v2-mode-btn__dot--green {
  background: var(--v2-status-green);
}

.v2-mode-btn__dot--yellow {
  background: var(--v2-status-yellow);
}

/* "All modes" button with label */
.v2-mode-btn--all {
  padding: var(--v2-space-sm) var(--v2-space-md);
}

.v2-mode-btn--all svg {
  width: 16px;
  height: 16px;
}

/* ==========================================================================
   15. FAQ SECTION STYLING
   ========================================================================== */

.v2-faq-section {
  margin-top: var(--v2-space-xl);
}

.v2-faq-section h2,
.v2-faq-section h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--v2-text-primary);
  margin-bottom: var(--v2-space-md);
}

.v2-faq-content {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--v2-text-secondary);
}

.v2-faq-content p {
  margin-bottom: var(--v2-space-md);
}

.v2-faq-content strong {
  color: var(--v2-text-primary);
  font-weight: 600;
}

.v2-faq-content ul,
.v2-faq-content ol {
  margin: var(--v2-space-md) 0;
  padding-left: var(--v2-space-lg);
}

.v2-faq-content li {
  margin-bottom: var(--v2-space-xs);
}

/* ==========================================================================
   16. EES BADGE
   ========================================================================== */

.v2-ees-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--v2-space-xs);
  padding: var(--v2-space-xs) var(--v2-space-sm);
  background: linear-gradient(135deg, #003399 0%, #0055aa 100%);
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--v2-radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.v2-ees-badge svg,
.v2-ees-badge img {
  width: 16px;
  height: 16px;
}

/* ==========================================================================
   17. OTHER SIDE CARD
   ========================================================================== */

.v2-other-side {
  background: var(--v2-bg-secondary);
  border: 1px solid var(--v2-border);
  border-radius: var(--v2-radius-md);
  padding: var(--v2-space-md);
  margin-top: var(--v2-space-md);
}

.v2-other-side__header {
  display: flex;
  align-items: center;
  gap: var(--v2-space-sm);
  margin-bottom: var(--v2-space-sm);
  font-weight: 600;
  color: var(--v2-text-primary);
}

.v2-other-side__link {
  display: flex;
  align-items: center;
  gap: var(--v2-space-sm);
  color: var(--v2-primary);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--v2-transition-fast);
}

.v2-other-side__link:hover {
  color: var(--v2-primary-dark);
  text-decoration: underline;
}

/* ==========================================================================
   18. BOOTSTRAP UTILITY REPLACEMENTS
   ========================================================================== */

/* Display */
.d-none { display: none !important; }
.d-inline { display: inline !important; }
.d-inline-block { display: inline-block !important; }
.d-block { display: block !important; }
.d-flex { display: flex !important; }
.d-inline-flex { display: inline-flex !important; }
.d-grid { display: grid !important; }

/* Flexbox */
.flex-row { flex-direction: row !important; }
.flex-column { flex-direction: column !important; }
.flex-wrap { flex-wrap: wrap !important; }
.flex-nowrap { flex-wrap: nowrap !important; }
.justify-content-start { justify-content: flex-start !important; }
.justify-content-end { justify-content: flex-end !important; }
.justify-content-center { justify-content: center !important; }
.justify-content-between { justify-content: space-between !important; }
.justify-content-around { justify-content: space-around !important; }
.align-items-start { align-items: flex-start !important; }
.align-items-end { align-items: flex-end !important; }
.align-items-center { align-items: center !important; }
.align-items-baseline { align-items: baseline !important; }
.align-items-stretch { align-items: stretch !important; }
.gap-1 { gap: 0.25rem !important; }
.gap-2 { gap: 0.5rem !important; }
.gap-3 { gap: 1rem !important; }

/* Position */
.position-static { position: static !important; }
.position-relative { position: relative !important; }
.position-absolute { position: absolute !important; }
.position-fixed { position: fixed !important; }
.position-sticky { position: sticky !important; }
.top-0 { top: 0 !important; }
.bottom-0 { bottom: 0 !important; }
.start-0 { left: 0 !important; }
.end-0 { right: 0 !important; }

/* Margin */
.m-0 { margin: 0 !important; }
.m-1 { margin: 0.25rem !important; }
.m-2 { margin: 0.5rem !important; }
.m-3 { margin: 1rem !important; }
.m-4 { margin: 1.5rem !important; }
.m-5 { margin: 3rem !important; }
.m-auto { margin: auto !important; }

.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 0.25rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.mt-4 { margin-top: 1.5rem !important; }
.mt-5 { margin-top: 3rem !important; }

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.mb-5 { margin-bottom: 3rem !important; }

.ms-0 { margin-left: 0 !important; }
.ms-1 { margin-left: 0.25rem !important; }
.ms-2 { margin-left: 0.5rem !important; }
.ms-3 { margin-left: 1rem !important; }
.ms-auto { margin-left: auto !important; }

.me-0 { margin-right: 0 !important; }
.me-1 { margin-right: 0.25rem !important; }
.me-2 { margin-right: 0.5rem !important; }
.me-3 { margin-right: 1rem !important; }
.me-auto { margin-right: auto !important; }

.mx-0 { margin-left: 0 !important; margin-right: 0 !important; }
.mx-1 { margin-left: 0.25rem !important; margin-right: 0.25rem !important; }
.mx-2 { margin-left: 0.5rem !important; margin-right: 0.5rem !important; }
.mx-3 { margin-left: 1rem !important; margin-right: 1rem !important; }
.mx-auto { margin-left: auto !important; margin-right: auto !important; }

.my-0 { margin-top: 0 !important; margin-bottom: 0 !important; }
.my-1 { margin-top: 0.25rem !important; margin-bottom: 0.25rem !important; }
.my-2 { margin-top: 0.5rem !important; margin-bottom: 0.5rem !important; }
.my-3 { margin-top: 1rem !important; margin-bottom: 1rem !important; }

/* Padding */
.p-0 { padding: 0 !important; }
.p-1 { padding: 0.25rem !important; }
.p-2 { padding: 0.5rem !important; }
.p-3 { padding: 1rem !important; }
.p-4 { padding: 1.5rem !important; }
.p-5 { padding: 3rem !important; }

.pt-0 { padding-top: 0 !important; }
.pt-1 { padding-top: 0.25rem !important; }
.pt-2 { padding-top: 0.5rem !important; }
.pt-3 { padding-top: 1rem !important; }
.pt-4 { padding-top: 1.5rem !important; }

.pb-0 { padding-bottom: 0 !important; }
.pb-1 { padding-bottom: 0.25rem !important; }
.pb-2 { padding-bottom: 0.5rem !important; }
.pb-3 { padding-bottom: 1rem !important; }
.pb-4 { padding-bottom: 1.5rem !important; }

.ps-0 { padding-left: 0 !important; }
.ps-1 { padding-left: 0.25rem !important; }
.ps-2 { padding-left: 0.5rem !important; }
.ps-3 { padding-left: 1rem !important; }

.pe-0 { padding-right: 0 !important; }
.pe-1 { padding-right: 0.25rem !important; }
.pe-2 { padding-right: 0.5rem !important; }
.pe-3 { padding-right: 1rem !important; }

.px-0 { padding-left: 0 !important; padding-right: 0 !important; }
.px-1 { padding-left: 0.25rem !important; padding-right: 0.25rem !important; }
.px-2 { padding-left: 0.5rem !important; padding-right: 0.5rem !important; }
.px-3 { padding-left: 1rem !important; padding-right: 1rem !important; }
.px-4 { padding-left: 1.5rem !important; padding-right: 1.5rem !important; }

.py-0 { padding-top: 0 !important; padding-bottom: 0 !important; }
.py-1 { padding-top: 0.25rem !important; padding-bottom: 0.25rem !important; }
.py-2 { padding-top: 0.5rem !important; padding-bottom: 0.5rem !important; }
.py-3 { padding-top: 1rem !important; padding-bottom: 1rem !important; }

/* Text */
.text-start { text-align: left !important; }
.text-end { text-align: right !important; }
.text-center { text-align: center !important; }
.text-wrap { white-space: normal !important; }
.text-nowrap { white-space: nowrap !important; }
.text-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fw-light { font-weight: 300 !important; }
.fw-normal { font-weight: 400 !important; }
.fw-medium { font-weight: 500 !important; }
.fw-semibold { font-weight: 600 !important; }
.fw-bold { font-weight: 700 !important; }
.fst-italic { font-style: italic !important; }
.fst-normal { font-style: normal !important; }
.text-decoration-none { text-decoration: none !important; }
.text-decoration-underline { text-decoration: underline !important; }

/* Text Colors */
.text-primary { color: var(--v2-primary) !important; }
.text-secondary { color: var(--v2-text-secondary) !important; }
.text-success { color: var(--v2-success) !important; }
.text-danger { color: var(--v2-danger) !important; }
.text-warning { color: var(--v2-warning) !important; }
.text-info { color: #0dcaf0 !important; }
.text-muted { color: var(--v2-text-muted) !important; }
.text-white { color: white !important; }
.text-dark { color: var(--v2-text-primary) !important; }

/* Background Colors */
.bg-primary { background-color: var(--v2-primary) !important; }
.bg-secondary { background-color: var(--v2-bg-secondary) !important; }
.bg-success { background-color: var(--v2-success) !important; }
.bg-danger { background-color: var(--v2-danger) !important; }
.bg-warning { background-color: var(--v2-warning) !important; }
.bg-info { background-color: #0dcaf0 !important; }
.bg-light { background-color: var(--v2-bg-secondary) !important; }
.bg-dark { background-color: var(--v2-text-primary) !important; }
.bg-white { background-color: white !important; }
.bg-transparent { background-color: transparent !important; }

/* Width/Height */
.w-25 { width: 25% !important; }
.w-50 { width: 50% !important; }
.w-75 { width: 75% !important; }
.w-100 { width: 100% !important; }
.w-auto { width: auto !important; }
.h-25 { height: 25% !important; }
.h-50 { height: 50% !important; }
.h-75 { height: 75% !important; }
.h-100 { height: 100% !important; }
.h-auto { height: auto !important; }
.mw-100 { max-width: 100% !important; }
.mh-100 { max-height: 100% !important; }

/* Border */
.border { border: 1px solid var(--v2-border) !important; }
.border-0 { border: 0 !important; }
.border-top { border-top: 1px solid var(--v2-border) !important; }
.border-bottom { border-bottom: 1px solid var(--v2-border) !important; }
.border-start { border-left: 1px solid var(--v2-border) !important; }
.border-end { border-right: 1px solid var(--v2-border) !important; }
.rounded { border-radius: var(--v2-radius-sm) !important; }
.rounded-0 { border-radius: 0 !important; }
.rounded-1 { border-radius: 0.25rem !important; }
.rounded-2 { border-radius: var(--v2-radius-sm) !important; }
.rounded-3 { border-radius: var(--v2-radius-md) !important; }
.rounded-circle { border-radius: 50% !important; }
.rounded-pill { border-radius: var(--v2-radius-full) !important; }

/* Shadow */
.shadow-none { box-shadow: none !important; }
.shadow-sm { box-shadow: 0 1px 2px rgba(0,0,0,0.05) !important; }
.shadow { box-shadow: var(--v2-shadow-sm) !important; }
.shadow-lg { box-shadow: var(--v2-shadow-md) !important; }

/* Visibility */
.visible { visibility: visible !important; }
.invisible { visibility: hidden !important; }
.overflow-auto { overflow: auto !important; }
.overflow-hidden { overflow: hidden !important; }
.overflow-visible { overflow: visible !important; }
.overflow-scroll { overflow: scroll !important; }

/* ==========================================================================
   19. RESPONSIVE UTILITIES
   ========================================================================== */

@media (min-width: 576px) {
  .d-sm-none { display: none !important; }
  .d-sm-inline { display: inline !important; }
  .d-sm-inline-block { display: inline-block !important; }
  .d-sm-block { display: block !important; }
  .d-sm-flex { display: flex !important; }
}

@media (min-width: 768px) {
  .d-md-none { display: none !important; }
  .d-md-inline { display: inline !important; }
  .d-md-inline-block { display: inline-block !important; }
  .d-md-block { display: block !important; }
  .d-md-flex { display: flex !important; }
}

@media (min-width: 992px) {
  .d-lg-none { display: none !important; }
  .d-lg-inline { display: inline !important; }
  .d-lg-inline-block { display: inline-block !important; }
  .d-lg-block { display: block !important; }
  .d-lg-flex { display: flex !important; }
}

/* ==========================================================================
   20. ADDITIONAL PAGE-SPECIFIC FIXES
   ========================================================================== */

/* Container enhancements */
.v2-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--v2-space-md);
}

/* Card link styling */
.v2-card a:not(.btn):not(.v2-btn):not(.v2-pill) {
  color: var(--v2-primary);
  text-decoration: none;
}

.v2-card a:not(.btn):not(.v2-btn):not(.v2-pill):hover {
  text-decoration: underline;
}

/* Info text styling */
.v2-info-text {
  font-size: 0.875rem;
  color: var(--v2-text-secondary);
  line-height: 1.6;
}

/* Small/muted text */
small,
.small {
  font-size: 0.875em;
}

/* Lead paragraph */
.lead {
  font-size: 1.125rem;
  font-weight: 400;
  line-height: 1.6;
}

/* List unstyled */
.list-unstyled {
  padding-left: 0;
  list-style: none;
}

.list-inline {
  padding-left: 0;
  list-style: none;
}

.list-inline-item {
  display: inline-block;
}

.list-inline-item:not(:last-child) {
  margin-right: 0.5rem;
}

/* Clearfix */
.clearfix::after {
  display: block;
  clear: both;
  content: "";
}

/* Screen reader only */
.visually-hidden,
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* ==========================================================================
   UX IMPROVEMENTS - Accessibility & Mobile Enhancements
   ========================================================================== */

/* Skip to content link - for keyboard navigation */
.v2-skip-link {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  padding: var(--v2-space-md) var(--v2-space-lg);
  background: var(--v2-primary);
  color: white;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--v2-radius-md);
  transition: top var(--v2-transition-fast);
}

.v2-skip-link:focus {
  top: var(--v2-space-md);
}

/* Focus-visible outline for keyboard accessibility */
.v2-tab:focus-visible,
.v2-pill:focus-visible,
.v2-btn:focus-visible,
.btn:focus-visible,
.v2-next-section__btn:focus-visible,
.v2-bottom-nav__item:focus-visible,
.v2-header__back:focus-visible,
.v2-header__notify:focus-visible,
.v2-header__theme:focus-visible,
.v2-header__menu:focus-visible,
.v2-header__lang-btn:focus-visible,
.v2-alternative:focus-visible,
.v2-card--clickable:focus-visible {
  outline: 3px solid var(--v2-primary);
  outline-offset: 2px;
}

/* Dark mode focus ring adjustment */
[data-theme="dark"] .v2-tab:focus-visible,
[data-theme="dark"] .v2-pill:focus-visible,
[data-theme="dark"] .v2-btn:focus-visible,
[data-theme="dark"] .btn:focus-visible {
  outline-color: var(--v2-primary-light);
}

/* Hero queue count - improved contrast for both modes */
.v2-hero__queue-count {
  background: rgba(255, 255, 255, 0.25);
  padding: 4px 10px;
  border-radius: var(--v2-radius-sm);
  font-weight: 600;
  color: #fff;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* Active/pressed state for touch devices */
.v2-tab:active,
.v2-pill:active,
.v2-btn:active,
.btn:active {
  transform: scale(0.98);
}

.v2-bottom-nav__item:active {
  background: rgba(0, 87, 183, 0.1);
  transform: scale(0.95);
}

.v2-next-section__btn:active {
  transform: scale(0.98);
  box-shadow: none;
}

/* Improved footer legal text readability */
.v2-footer__legal p {
  font-size: 0.75rem; /* Increased from 0.7rem for better readability */
  line-height: 1.7;
}

/* Touch-friendly improvements for small buttons */
.btn-sm {
  min-height: 36px;
  min-width: 36px;
}

/* Ensure all interactive elements have visible focus */
a:focus-visible,
button:focus-visible,
[role="button"]:focus-visible,
[tabindex="0"]:focus-visible {
  outline: 2px solid var(--v2-primary);
  outline-offset: 2px;
}

/* Remove default focus outline, rely on focus-visible */
a:focus:not(:focus-visible),
button:focus:not(:focus-visible) {
  outline: none;
}

/* Improved tap targets for mobile links in cards */
.v2-card__content a {
  display: inline-block;
  padding: 2px 4px;
  margin: -2px -4px;
  border-radius: var(--v2-radius-sm);
}

.v2-card__content a:hover {
  background: rgba(0, 87, 183, 0.08);
}

/* Scroll behavior for smooth navigation */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

/* High contrast mode improvements */
@media (prefers-contrast: high) {
  .v2-hero {
    border: 2px solid var(--v2-primary);
  }

  .v2-tab--active {
    border: 2px solid white;
  }

  .v2-card {
    border-width: 2px;
  }
}

/* Hover media query - only apply hover effects on devices that support it */
@media (hover: none) {
  .v2-tab:hover,
  .v2-pill:hover,
  .v2-card:hover,
  .v2-alternative:hover {
    transform: none;
    box-shadow: var(--v2-shadow-card);
  }
}

/* Selection color for branding consistency */
::selection {
  background: rgba(0, 87, 183, 0.3);
  color: inherit;
}

/* Improved text rendering */
.v2-hero,
.v2-card,
.v2-footer {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Loading state for async content */
.v2-loading {
  position: relative;
  min-height: 100px;
}

.v2-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 24px;
  height: 24px;
  margin: -12px 0 0 -12px;
  border: 3px solid var(--v2-border);
  border-top-color: var(--v2-primary);
  border-radius: 50%;
  animation: v2-icon-spin 0.8s linear infinite;
}

/* Empty state styling */
.v2-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--v2-space-2xl) var(--v2-space-lg);
  text-align: center;
  color: var(--v2-text-muted);
}

.v2-empty-state__icon {
  font-size: 48px;
  margin-bottom: var(--v2-space-md);
  opacity: 0.5;
}

.v2-empty-state__text {
  font-size: var(--v2-text-base);
  line-height: var(--v2-leading-relaxed);
}

/* ==========================================================================
   SECTION 15: V2 FUEL PRICES TABLE
   ========================================================================== */

/* Fuel metadata bar */
.v2-fuel-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--v2-space-sm);
  padding: var(--v2-space-sm) var(--v2-space-md);
  margin-bottom: var(--v2-space-md);
  background: var(--v2-card-bg);
  border-radius: var(--v2-radius-md);
  border: 1px solid var(--v2-border);
  font-size: var(--v2-text-sm);
}

.v2-fuel-date,
.v2-fuel-region,
.v2-fuel-currency {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: rgba(0, 87, 183, 0.08);
  border-radius: var(--v2-radius-full);
  color: var(--v2-text-secondary);
  font-weight: 500;
  white-space: nowrap;
}

.v2-fuel-currency {
  margin-left: auto;
  background: rgba(16, 185, 129, 0.12);
  color: var(--v2-success);
  font-weight: 600;
}

/* Scrollable container for table */
.v2-fuel-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 calc(var(--v2-space-md) * -1);
  padding: 0 var(--v2-space-md);
}

/* Fuel prices table */
.v2-fuel-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--v2-text-sm);
  background: var(--v2-card-bg);
  border-radius: var(--v2-radius-md);
  overflow: hidden;
}

.v2-fuel-table thead {
  background: linear-gradient(135deg, var(--v2-primary), var(--v2-primary-dark));
  color: white;
}

.v2-fuel-table th {
  padding: var(--v2-space-sm) var(--v2-space-md);
  text-align: center;
  font-weight: 600;
  font-size: var(--v2-text-xs);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.v2-fuel-table th.v2-fuel-station {
  text-align: left;
  min-width: 140px;
}

.v2-fuel-table tbody tr {
  border-bottom: 1px solid var(--v2-border);
  transition: background var(--v2-transition-fast);
}

.v2-fuel-table tbody tr:last-child {
  border-bottom: none;
}

.v2-fuel-table tbody tr:hover {
  background: rgba(0, 87, 183, 0.04);
}

.v2-fuel-table td {
  padding: var(--v2-space-sm) var(--v2-space-md);
  text-align: center;
  vertical-align: middle;
}

.v2-fuel-table td:first-child {
  text-align: left;
  font-weight: 500;
  color: var(--v2-text-primary);
}

/* Price cells - monospace for alignment */
.v2-fuel-table td:not(:first-child) {
  font-family: var(--v2-font-mono);
  font-weight: 600;
  font-size: var(--v2-text-base);
  color: var(--v2-text-primary);
}

/* Unavailable price */
.v2-fuel-table td:not(:first-child):contains("-") {
  color: var(--v2-text-muted);
  font-weight: 400;
}

/* Info note at bottom */
.v2-fuel-note {
  display: flex;
  align-items: center;
  gap: var(--v2-space-sm);
  margin-top: var(--v2-space-md);
  padding: var(--v2-space-sm) var(--v2-space-md);
  background: rgba(251, 191, 36, 0.1);
  border-radius: var(--v2-radius-md);
  border-left: 3px solid var(--v2-warning);
  font-size: var(--v2-text-sm);
  color: var(--v2-text-secondary);
}

.v2-fuel-note svg {
  flex-shrink: 0;
  color: var(--v2-warning);
}

/* Mobile adjustments */
@media (max-width: 640px) {
  .v2-fuel-meta {
    padding: var(--v2-space-xs) var(--v2-space-sm);
  }

  .v2-fuel-date,
  .v2-fuel-region,
  .v2-fuel-currency {
    padding: 3px 8px;
    font-size: var(--v2-text-xs);
  }

  .v2-fuel-currency {
    margin-left: 0;
    width: 100%;
    justify-content: center;
    margin-top: var(--v2-space-xs);
  }

  .v2-fuel-table th,
  .v2-fuel-table td {
    padding: var(--v2-space-xs) var(--v2-space-sm);
  }

  .v2-fuel-table th.v2-fuel-station {
    min-width: 100px;
  }

  .v2-fuel-table td:not(:first-child) {
    font-size: var(--v2-text-sm);
  }
}

/* ==========================================================================
   SECTION 16: V2 WEATHER WIDGET
   ========================================================================== */

.v2-weather {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: var(--v2-radius-lg);
  padding: var(--v2-space-lg);
  color: white;
}

/* Weather mood variations */
.v2-weather--clear {
  background: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
}

.v2-weather--cloudy {
  background: linear-gradient(135deg, #8e9eab 0%, #667eea 100%);
}

.v2-weather--rain {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.v2-weather--snow {
  background: linear-gradient(135deg, #e6e9f0 0%, #eef1f5 100%);
  color: var(--v2-text-primary);
}

.v2-weather--cold {
  background: linear-gradient(135deg, #a1c4fd 0%, #c2e9fb 100%);
  color: var(--v2-text-primary);
}

.v2-weather--hot {
  background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.v2-weather--error {
  background: var(--v2-bg-tertiary);
  color: var(--v2-text-primary);
}

/* Main weather display */
.v2-weather__main {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: var(--v2-space-lg);
}

.v2-weather__icon {
  margin-bottom: var(--v2-space-sm);
}

.v2-weather__icon img {
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.v2-weather__temp {
  display: flex;
  align-items: flex-start;
  line-height: 1;
}

.v2-weather__temp-value {
  font-size: 4rem;
  font-weight: 700;
  font-family: var(--v2-font-mono);
}

.v2-weather__temp-unit {
  font-size: 1.5rem;
  font-weight: 600;
  margin-top: 0.5rem;
}

.v2-weather__condition {
  font-size: 1.25rem;
  font-weight: 500;
  margin-top: var(--v2-space-xs);
  opacity: 0.95;
}

.v2-weather__updated {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: var(--v2-space-sm);
  font-size: var(--v2-text-sm);
  opacity: 0.8;
}

.v2-weather__updated svg {
  width: 14px;
  height: 14px;
}

/* Weather stats grid */
.v2-weather__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--v2-space-sm);
  margin-bottom: var(--v2-space-md);
}

.v2-weather__stat {
  display: flex;
  align-items: center;
  gap: var(--v2-space-sm);
  padding: var(--v2-space-sm) var(--v2-space-md);
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: var(--v2-radius-md);
}

.v2-weather--snow .v2-weather__stat,
.v2-weather--cold .v2-weather__stat {
  background: rgba(0, 0, 0, 0.05);
}

.v2-weather__stat-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.2);
  border-radius: var(--v2-radius-full);
  flex-shrink: 0;
}

.v2-weather--snow .v2-weather__stat-icon,
.v2-weather--cold .v2-weather__stat-icon {
  background: rgba(0, 0, 0, 0.08);
}

.v2-weather__stat-icon svg {
  width: 18px;
  height: 18px;
}

.v2-weather__stat-icon--temp { color: #ff6b6b; }
.v2-weather__stat-icon--humidity { color: #4fc3f7; }
.v2-weather__stat-icon--wind { color: #81c784; }
.v2-weather__stat-icon--pressure { color: #ffb74d; }

.v2-weather--snow .v2-weather__stat-icon,
.v2-weather--cold .v2-weather__stat-icon {
  color: var(--v2-text-secondary);
}

.v2-weather__stat-info {
  flex: 1;
  min-width: 0;
}

.v2-weather__stat-label {
  font-size: var(--v2-text-xs);
  opacity: 0.8;
  margin-bottom: 2px;
}

.v2-weather__stat-value {
  font-size: var(--v2-text-base);
  font-weight: 600;
}

.v2-weather__stat-extra {
  font-size: var(--v2-text-xs);
  opacity: 0.7;
  margin-left: 4px;
}

/* Extra info row */
.v2-weather__extras {
  display: flex;
  flex-wrap: wrap;
  gap: var(--v2-space-sm);
  padding-top: var(--v2-space-md);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.v2-weather--snow .v2-weather__extras,
.v2-weather--cold .v2-weather__extras {
  border-top-color: rgba(0, 0, 0, 0.1);
}

.v2-weather__extra {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--v2-radius-full);
  font-size: var(--v2-text-sm);
}

.v2-weather--snow .v2-weather__extra,
.v2-weather--cold .v2-weather__extra {
  background: rgba(0, 0, 0, 0.05);
}

.v2-weather__extra svg {
  width: 14px;
  height: 14px;
  opacity: 0.8;
}

/* Error state */
.v2-weather__error {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--v2-space-sm);
  padding: var(--v2-space-xl);
  color: var(--v2-warning);
}

.v2-weather__error svg {
  width: 24px;
  height: 24px;
}

/* Mobile adjustments */
@media (max-width: 640px) {
  .v2-weather {
    padding: var(--v2-space-md);
  }

  .v2-weather__temp-value {
    font-size: 3rem;
  }

  .v2-weather__temp-unit {
    font-size: 1.25rem;
  }

  .v2-weather__condition {
    font-size: 1.1rem;
  }

  .v2-weather__grid {
    gap: var(--v2-space-xs);
  }

  .v2-weather__stat {
    padding: var(--v2-space-xs) var(--v2-space-sm);
  }

  .v2-weather__stat-icon {
    width: 30px;
    height: 30px;
  }

  .v2-weather__stat-icon svg {
    width: 14px;
    height: 14px;
  }

  .v2-weather__stat-value {
    font-size: var(--v2-text-sm);
  }
}

/*******************************************************************************
 * SECTION 17: V2 REVIEWS / OPINIONS
 * User reviews section with modern styling
 ******************************************************************************/

/* Aggregate Rating Display */
.v2-reviews__aggregate {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--v2-space-md);
  margin-bottom: var(--v2-space-lg);
  padding-bottom: var(--v2-space-lg);
  border-bottom: 1px solid var(--v2-border);
}

.v2-reviews__title {
  font-size: var(--v2-text-lg);
  font-weight: 600;
  color: var(--v2-text-primary);
  margin: 0;
}

.v2-reviews__rating-box {
  display: flex;
  align-items: center;
  gap: var(--v2-space-sm);
}

.v2-reviews__score {
  font-size: 2rem;
  font-weight: 700;
  font-family: var(--v2-font-mono);
  color: var(--v2-text-primary);
}

.v2-reviews__stars {
  display: flex;
  align-items: center;
  gap: 2px;
}

.v2-reviews__stars .star {
  font-size: 1.25rem;
  color: #fbbf24;
}

.v2-reviews__stars .star--empty {
  color: #d1d5db;
}

.v2-reviews__count {
  font-size: var(--v2-text-sm);
  color: var(--v2-text-secondary);
  margin-top: 2px;
}

/* Filter Tabs */
.v2-reviews__filters {
  display: flex;
  gap: var(--v2-space-xs);
  margin-bottom: var(--v2-space-lg);
  padding: 4px;
  background: var(--v2-bg-secondary);
  border-radius: var(--v2-radius-lg);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.v2-reviews__filter {
  flex: 1;
  padding: var(--v2-space-sm) var(--v2-space-md);
  font-size: var(--v2-text-sm);
  font-weight: 500;
  color: var(--v2-text-secondary);
  background: transparent;
  border: none;
  border-radius: var(--v2-radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  text-decoration: none;
  text-align: center;
}

.v2-reviews__filter:hover {
  color: var(--v2-text-primary);
  background: rgba(0, 0, 0, 0.03);
}

.v2-reviews__filter.active,
.v2-reviews__filter--active {
  color: var(--v2-primary);
  background: var(--v2-bg-primary);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Opinion Cards Container */
.v2-reviews__list {
  display: flex;
  flex-direction: column;
  gap: var(--v2-space-md);
}

/* Individual Opinion Card */
.v2-reviews__card,
.opinion-card {
  background: var(--v2-bg-primary);
  border: 1px solid var(--v2-border);
  border-radius: var(--v2-radius-lg);
  padding: var(--v2-space-lg);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.v2-reviews__card:hover,
.opinion-card:hover {
  border-color: var(--v2-primary-light);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Opinion Header */
.v2-reviews__card-header,
.opinion-header {
  display: flex;
  align-items: flex-start;
  gap: var(--v2-space-sm);
  margin-bottom: var(--v2-space-md);
}

/* Avatar */
.v2-reviews__avatar,
.avatar {
  width: 44px;
  height: 44px;
  min-width: 44px;
  background: linear-gradient(135deg, var(--v2-primary), #8b5cf6);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--v2-radius-full);
  font-weight: 600;
  font-size: 1.1rem;
  text-transform: uppercase;
}

/* Author Info */
.v2-reviews__author,
.opinion-meta {
  flex: 1;
  min-width: 0;
  margin-left: 0;
}

.v2-reviews__author-name,
.opinion-meta .author-name {
  font-weight: 600;
  color: var(--v2-text-primary);
  font-size: var(--v2-text-base);
  margin-bottom: 2px;
}

.v2-reviews__timestamp,
.opinion-meta .timestamp {
  font-size: var(--v2-text-sm);
  color: var(--v2-text-tertiary);
}

/* Star Rating in Card */
.v2-reviews__rating,
.star-rating-individual {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
  flex-shrink: 0;
}

.v2-reviews__rating .star,
.star-rating-individual .star {
  font-size: 1rem;
  color: #fbbf24;
  line-height: 1;
}

/* Opinion Body */
.v2-reviews__body,
.opinion-body {
  color: var(--v2-text-primary);
  line-height: 1.6;
  font-size: var(--v2-text-base);
  padding-left: 0;
  margin-bottom: var(--v2-space-md);
}

.v2-reviews__body p,
.opinion-body p {
  margin: 0;
}

/* Opinion Footer - Vote & Share */
.v2-reviews__footer,
.opinion-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--v2-space-md);
  padding-left: 0;
  padding-top: var(--v2-space-md);
  border-top: 1px solid var(--v2-border-light);
}

.v2-reviews__action,
.opinion-footer .thumb-up,
.opinion-footer .thumb-down,
.opinion-footer .share-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  font-size: var(--v2-text-sm);
  color: var(--v2-text-tertiary);
  background: transparent;
  border: none;
  border-radius: var(--v2-radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
}

.v2-reviews__action:hover,
.opinion-footer .thumb-up:hover,
.opinion-footer .thumb-down:hover,
.opinion-footer .share-btn:hover {
  color: var(--v2-primary);
  background: var(--v2-bg-secondary);
}

.opinion-footer .thumb-up .v2-icon,
.opinion-footer .thumb-down .v2-icon,
.opinion-footer .share-btn .v2-icon {
  width: 16px;
  height: 16px;
}

.v2-reviews__action--voted,
.opinion-footer .voted {
  color: var(--v2-primary) !important;
  pointer-events: none;
}

.v2-reviews__vote-count,
.opinion-footer .vote-count {
  font-size: var(--v2-text-sm);
  font-weight: 500;
  color: var(--v2-text-secondary);
  margin-left: 2px;
}

/* Show More Button */
.v2-reviews__show-more,
#show-more-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--v2-space-xs);
  width: 100%;
  padding: var(--v2-space-md);
  font-size: var(--v2-text-base);
  font-weight: 500;
  color: var(--v2-primary);
  background: var(--v2-bg-secondary);
  border: 1px solid var(--v2-border);
  border-radius: var(--v2-radius-lg);
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: var(--v2-space-md);
}

.v2-reviews__show-more:hover,
#show-more-btn:hover {
  background: var(--v2-primary);
  color: white;
  border-color: var(--v2-primary);
}

/* Add Review Button */
.v2-reviews__add-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--v2-space-xs);
  padding: var(--v2-space-sm) var(--v2-space-xl);
  font-size: var(--v2-text-base);
  font-weight: 600;
  color: white;
  background: linear-gradient(135deg, var(--v2-primary), #8b5cf6);
  border: none;
  border-radius: var(--v2-radius-lg);
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.v2-reviews__add-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.v2-reviews__add-btn svg {
  width: 18px;
  height: 18px;
}

/* Empty State */
.v2-reviews__empty {
  text-align: center;
  padding: var(--v2-space-2xl);
  color: var(--v2-text-tertiary);
}

.v2-reviews__empty-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto var(--v2-space-md);
  color: var(--v2-text-tertiary);
  opacity: 0.5;
}

.v2-reviews__empty-text {
  font-size: var(--v2-text-base);
  margin-bottom: var(--v2-space-md);
}

/* Disclaimer */
.v2-reviews__disclaimer {
  text-align: center;
  font-size: var(--v2-text-sm);
  color: var(--v2-text-tertiary);
  padding: var(--v2-space-md);
  margin-top: var(--v2-space-lg);
}

/* Override Bootstrap nav-tabs for filters */
#opinion-filters.nav-tabs {
  border-bottom: none;
  display: flex;
  gap: var(--v2-space-xs);
  padding: 4px;
  background: var(--v2-bg-secondary);
  border-radius: var(--v2-radius-lg);
  margin-bottom: var(--v2-space-lg);
}

#opinion-filters .nav-item {
  flex: 1;
}

#opinion-filters .nav-link {
  display: block;
  width: 100%;
  padding: var(--v2-space-sm) var(--v2-space-md);
  font-size: var(--v2-text-sm);
  font-weight: 500;
  color: var(--v2-text-secondary);
  background: transparent;
  border: none;
  border-radius: var(--v2-radius-md);
  text-align: center;
  transition: all 0.2s ease;
}

#opinion-filters .nav-link:hover {
  color: var(--v2-text-primary);
  background: rgba(0, 0, 0, 0.03);
}

#opinion-filters .nav-link.active {
  color: var(--v2-primary);
  background: var(--v2-bg-primary);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border-color: transparent;
}

/* Override aggregate rating Bootstrap styling */
.aggregate-rating {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.aggregate-rating .fs-4 {
  font-size: 1.75rem !important;
  font-weight: 700;
  font-family: var(--v2-font-mono);
  color: var(--v2-text-primary);
}

.aggregate-rating .text-warning {
  color: #fbbf24 !important;
}

.aggregate-rating .text-muted {
  color: var(--v2-text-tertiary) !important;
  font-size: var(--v2-text-sm);
}

/* Mobile Adjustments */
@media (max-width: 640px) {
  .v2-reviews__aggregate {
    flex-direction: column;
    align-items: flex-start;
  }

  .v2-reviews__rating-box {
    width: 100%;
    justify-content: flex-start;
  }

  .aggregate-rating {
    width: 100%;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .v2-reviews__card,
  .opinion-card {
    padding: var(--v2-space-md);
  }

  .v2-reviews__avatar,
  .avatar {
    width: 38px;
    height: 38px;
    min-width: 38px;
    font-size: 1rem;
  }

  .v2-reviews__footer,
  .opinion-footer {
    flex-wrap: wrap;
    justify-content: center;
  }

  .v2-reviews__filters,
  #opinion-filters.nav-tabs {
    gap: 4px;
    padding: 3px;
  }

  .v2-reviews__filter,
  #opinion-filters .nav-link {
    padding: var(--v2-space-xs) var(--v2-space-sm);
    font-size: var(--v2-text-xs);
  }
}

/*******************************************************************************
 * SECTION 18: V2 MODALS & FORMS
 * Modern modal dialogs and form styling
 ******************************************************************************/

/* V2 Modal Base */
.v2-modal {
  background: var(--v2-bg-primary);
  border-radius: var(--v2-radius-xl);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  width: 100%;
  max-width: 480px;
}

/* Modal Header */
.v2-modal__header {
  display: flex;
  align-items: center;
  gap: var(--v2-space-sm);
  padding: var(--v2-space-lg);
  border-bottom: 1px solid var(--v2-border);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(139, 92, 246, 0.05));
}

.v2-modal__header-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--v2-primary), #8b5cf6);
  border-radius: var(--v2-radius-lg);
  color: white;
  flex-shrink: 0;
}

.v2-modal__header-icon svg {
  width: 20px;
  height: 20px;
}

.v2-modal__header-icon--success {
  background: linear-gradient(135deg, #10b981, #059669);
}

.v2-modal__title {
  flex: 1;
  margin: 0;
  font-size: var(--v2-text-lg);
  font-weight: 600;
  color: var(--v2-text-primary);
}

.v2-modal__close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: var(--v2-radius-md);
  color: var(--v2-text-tertiary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.v2-modal__close:hover {
  background: var(--v2-bg-secondary);
  color: var(--v2-text-primary);
}

.v2-modal__close svg {
  width: 20px;
  height: 20px;
}

/* Modal Body */
.v2-modal__body {
  padding: var(--v2-space-lg);
}

.v2-modal__body--centered {
  text-align: center;
}

.v2-modal__message {
  font-size: var(--v2-text-base);
  color: var(--v2-text-primary);
  line-height: 1.6;
  margin: 0;
}

.v2-modal__subtitle {
  font-size: var(--v2-text-sm);
  color: var(--v2-text-secondary);
  margin: 0 0 var(--v2-space-md);
}

/* Modal Footer */
.v2-modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: var(--v2-space-sm);
  padding: var(--v2-space-md) var(--v2-space-lg);
  border-top: 1px solid var(--v2-border);
  background: var(--v2-bg-secondary);
}

.v2-modal__footer--centered {
  justify-content: center;
}

/* V2 Form Elements */
.v2-form-group {
  margin-bottom: var(--v2-space-lg);
}

.v2-form-group:last-child {
  margin-bottom: 0;
}

.v2-form-label {
  display: flex;
  align-items: center;
  gap: var(--v2-space-xs);
  font-size: var(--v2-text-sm);
  font-weight: 600;
  color: var(--v2-text-primary);
  margin-bottom: var(--v2-space-sm);
}

.v2-form-label svg {
  width: 16px;
  height: 16px;
  color: var(--v2-primary);
}

.v2-form-input,
.v2-form-textarea,
.v2-form-select {
  display: block;
  width: 100%;
  padding: var(--v2-space-sm) var(--v2-space-md);
  font-size: var(--v2-text-base);
  color: var(--v2-text-primary);
  background: var(--v2-bg-primary);
  border: 2px solid var(--v2-border);
  border-radius: var(--v2-radius-lg);
  transition: all 0.2s ease;
}

.v2-form-input:focus,
.v2-form-textarea:focus,
.v2-form-select:focus {
  outline: none;
  border-color: var(--v2-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.v2-form-input::placeholder,
.v2-form-textarea::placeholder {
  color: var(--v2-text-tertiary);
}

.v2-form-textarea {
  resize: vertical;
  min-height: 100px;
}

.v2-form-hint {
  font-size: var(--v2-text-xs);
  color: var(--v2-text-tertiary);
  margin-top: var(--v2-space-xs);
}

.v2-form-error {
  display: none;
  font-size: var(--v2-text-sm);
  color: #ef4444;
  margin-top: var(--v2-space-xs);
}

.v2-form-input.is-invalid ~ .v2-form-error,
.v2-form-textarea.is-invalid ~ .v2-form-error,
.v2-star-rating.is-invalid ~ .v2-form-error {
  display: block;
}

.v2-form-input.is-invalid,
.v2-form-textarea.is-invalid {
  border-color: #ef4444;
}

.v2-form-notice {
  display: flex;
  align-items: center;
  gap: var(--v2-space-sm);
  padding: var(--v2-space-sm) var(--v2-space-md);
  font-size: var(--v2-text-sm);
  color: var(--v2-primary);
  background: rgba(99, 102, 241, 0.1);
  border-radius: var(--v2-radius-md);
}

.v2-form-notice svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Star Rating Input */
.v2-star-rating {
  display: flex;
  gap: 4px;
}

.v2-star-btn {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  color: #d1d5db;
  background: transparent;
  border: 2px solid var(--v2-border);
  border-radius: var(--v2-radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
}

.v2-star-btn:hover {
  color: #fbbf24;
  border-color: #fbbf24;
  transform: scale(1.05);
}

.v2-star-btn.active {
  color: #fbbf24;
  border-color: #fbbf24;
  background: rgba(251, 191, 36, 0.1);
}

/* V2 Buttons */
.v2-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--v2-space-xs);
  padding: var(--v2-space-sm) var(--v2-space-lg);
  font-size: var(--v2-text-base);
  font-weight: 600;
  border-radius: var(--v2-radius-lg);
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.v2-btn svg {
  width: 18px;
  height: 18px;
}

.v2-btn--primary {
  color: white;
  background: linear-gradient(135deg, var(--v2-primary), #8b5cf6);
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.v2-btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.v2-btn--secondary {
  color: var(--v2-text-secondary);
  background: var(--v2-bg-secondary);
  border: 1px solid var(--v2-border);
}

.v2-btn--secondary:hover {
  background: var(--v2-border);
  color: var(--v2-text-primary);
}

/* Share URL Input */
.v2-share-url {
  display: flex;
  gap: var(--v2-space-xs);
  margin-bottom: var(--v2-space-lg);
}

.v2-share-url__input {
  flex: 1;
  padding: var(--v2-space-sm) var(--v2-space-md);
  font-size: var(--v2-text-sm);
  font-family: var(--v2-font-mono);
  color: var(--v2-text-primary);
  background: var(--v2-bg-secondary);
  border: 1px solid var(--v2-border);
  border-radius: var(--v2-radius-md);
  overflow: hidden;
  text-overflow: ellipsis;
}

.v2-share-url__copy {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--v2-primary);
  color: white;
  border: none;
  border-radius: var(--v2-radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
}

.v2-share-url__copy:hover {
  background: #4f46e5;
}

.v2-share-url__copy svg {
  width: 20px;
  height: 20px;
}

/* Share Buttons */
.v2-share-buttons {
  display: flex;
  justify-content: center;
  gap: var(--v2-space-md);
}

.v2-share-btn {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--v2-radius-full);
  color: white;
  transition: all 0.2s ease;
}

.v2-share-btn:hover {
  transform: scale(1.1);
}

.v2-share-btn svg {
  width: 24px;
  height: 24px;
}

.v2-share-btn--facebook {
  background: #1877f2;
}

.v2-share-btn--twitter {
  background: #000000;
}

.v2-share-btn--telegram {
  background: #0088cc;
}

.v2-share-btn--whatsapp {
  background: #25d366;
}

/* Mobile Adjustments for Modals */
@media (max-width: 640px) {
  .v2-modal {
    margin: var(--v2-space-sm);
    max-width: calc(100% - var(--v2-space-lg));
  }

  .v2-modal__header {
    padding: var(--v2-space-md);
  }

  .v2-modal__body {
    padding: var(--v2-space-md);
  }

  .v2-modal__footer {
    padding: var(--v2-space-sm) var(--v2-space-md);
    flex-direction: column;
  }

  .v2-btn {
    width: 100%;
    justify-content: center;
  }

  .v2-star-btn {
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
  }

  .v2-share-btn {
    width: 44px;
    height: 44px;
  }

  .v2-share-btn svg {
    width: 20px;
    height: 20px;
  }
}

/*******************************************************************************
 * SECTION 19: BOOTSTRAP MODAL COMPATIBILITY
 * Ensures v2-modal works properly inside Bootstrap modal wrappers
 ******************************************************************************/

/* Bootstrap modal with v2 content - reset native dialog styles */
.modal .v2-modal {
  position: relative;
  inset: auto;
  margin: 0;
}

/* Modal backdrop (V2 native) */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1050;
}

/* Modal container */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1055;
  display: none;
  overflow-x: hidden;
  overflow-y: auto;
  outline: 0;
}

/* Modal shown state */
.modal.show {
  display: flex !important;
  align-items: center;
  justify-content: center;
  z-index: 1060;
}

/* Modal dialog */
.modal-dialog {
  position: relative;
  width: auto;
  max-width: 500px;
  margin: var(--v2-space-md);
  pointer-events: none;
}

.modal-dialog-centered {
  display: flex;
  align-items: center;
  min-height: calc(100% - var(--v2-space-lg));
}

.modal.show .modal-dialog {
  pointer-events: auto;
  transform: none !important;
}

/* Body scroll lock when modal open */
body.modal-open {
  overflow: hidden;
}

/* Ensure v2-header doesn't block modal */
.v2-header {
  z-index: 1000;
}

/* Modal dialog positioning */
.modal-dialog-centered .v2-modal {
  display: flex;
  flex-direction: column;
}

/* Ensure Bootstrap modals are properly hidden when not shown */
.modal:not(.show) {
  display: none !important;
}

/* Prevent modal content from appearing outside modal wrapper */
.modal .modal-dialog {
  pointer-events: auto;
}

.modal .v2-modal {
  pointer-events: auto;
}

/* Ensure modal content doesn't leak outside */
.modal-content,
.modal .v2-modal {
  overflow: hidden;
}

/*******************************************************************************
 * SECTION 20: ADDITIONAL SECTIONS (Green Card, Military Docs, Vehicle, Customs, Emergency)
 ******************************************************************************/

/* Base section container */
.v2-additional-section {
  background: var(--v2-bg-primary);
  border-radius: var(--v2-radius-md);
  margin-bottom: var(--v2-space-md);
  overflow: hidden;
  border: 1px solid var(--v2-border);
}

.v2-section__header {
  display: flex;
  align-items: center;
  gap: var(--v2-space-sm);
  padding: var(--v2-space-md);
  background: var(--v2-bg-secondary);
  border-bottom: 1px solid var(--v2-border);
}

.v2-section__icon {
  font-size: 1.5rem;
  line-height: 1;
}

.v2-section__title {
  font-size: var(--v2-text-lg);
  font-weight: var(--v2-font-bold);
  margin: 0;
  color: var(--v2-text-primary);
}

.v2-section__content {
  padding: var(--v2-space-md);
}

.v2-section__intro {
  margin-bottom: var(--v2-space-md);
  color: var(--v2-text-secondary);
}

.v2-section__conclusion {
  color: var(--v2-text-primary);
}

/* Section variants */
.v2-section--warning .v2-section__header {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
}

.v2-section--danger .v2-section__header {
  background: linear-gradient(135deg, #fee2e2, #fecaca);
}

.v2-section--info .v2-section__header {
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
}

.v2-section--success .v2-section__header {
  background: linear-gradient(135deg, #dcfce7, #bbf7d0);
}

.v2-section--emergency .v2-section__header {
  background: linear-gradient(135deg, #fef3c7, #fed7aa);
}

/* Dark mode section variants */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .v2-section--warning .v2-section__header {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(245, 158, 11, 0.2));
  }
  :root:not([data-theme="light"]) .v2-section--danger .v2-section__header {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(220, 38, 38, 0.2));
  }
  :root:not([data-theme="light"]) .v2-section--info .v2-section__header {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(37, 99, 235, 0.2));
  }
  :root:not([data-theme="light"]) .v2-section--success .v2-section__header {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(5, 150, 105, 0.2));
  }
  :root:not([data-theme="light"]) .v2-section--emergency .v2-section__header {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(234, 88, 12, 0.2));
  }
}

[data-theme="dark"] .v2-section--warning .v2-section__header,
[data-theme="dark"] .v2-section--danger .v2-section__header,
[data-theme="dark"] .v2-section--info .v2-section__header,
[data-theme="dark"] .v2-section--success .v2-section__header,
[data-theme="dark"] .v2-section--emergency .v2-section__header {
  background: var(--v2-bg-secondary);
}

/* Alerts */
.v2-alert {
  padding: var(--v2-space-md);
  border-radius: var(--v2-radius-sm);
  margin-bottom: var(--v2-space-sm);
}

.v2-alert--danger {
  background: var(--v2-status-red-bg);
  border-left: 4px solid var(--v2-status-red);
  color: #991b1b;
}

.v2-alert--warning {
  background: var(--v2-status-yellow-bg);
  border-left: 4px solid var(--v2-status-yellow);
  color: #92400e;
}

.v2-alert--info {
  background: #dbeafe;
  border-left: 4px solid #3b82f6;
  color: #1e40af;
}

/* Dark mode alerts */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .v2-alert--danger {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
  }
  :root:not([data-theme="light"]) .v2-alert--warning {
    background: rgba(245, 158, 11, 0.15);
    color: #fcd34d;
  }
  :root:not([data-theme="light"]) .v2-alert--info {
    background: rgba(59, 130, 246, 0.15);
    color: #93c5fd;
  }
}

[data-theme="dark"] .v2-alert--danger {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
}

[data-theme="dark"] .v2-alert--warning {
  background: rgba(245, 158, 11, 0.15);
  color: #fcd34d;
}

[data-theme="dark"] .v2-alert--info {
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
}

/* Checklists */
.v2-checklist {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--v2-space-md);
}

.v2-checklist li {
  padding: var(--v2-space-xs) 0;
  color: var(--v2-text-primary);
  border-bottom: 1px solid var(--v2-border);
}

.v2-checklist li:last-child {
  border-bottom: none;
}

.v2-checklist--required li {
  background: var(--v2-status-green-bg);
  padding: var(--v2-space-sm);
  margin-bottom: var(--v2-space-xs);
  border-radius: var(--v2-radius-sm);
  border-bottom: none;
}

.v2-solutions li {
  padding: var(--v2-space-sm) 0;
}

/* Tables */
.v2-table-wrapper {
  overflow-x: auto;
  margin: var(--v2-space-md) 0;
}

.v2-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--v2-text-sm);
}

.v2-table td {
  padding: var(--v2-space-sm);
  border-bottom: 1px solid var(--v2-border);
}

.v2-table tr:last-child td {
  border-bottom: none;
}

.v2-table td:first-child {
  font-weight: var(--v2-font-medium);
  color: var(--v2-text-primary);
}

.v2-table td:last-child {
  color: var(--v2-text-secondary);
  text-align: right;
}

/* Accordion */
.v2-accordion {
  border: 1px solid var(--v2-border);
  border-radius: var(--v2-radius-sm);
  overflow: hidden;
}

.v2-accordion__item {
  border-bottom: 1px solid var(--v2-border);
}

.v2-accordion__item:last-child {
  border-bottom: none;
}

.v2-accordion__header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--v2-space-md);
  background: var(--v2-bg-secondary);
  border: none;
  cursor: pointer;
  font-size: var(--v2-text-base);
  font-weight: var(--v2-font-medium);
  color: var(--v2-text-primary);
  text-align: left;
  transition: background-color var(--v2-transition-fast);
}

.v2-accordion__header:hover {
  background: var(--v2-bg-tertiary);
}

.v2-accordion__arrow {
  transition: transform var(--v2-transition-fast);
  font-size: var(--v2-text-xs);
  color: var(--v2-text-muted);
}

.v2-accordion__header--active .v2-accordion__arrow {
  transform: rotate(180deg);
}

.v2-accordion__content {
  max-height: 0;
  overflow: hidden;
  padding: 0 var(--v2-space-md);
  background: var(--v2-bg-primary);
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.v2-accordion__content--active {
  max-height: 500px;
  padding: var(--v2-space-md);
}

/* Subsection titles */
.v2-subsection-title {
  font-size: var(--v2-text-base);
  font-weight: var(--v2-font-bold);
  margin: var(--v2-space-md) 0 var(--v2-space-sm);
  color: var(--v2-text-primary);
}

.v2-subsection-title--success {
  color: var(--v2-status-green);
}

.v2-subsection-title--danger {
  color: var(--v2-status-red);
}

/* Prohibited grid */
.v2-prohibited-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--v2-space-md);
  margin-top: var(--v2-space-md);
}

.v2-prohibited-card {
  background: var(--v2-status-red-bg);
  border-radius: var(--v2-radius-sm);
  padding: var(--v2-space-md);
  border-left: 4px solid var(--v2-status-red);
}

.v2-prohibited-card h6 {
  font-size: var(--v2-text-sm);
  font-weight: var(--v2-font-bold);
  color: #991b1b;
  margin: 0 0 var(--v2-space-sm);
}

.v2-prohibited-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: var(--v2-text-sm);
}

.v2-prohibited-card li {
  padding: var(--v2-space-xs) 0;
  color: #7f1d1d;
}

/* Dark mode prohibited cards */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .v2-prohibited-card {
    background: rgba(239, 68, 68, 0.15);
  }
  :root:not([data-theme="light"]) .v2-prohibited-card h6 {
    color: #fca5a5;
  }
  :root:not([data-theme="light"]) .v2-prohibited-card li {
    color: #f87171;
  }
}

[data-theme="dark"] .v2-prohibited-card {
  background: rgba(239, 68, 68, 0.15);
}

[data-theme="dark"] .v2-prohibited-card h6 {
  color: #fca5a5;
}

[data-theme="dark"] .v2-prohibited-card li {
  color: #f87171;
}

/* Limits list */
.v2-limits-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.v2-limits-list li {
  padding: var(--v2-space-xs) 0;
  color: var(--v2-text-primary);
  position: relative;
  padding-left: var(--v2-space-lg);
}

.v2-limits-list li::before {
  content: "•";
  position: absolute;
  left: var(--v2-space-sm);
  color: var(--v2-status-green);
}

/* Notes and examples */
.v2-note {
  font-size: var(--v2-text-sm);
  color: var(--v2-status-yellow);
  margin-top: var(--v2-space-sm);
}

.v2-warning-text {
  font-size: var(--v2-text-sm);
  color: var(--v2-status-red);
  margin-top: var(--v2-space-sm);
}

.v2-example {
  font-size: var(--v2-text-sm);
  color: var(--v2-text-secondary);
  font-style: italic;
  margin-top: var(--v2-space-sm);
}

/* Contacts grid */
.v2-contacts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--v2-space-md);
}

.v2-contact-card {
  background: var(--v2-bg-secondary);
  border-radius: var(--v2-radius-sm);
  padding: var(--v2-space-md);
}

.v2-contact-card h5 {
  font-size: var(--v2-text-base);
  font-weight: var(--v2-font-bold);
  color: var(--v2-text-primary);
  margin: 0 0 var(--v2-space-sm);
}

.v2-contact-card--emergency {
  border-left: 4px solid var(--v2-status-red);
}

.v2-contact-card--diplomatic {
  border-left: 4px solid var(--v2-primary);
}

.v2-contact-card--roadside {
  border-left: 4px solid var(--v2-status-yellow);
}

.v2-contact-card--medical {
  border-left: 4px solid var(--v2-status-green);
}

.v2-contacts-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.v2-contacts-list li {
  padding: var(--v2-space-xs) 0;
}

.v2-contacts-list a {
  color: var(--v2-primary);
  text-decoration: none;
}

.v2-contacts-list a:hover {
  text-decoration: underline;
}

.v2-contact-item {
  font-size: var(--v2-text-sm);
  color: var(--v2-text-primary);
  margin: var(--v2-space-xs) 0;
}

.v2-intro {
  font-size: var(--v2-text-sm);
  color: var(--v2-text-secondary);
  margin-bottom: var(--v2-space-sm);
}

/* Utility classes */
.mt-3 {
  margin-top: var(--v2-space-md) !important;
}

.mt-4 {
  margin-top: var(--v2-space-lg) !important;
}

.mb-0 {
  margin-bottom: 0 !important;
}

/*******************************************************************************
 * SECTION 21: ADDITIONAL SECTIONS V2 HELPER CLASSES
 * Works with v2-card structure for Green Card, Military, Vehicle, Customs, Emergency sections
 ******************************************************************************/

/* Chart Now Label and Info Alert */
.now-label {
  display: inline-block;
  background-color: #e74c3c;
  color: #fff;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: bold;
  border-radius: 3px;
  margin-bottom: 5px;
  text-transform: uppercase;
}

.info-alert {
  display: inline-block;
  margin-left: 10px;
  padding: 3px 10px;
  background-color: transparent;
  color: #e74c3c;
  font-weight: bold;
  font-size: 16px;
  text-align: left;
}

[data-theme="dark"] .now-label {
  background-color: #c0392b;
}

[data-theme="dark"] .info-alert {
  color: #ff6b6b;
}

/* Info Alerts - prominent banners */
.v2-info-alert {
  padding: var(--v2-space-sm) var(--v2-space-md);
  border-radius: var(--v2-radius-sm);
  margin-bottom: var(--v2-space-md);
  text-align: center;
}

.v2-info-alert--warning {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: #92400e;
}

.v2-info-alert--danger {
  background: linear-gradient(135deg, #fee2e2, #fecaca);
  color: #991b1b;
}

[data-theme="dark"] .v2-info-alert--warning {
  background: rgba(245, 158, 11, 0.2);
  color: #fcd34d;
}

[data-theme="dark"] .v2-info-alert--danger {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
}

/* Info Boxes */
.v2-info-box {
  padding: var(--v2-space-md);
  border-radius: var(--v2-radius-sm);
  background: var(--v2-bg-secondary);
  margin-bottom: var(--v2-space-sm);
}

.v2-info-box--muted {
  background: var(--v2-bg-tertiary);
  color: var(--v2-text-secondary);
}

.v2-info-box--warning {
  background: var(--v2-status-yellow-bg);
  border-left: 4px solid var(--v2-status-yellow);
}

.v2-info-box--danger {
  background: var(--v2-status-red-bg);
  border-left: 4px solid var(--v2-status-red);
}

[data-theme="dark"] .v2-info-box--warning {
  background: rgba(245, 158, 11, 0.15);
}

[data-theme="dark"] .v2-info-box--danger {
  background: rgba(239, 68, 68, 0.15);
}

/* Highlight text */
.v2-highlight--danger {
  color: var(--v2-status-red);
  font-weight: var(--v2-font-semibold);
}

/* Lists */
.v2-list {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--v2-space-sm);
}

.v2-list li {
  padding: var(--v2-space-xs) 0;
  padding-left: var(--v2-space-md);
  position: relative;
}

.v2-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--v2-text-muted);
}

.v2-list--check li::before {
  content: "✓";
  color: var(--v2-status-green);
}

.v2-list--danger li::before {
  content: "✗";
  color: var(--v2-status-red);
}

.v2-list--contacts li::before {
  content: none;
}

.v2-list--contacts li {
  padding-left: 0;
}

.v2-list--solutions .v2-list__item--success::before {
  content: "✅";
}

.v2-list--solutions .v2-list__item--danger::before {
  content: "❌";
}

/* Collapsible sections */
.v2-collapsible {
  border: 1px solid var(--v2-border);
  border-radius: var(--v2-radius-sm);
  margin-bottom: var(--v2-space-sm);
  overflow: hidden;
}

.v2-collapsible__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--v2-space-sm) var(--v2-space-md);
  background: var(--v2-bg-secondary);
  cursor: pointer;
  font-weight: var(--v2-font-medium);
  transition: background var(--v2-transition-fast);
}

.v2-collapsible__header:hover {
  background: var(--v2-bg-tertiary);
}

.v2-collapsible__arrow {
  transition: transform var(--v2-transition-fast);
}

.v2-collapsible--open .v2-collapsible__arrow {
  transform: rotate(180deg);
}

.v2-collapsible__content {
  display: none;
  padding: var(--v2-space-md);
  background: var(--v2-bg-primary);
}

.v2-collapsible--open .v2-collapsible__content {
  display: block;
}

/* Subtitles */
.v2-subtitle {
  font-size: var(--v2-text-base);
  font-weight: var(--v2-font-bold);
  margin-bottom: var(--v2-space-md);
}

.v2-subtitle--success {
  color: var(--v2-status-green);
}

.v2-subtitle--danger {
  color: var(--v2-status-red);
}

/* Mini cards for grids */
.v2-mini-card {
  background: var(--v2-bg-secondary);
  border-radius: var(--v2-radius-sm);
  padding: var(--v2-space-md);
}

.v2-mini-card strong {
  display: block;
  margin-bottom: var(--v2-space-sm);
  color: var(--v2-text-primary);
}

.v2-mini-card--danger {
  border-left: 3px solid var(--v2-status-red);
}

.v2-mini-card--wide {
  grid-column: 1 / -1;
  background: var(--v2-bg-secondary);
  border-left: 3px solid var(--v2-status-yellow);
}

/* Grid layouts */
.v2-grid {
  display: grid;
  gap: var(--v2-space-md);
}

.v2-grid--2 {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* Warning inline */
.v2-warning-inline {
  color: var(--v2-status-red);
  font-size: var(--v2-text-sm);
  margin-top: var(--v2-space-sm);
}

/* Conclusion text */
.v2-conclusion {
  font-weight: var(--v2-font-semibold);
  color: var(--v2-text-primary);
}

/* Contact lines */
.v2-contact-line {
  font-size: var(--v2-text-sm);
  margin: var(--v2-space-xs) 0;
  word-break: break-word;
}

.v2-text-muted {
  font-size: var(--v2-text-sm);
  color: var(--v2-text-secondary);
}

/* ==========================================================================
   CAMERA LIGHTBOX
   ========================================================================== */

/* Camera container - make images full width */
.v2-camera {
  width: 100%;
  margin-bottom: var(--v2-space-md);
}

.v2-camera__image-wrap {
  position: relative;
  cursor: zoom-in;
  overflow: hidden;
  border-radius: var(--v2-radius-md);
}

.v2-camera__image-wrap img.v2-camera__img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform var(--v2-transition-base);
}

.v2-camera__image-wrap:hover img.v2-camera__img {
  transform: scale(1.02);
}

.v2-camera__name {
  text-align: center;
  padding: var(--v2-space-sm);
  font-size: var(--v2-text-sm);
  color: var(--v2-text-secondary);
}

.v2-camera__timestamp {
  position: absolute;
  top: 0;
  left: 0;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  padding: var(--v2-space-xs) var(--v2-space-sm);
  font-size: var(--v2-text-xs);
  border-bottom-right-radius: var(--v2-radius-sm);
}

.v2-camera__status {
  position: absolute;
  top: 0;
  right: 0;
  padding: var(--v2-space-xs);
}

/* Lightbox overlay */
.v2-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--v2-space-md);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.v2-lightbox--active {
  opacity: 1;
  visibility: visible;
}

.v2-lightbox__content {
  position: relative;
  max-width: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.v2-lightbox__image {
  max-width: 100vw;
  max-height: 85vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--v2-radius-md);
}

.v2-lightbox__close {
  position: fixed;
  top: var(--v2-space-md);
  right: var(--v2-space-md);
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  color: #fff;
  font-size: 28px;
  font-weight: 300;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--v2-transition-fast);
  z-index: 10000;
  line-height: 1;
}

.v2-lightbox__close:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
  transform: scale(1.1);
}

.v2-lightbox__caption {
  margin-top: var(--v2-space-md);
  text-align: center;
  color: rgba(255, 255, 255, 0.8);
  font-size: var(--v2-text-sm);
}

/* ==========================================================================
   PREDICTION CHART SVG STYLES
   ========================================================================== */

/* Chart container */
.chart-container {
  max-width: 95%;
  margin: auto;
  height: auto;
}

.chart {
  max-width: 100%;
  width: 100%;
  height: auto;
}

/* Chart axis and grid lines */
.x-grid line, .y-grid line {
  stroke: #ddd;
}

/* Chart text - axis labels */
.labels {
  font-size: 12px;
  fill: var(--v2-text);
}

/* Chart text - bar values */
.bar-value {
  font-size: 17px;
  fill: var(--v2-text);
  text-anchor: middle;
  alignment-baseline: middle;
  pointer-events: none;
}

/* Highlight bar value */
.last-bar-value {
  fill: #17a2b8;
  font-size: 120%;
}

/* Chart copyright text */
.copyright-text {
  font-size: 12px;
  fill: var(--v2-text-muted);
  text-decoration: none;
}

/* Dark mode - data-theme attribute (explicit dark mode override) */
[data-theme="dark"] .labels {
  fill: #e0e0e0;
}

[data-theme="dark"] .bar-value {
  fill: #ffffff;
}

[data-theme="dark"] .x-grid line,
[data-theme="dark"] .y-grid line {
  stroke: #444;
}

[data-theme="dark"] .copyright-text {
  fill: #888;
}

/* Dark mode - prefers-color-scheme (when not overridden to light) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .labels {
    fill: #e0e0e0;
  }
  :root:not([data-theme="light"]) .bar-value {
    fill: #ffffff;
  }
  :root:not([data-theme="light"]) .x-grid line,
  :root:not([data-theme="light"]) .y-grid line {
    stroke: #444;
  }
  :root:not([data-theme="light"]) .copyright-text {
    fill: #888;
  }
}

/* Responsive chart text sizes */
@media (max-width: 768px) {
  .labels {
    font-size: 14px;
  }
  .bar-value {
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .labels {
    font-size: 12px;
  }
  .bar-value {
    font-size: 14px;
  }
}
