/**
 * Responsive Styles
 *
 * Mobile-first responsive breakpoints.
 */

/* Small devices (landscape phones, 576px and up) */
@media (max-width: 575.98px) {
  :root {
    --font-size-3xl: 1.5rem;
    --font-size-2xl: 1.25rem;
    --font-size-xl: 1.125rem;
  }

  .header__container {
    padding: 0 var(--spacing-sm);
  }

  .header__title {
    font-size: var(--font-size-lg);
  }

  .search {
    width: 180px;
  }

  .search__input {
    height: 32px;
    font-size: var(--font-size-xs);
  }

  .station-page {
    padding: var(--spacing-md);
  }

  .station-stats__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .station-stats__value {
    font-size: var(--font-size-lg);
  }

  .station-chart__canvas {
    height: 250px;
  }

  .station-links {
    flex-direction: column;
  }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
  .search {
    width: 220px;
  }

  .station-stats__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
  .station-stats__grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 992px) {
  .station-stats__grid {
    grid-template-columns: repeat(7, 1fr);
  }
}

/* Touch device adjustments */
@media (hover: none) and (pointer: coarse) {
  .station-marker {
    /* Slightly larger touch target on mobile */
    width: 16px;
    height: 16px;
  }

  .station-marker:hover {
    /* Disable hover effects on touch */
    transform: none;
  }

  .search__result {
    padding: var(--spacing-md);
  }
}

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

  .station-marker--blinking {
    animation: none;
  }
}

/* High contrast mode */
@media (prefers-contrast: high) {
  :root {
    --color-border: #000;
    --color-text-muted: #555;
  }

  .station-marker {
    border: 2px solid #000;
  }
}

/* Print styles */
@media print {
  .header {
    position: static;
    background-color: white;
    color: black;
    box-shadow: none;
    border-bottom: 1px solid #000;
  }

  .search {
    display: none;
  }

  .main {
    padding-top: 0;
  }

  .map-container {
    display: none;
  }

  .station-chart {
    page-break-inside: avoid;
  }

  .station-links {
    display: none;
  }
}
