/* ==========================================================================
   TRAM 9 POZNAŃ — pixel-art PWA
   ========================================================================== */

@font-face {
  font-family: "Press Start 2P";
  src: url("/static/fonts/PressStart2P-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "VT323";
  src: url("/static/fonts/VT323-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #070b10;
  --bg-soft: #0b1119;
  --panel: #0d1520;
  --panel-2: #111c29;
  --line: #1c2a3a;
  --line-bright: #2d4055;
  --text: #e8eef7;
  --muted: #8fa3b8;
  --dim: #5d7188;
  --accent: #ffb000;
  --accent-2: #ff671f;
  --green: #3ddc84;
  --red: #ff5c5c;
  --amber: #ffc857;
  --shadow: rgba(0, 0, 0, 0.55);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --sheet-peek: 64px;
  --sheet-visible: 0px;
  --px: 2px;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  position: fixed;
  inset: 0;
  overflow: hidden;
  overscroll-behavior: none;
  background: var(--bg);
  color: var(--text);
  font-family: "VT323", "Courier New", monospace;
  font-size: 20px;
  line-height: 1;
  -webkit-text-size-adjust: 100%;
  -webkit-user-select: none;
  user-select: none;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

button {
  border: 0;
  background: none;
  cursor: pointer;
  touch-action: manipulation;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

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

/* --------------------------------------------------------------------------
   Mapa
   -------------------------------------------------------------------------- */

#map {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: #0a0e13;
}

.leaflet-container {
  background: #0a0e13;
  font-family: "VT323", "Courier New", monospace;
  outline: none;
}

.leaflet-container .leaflet-tile {
  image-rendering: pixelated;
}

.pixel-tiles {
  /* OSM jest jasną mapą — odwracamy kolory, żeby dostać ciemny, pixelowy plan. */
  filter: invert(1) hue-rotate(180deg) brightness(0.78) contrast(1.08)
    saturate(0.62);
}

.leaflet-container .leaflet-overlay-pane svg {
  overflow: visible;
}

.route-casing {
  stroke-linecap: butt;
  stroke-linejoin: round;
}

.route-main {
  stroke-linecap: butt;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.8));
}

.route-dash {
  stroke-linecap: butt;
  opacity: 0.5;
}

.leaflet-interactive:focus {
  outline: none;
}

/* --------------------------------------------------------------------------
   Skanlines / vignette
   -------------------------------------------------------------------------- */

.scanlines {
  position: fixed;
  inset: 0;
  z-index: 800;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0.16) 0,
      rgba(0, 0, 0, 0.16) 1px,
      rgba(255, 255, 255, 0.012) 1px,
      rgba(255, 255, 255, 0.012) 2px,
      transparent 2px,
      transparent 4px
    );
  opacity: 0.5;
}

.scanlines::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at center,
    transparent 52%,
    rgba(0, 0, 0, 0.28) 100%
  );
}

/* --------------------------------------------------------------------------
   HUD
   -------------------------------------------------------------------------- */

.hud {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: calc(var(--safe-top) + 4px) 10px 6px;
  background: linear-gradient(
    180deg,
    rgba(7, 11, 16, 0.99) 0%,
    rgba(7, 11, 16, 0.96) 82%,
    rgba(7, 11, 16, 0.9) 100%
  );
  border-bottom: 2px solid var(--line);
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.25);
  pointer-events: none;
}

.hud > * {
  pointer-events: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
}

.tram-logo {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border: 2px solid var(--line-bright);
  background: #05080c;
  image-rendering: pixelated;
}

.brand-text {
  flex: 1 1 auto;
  min-width: 0;
}

.brand-text h1 {
  margin: 0;
  font-family: "Press Start 2P", "Courier New", monospace;
  font-size: 11px;
  line-height: 1.1;
  letter-spacing: 0.5px;
  color: var(--text);
  white-space: nowrap;
}

.brand-text h1 span {
  color: var(--accent-2);
}

.brand-text p {
  margin: 3px 0 0;
  font-family: "VT323", "Courier New", monospace;
  font-size: 13px;
  line-height: 1;
  letter-spacing: 1.5px;
  color: var(--muted);
  white-space: nowrap;
}

.brand-text .sep {
  color: var(--accent);
}

.live {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
  height: 22px;
  padding: 0 6px;
  border: 2px solid var(--line);
  background: #05080c;
  font-size: 13px;
  letter-spacing: 1px;
  color: var(--muted);
  white-space: nowrap;
}

.live-dot {
  width: 8px;
  height: 8px;
  background: var(--dim);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.04);
}

.live.is-connecting .live-dot {
  background: var(--amber);
  animation: blink 1s steps(1) infinite;
}

.live.is-live .live-dot {
  background: var(--green);
  box-shadow: 0 0 8px rgba(61, 220, 132, 0.7);
  animation: blink 2s steps(1) infinite;
}

.live.is-stale .live-dot {
  background: var(--amber);
  box-shadow: 0 0 8px rgba(255, 200, 87, 0.55);
}

.live.is-error .live-dot {
  background: var(--red);
  box-shadow: 0 0 8px rgba(255, 92, 92, 0.6);
}

.live.is-live {
  color: var(--green);
  border-color: rgba(61, 220, 132, 0.35);
}

.live.is-stale {
  color: var(--amber);
  border-color: rgba(255, 200, 87, 0.35);
}

.live.is-error {
  color: var(--red);
  border-color: rgba(255, 92, 92, 0.4);
}

@keyframes blink {
  0%,
  72% {
    opacity: 1;
  }
  73%,
  100% {
    opacity: 0.35;
  }
}

/* --------------------------------------------------------------------------
   Wybór linii
   -------------------------------------------------------------------------- */

.line-picker {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 4px;
}

.line-picker-label {
  flex: 0 0 auto;
  font-family: "Press Start 2P", "Courier New", monospace;
  font-size: 7px;
  color: var(--dim);
  letter-spacing: 0.5px;
}

.line-chips {
  display: flex;
  flex: 1 1 auto;
  gap: 5px;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 3px 2px 4px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  mask-image: linear-gradient(
    to right,
    transparent 0,
    #000 6px,
    #000 calc(100% - 10px),
    transparent 100%
  );
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0,
    #000 6px,
    #000 calc(100% - 10px),
    transparent 100%
  );
}

.line-chips::-webkit-scrollbar {
  display: none;
}

.line-chip {
  flex: 0 0 auto;
  min-width: 32px;
  height: 30px;
  padding: 0 5px;
  scroll-snap-align: center;
  border: 2px solid #05080c;
  background: var(--c, var(--panel-2));
  color: var(--t, var(--text));
  font-family: "Press Start 2P", "Courier New", monospace;
  font-size: 9px;
  line-height: 1;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.28);
  opacity: 0.72;
  transition: opacity 120ms steps(2), transform 120ms steps(2);
}

.line-chip:active {
  transform: translateY(1px);
}

.line-chip[aria-selected="true"] {
  opacity: 1;
  transform: translateY(-1px);
  box-shadow:
    0 0 0 2px var(--bg),
    0 0 0 4px var(--accent),
    inset 0 -3px 0 rgba(0, 0, 0, 0.28);
}

/* --------------------------------------------------------------------------
   Informacje o linii
   -------------------------------------------------------------------------- */

.route-info {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  margin-top: 3px;
  padding-top: 4px;
  border-top: 1px dashed var(--line);
}

.route-name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: "VT323", "Courier New", monospace;
  font-size: 18px;
  line-height: 1;
  letter-spacing: 0.4px;
  color: var(--text);
}

.route-meta {
  flex: 0 0 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  line-height: 1;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   Przyciski na mapie
   -------------------------------------------------------------------------- */

.map-actions {
  position: fixed;
  right: 10px;
  bottom: calc(var(--sheet-visible) + 12px);
  z-index: 900;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: bottom 180ms steps(4);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--line-bright);
  background: rgba(9, 14, 20, 0.94);
  color: var(--text);
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.45);
  font-family: "Press Start 2P", "Courier New", monospace;
}

.btn:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.45);
}

.btn-icon {
  width: 38px;
  height: 38px;
  padding: 0;
  font-family: "VT323", "Courier New", monospace;
  font-size: 24px;
  line-height: 1;
}

.btn-map {
  width: 40px;
  height: 40px;
  font-size: 21px;
  color: var(--muted);
}

.btn-map:hover,
.btn-map:focus-visible {
  color: var(--text);
  border-color: var(--accent);
}

.btn-map.is-active {
  background: var(--accent);
  border-color: #05080c;
  color: #05080c;
}

.btn-map:disabled {
  opacity: 0.35;
  cursor: default;
}

.btn-map:disabled:active {
  transform: none;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.45);
}

.map-credit {
  position: fixed;
  left: 10px;
  bottom: calc(var(--sheet-visible) + 5px);
  z-index: 850;
  pointer-events: none;
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.2px;
  color: rgba(143, 163, 184, 0.62);
  text-shadow: 0 1px 0 #000;
  transition: bottom 180ms steps(4);
}

/* --------------------------------------------------------------------------
   Dolny panel
   -------------------------------------------------------------------------- */

.sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  max-height: 38vh;
  padding: 0 10px calc(var(--safe-bottom) + 6px);
  background: linear-gradient(180deg, rgba(9, 14, 20, 0.985), rgba(6, 10, 15, 0.995));
  border-top: 2px solid var(--line-bright);
  box-shadow:
    0 -4px 0 rgba(0, 0, 0, 0.4),
    0 -10px 30px rgba(0, 0, 0, 0.55);
  transition: transform 200ms steps(4);
  will-change: transform;
}

.sheet.is-collapsed {
  transform: translateY(calc(100% - var(--sheet-peek)));
}

.sheet-handle {
  flex: 0 0 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 16px;
  padding: 0;
}

.sheet-handle span {
  display: block;
  width: 42px;
  height: 4px;
  background: var(--line-bright);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.35);
}

.sheet.is-collapsed .sheet-handle span {
  background: var(--accent);
}

.sheet-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 2px 0 6px;
}

.sheet-title {
  font-family: "Press Start 2P", "Courier New", monospace;
  font-size: 8px;
  line-height: 1.5;
  letter-spacing: 0.5px;
  color: var(--accent);
}

.sheet-title .count {
  color: var(--accent-2);
}

#updated {
  margin-top: 2px;
  font-size: 15px;
  line-height: 1;
  letter-spacing: 0.5px;
  color: var(--muted);
  white-space: nowrap;
}

.vehicles {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 2px 2px 4px;
  scrollbar-width: thin;
  scrollbar-color: var(--line-bright) transparent;
}

.vehicles::-webkit-scrollbar {
  width: 5px;
}

.vehicles::-webkit-scrollbar-thumb {
  background: var(--line-bright);
}

.vehicle {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 6px 8px;
  text-align: left;
  border: 2px solid var(--line);
  background: var(--panel);
  color: var(--text);
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.22);
}

.vehicle:active {
  background: var(--panel-2);
}

.vehicle.is-selected {
  border-color: var(--c, var(--accent));
  background: var(--panel-2);
  box-shadow:
    inset 3px 0 0 var(--c, var(--accent)),
    inset 0 -2px 0 rgba(0, 0, 0, 0.22);
}

.v-line {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 2px solid #05080c;
  background: var(--c, var(--accent));
  color: var(--t, #05080c);
  font-family: "Press Start 2P", "Courier New", monospace;
  font-size: 10px;
  line-height: 1;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.25);
}

.v-main {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.v-label {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
  font-family: "Press Start 2P", "Courier New", monospace;
  font-size: 8px;
  line-height: 1.4;
  color: var(--text);
  white-space: nowrap;
}

.v-label .v-dir {
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: "VT323", "Courier New", monospace;
  font-size: 16px;
  letter-spacing: 0.2px;
  color: var(--accent);
}

.v-sub {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
  line-height: 1;
  color: var(--muted);
}

.v-age {
  align-self: start;
  padding-top: 2px;
  font-size: 13px;
  line-height: 1;
  color: var(--dim);
  white-space: nowrap;
}

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 84px;
  padding: 12px;
  text-align: center;
  border: 2px dashed var(--line);
  color: var(--muted);
}

.empty strong {
  font-family: "Press Start 2P", "Courier New", monospace;
  font-size: 8px;
  line-height: 1.5;
  color: var(--text);
}

.empty span {
  font-size: 16px;
  line-height: 1.1;
}

.attribution {
  flex: 0 0 auto;
  padding: 5px 2px 0;
  border-top: 1px dashed var(--line);
  font-size: 12px;
  line-height: 1.2;
  color: var(--dim);
}

.attribution a {
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   Markery tramwajów
   -------------------------------------------------------------------------- */

.tram-div-icon {
  background: transparent;
  border: 0;
}

.tram-marker {
  position: relative;
  width: 34px;
  height: 46px;
  pointer-events: auto;
}

.tram-halo {
  position: absolute;
  left: 50%;
  top: 19px;
  width: 28px;
  height: 28px;
  transform: translate(-50%, -50%);
  background: var(--c, var(--accent));
  opacity: 0;
  box-shadow:
    0 0 0 4px rgba(255, 255, 255, 0.06),
    0 0 14px 4px rgba(255, 103, 31, 0.45);
  box-shadow:
    0 0 0 4px rgba(255, 255, 255, 0.06),
    0 0 14px 4px color-mix(in srgb, var(--c, var(--accent)) 45%, transparent);
}

.tram-marker.is-selected .tram-halo {
  opacity: 1;
  animation: halo 1.4s steps(3) infinite;
}

@keyframes halo {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.85;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.28);
    opacity: 0.45;
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.85;
  }
}

.tram-sprite {
  position: absolute;
  top: 1px;
  left: 50%;
  width: 18px;
  height: 32px;
  margin-left: -9px;
  transform-origin: 50% 50%;
  transition: transform 600ms steps(8);
  filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 0.7));
  will-change: transform;
}

.tram-sprite svg {
  display: block;
  width: 100%;
  height: 100%;
  shape-rendering: crispEdges;
}

.tram-sprite .tram-body {
  fill: var(--c, #ff671f);
}

.tram-badge {
  position: absolute;
  right: -3px;
  bottom: 4px;
  min-width: 17px;
  height: 15px;
  padding: 1px 3px 0;
  border: 2px solid #05080c;
  background: var(--c, var(--accent));
  color: var(--t, #05080c);
  font-family: "Press Start 2P", "Courier New", monospace;
  font-size: 6px;
  line-height: 12px;
  text-align: center;
  white-space: nowrap;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.45);
}

.tram-marker.is-selected .tram-badge {
  outline: 2px solid #fff;
  outline-offset: 0;
}

/* --------------------------------------------------------------------------
   Popup
   -------------------------------------------------------------------------- */

.leaflet-popup {
  margin-bottom: 18px;
}

.leaflet-popup-content-wrapper {
  border: 2px solid var(--line-bright);
  border-radius: 0;
  background: rgba(9, 14, 20, 0.98);
  color: var(--text);
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.45);
}

.leaflet-popup-content {
  width: 214px !important;
  margin: 10px 12px;
  font-family: "VT323", "Courier New", monospace;
  font-size: 17px;
  line-height: 1.15;
}

.leaflet-popup-tip {
  border: 2px solid var(--line-bright);
  border-radius: 0;
  background: rgba(9, 14, 20, 0.98);
  box-shadow: none;
}

.leaflet-popup-tip-container {
  filter: drop-shadow(0 4px 0 rgba(0, 0, 0, 0.35));
}

.leaflet-container a.leaflet-popup-close-button {
  top: 2px;
  right: 2px;
  width: 22px;
  height: 22px;
  padding: 2px 0 0;
  border-left: 2px solid var(--line);
  border-bottom: 2px solid var(--line);
  color: var(--muted);
  font-family: "VT323", "Courier New", monospace;
  font-size: 20px;
  line-height: 1;
}

.leaflet-container a.leaflet-popup-close-button:hover {
  color: var(--text);
  background: var(--panel-2);
}

.popup-head {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 6px;
  padding-bottom: 5px;
  border-bottom: 1px dashed var(--line);
}

.popup-line {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 24px;
  padding: 0 4px;
  border: 2px solid #05080c;
  font-family: "Press Start 2P", "Courier New", monospace;
  font-size: 9px;
  line-height: 1;
}

.popup-label {
  font-family: "Press Start 2P", "Courier New", monospace;
  font-size: 9px;
  line-height: 1.3;
}

.popup-row {
  margin-top: 3px;
}

.popup-row .muted {
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   Tooltipy przystanków
   -------------------------------------------------------------------------- */

.leaflet-tooltip.stop-tip {
  padding: 4px 7px;
  border: 2px solid var(--line-bright);
  border-radius: 0;
  background: rgba(9, 14, 20, 0.97);
  color: var(--text);
  font-family: "VT323", "Courier New", monospace;
  font-size: 16px;
  line-height: 1;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.4);
}

.leaflet-tooltip.stop-tip::before {
  border-top-color: var(--line-bright);
}

/* --------------------------------------------------------------------------
   Loading
   -------------------------------------------------------------------------- */

.loading {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background:
    linear-gradient(rgba(7, 11, 16, 0.94), rgba(7, 11, 16, 0.97)),
    repeating-linear-gradient(
      0deg,
      #0b1119 0,
      #0b1119 1px,
      #0a0f16 1px,
      #0a0f16 4px
    );
  transition: opacity 260ms steps(3), visibility 260ms steps(3);
}

.loading.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loading.is-error {
  cursor: pointer;
}

.loading.is-error .loading-art span {
  background: var(--red);
  animation: none;
}

.loading-art {
  display: grid;
  grid-template-columns: repeat(4, 13px);
  grid-auto-rows: 13px;
  gap: 5px;
  transform: skewX(-4deg);
}

.loading-art span {
  display: block;
  background: var(--accent-2);
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.3);
  animation: loadpix 1s steps(2) infinite;
}

.loading-art span:nth-child(2n) {
  animation-delay: 120ms;
  background: var(--accent);
}

.loading-art span:nth-child(3n) {
  animation-delay: 240ms;
}

.loading-art span:nth-child(4n) {
  animation-delay: 360ms;
}

@keyframes loadpix {
  0%,
  100% {
    opacity: 0.3;
    transform: translateY(0);
  }
  50% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

.loading-text {
  font-family: "Press Start 2P", "Courier New", monospace;
  font-size: 8px;
  line-height: 1.7;
  letter-spacing: 1px;
  text-align: center;
  color: var(--text);
}

.loading-text .dots {
  color: var(--accent);
}

.loading.is-error .loading-text {
  color: var(--red);
}

.loading-hint {
  display: block;
  margin-top: 8px;
  font-family: "VT323", "Courier New", monospace;
  font-size: 16px;
  letter-spacing: 0;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   Toast
   -------------------------------------------------------------------------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--sheet-visible) + 18px);
  z-index: 2500;
  max-width: calc(100% - 24px);
  padding: 8px 12px;
  transform: translate(-50%, 8px);
  border: 2px solid var(--accent);
  background: rgba(9, 14, 20, 0.98);
  color: var(--text);
  font-size: 17px;
  line-height: 1.15;
  text-align: center;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 140ms steps(2), transform 140ms steps(2);
}

.toast[hidden] {
  display: none;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast.is-error {
  border-color: var(--red);
  color: #ffd7d7;
}

/* --------------------------------------------------------------------------
   Mniejsze ekrany / dostępność
   -------------------------------------------------------------------------- */

@media (max-height: 700px) {
  .sheet {
    max-height: 38vh;
  }

  .brand-text p {
    display: none;
  }

  .route-name {
    font-size: 16px;
  }

  .vehicle {
    padding: 4px 7px;
  }
}

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

  .sheet {
    transition: none;
  }
}
