/* =====================================================================
   /wetva/css/tr_selector.css  (OPTIMIZED – 1:1 COPY)
   - aufgeräumt (Duplikate entfernt)
   - Trip-Kachel Varianten über generische Selector zusammengeführt
   - Leaflet/Map Regeln konsolidiert (kein 79%-Chaos mehr)
   - Coord-Helper sauber als 4-Spalten-Grid wie Trip-Header
   ===================================================================== */


/* =========================================
   0) GLOBAL / VARS
   ========================================= */
:root{
  --tr-map-left-pad: 25px; /* dein Wunsch */
}

/* =========================================
   1) LAYOUT: MAP & COLUMNS
   ========================================= */

/* Grid unter dem Banner */
.main{
  max-width: 1625px;
  margin: 0 auto;
  /* display: grid;
  /* grid-template-columns: 45% 1fr;  /* links Karte, rechts Trips */
  column-gap: 20px;
  row-gap: 24px;
  align-items: stretch;            /* beide Spalten gleiche Höhe */
}

/* =========================================
   2) BOXEN (STATE & FLIGHTS)
   ========================================= */

.state-box,
.flights-box{
  display: flex;
  flex-direction: column;
  border: 2px solid var(--accent);
  border-radius: 10px;
  box-shadow: 0 0 400px rgba(255,155,0,0.3);
  /* Default – wird später viewport-basiert überschrieben */
  height: 730px;
}

.state-header,
.flights-header{
  flex: 0 0 auto;
  background-color: var(--accent);
  color: #000;
  padding: 8px 12px;
  font-size: 14px;
  border-bottom: 2px solid var(--accent);
}

.state-header a,
.flights-header a{
  color: #000;
  text-decoration: none;
}
.state-header a:hover,
.flights-header a:hover{
  color: var(--bg-light);
}

.state-content,
.flights-content{
  flex: 1 1 auto;
  padding: 10px;
  background-color: var(--bg-dark);
  overflow-y: auto;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-color: var(--accent) var(--bg-dark);
}

/* Flights rechts: vertikale Trip-Liste */
.flights-content{
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  text-align: left;
}

/* State links (Map) – default zentriert (wird später auf "stretch" gestellt) */
.state-content{
  display: flex;
  align-items: center;
  justify-content: center;
}

/* =========================================
   3) TRIP-KACHELN
   ========================================= */

/* Alle trips-box Varianten bündeln */
.trips-box,
[class^="trips-box_"]{
  display: flex;
  flex-direction: column;
  border-radius: 8px;
  padding: 0;
  margin: 0; /* Abstand kommt über gap in .flights-content */
  box-shadow: 0 0 8px rgba(0,0,0,0.5);
  border: 1px solid rgba(255,184,69,0.35);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Trip-Header: 4 Spalten */
.trips-header,
[class^="trips-header_"]{
  border-radius: 8px 8px 0 0;
  padding: 6px 10px;
  font-size: 0.95rem;
  display: grid;
  grid-template-columns: 1.3fr 0.7fr 0.5fr 0.3fr; /* Flight-ID | Time/Dist | Class | Button */
  color: #000;
}

/* Links im Trip-Header */
.trips-header a,
[class^="trips-header_"] a{
  color: #000;
  text-decoration: none;
}
.trips-header a:hover,
[class^="trips-header_"] a:hover{
  color: var(--bg-light);
}

/* Spalten-Wrapper im Header */
.trip-col-flight,
.trip-col-time,
.trip-head-left{
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.8rem;
  align-items: baseline;
  min-width: 0;
}

/* Spalte 1 */
.trip-col-flight,
.trip-head-left{
  justify-self: flex-start;
  justify-content: flex-start;
  text-align: left;
}

/* Spalte 2 */
.trip-col-time{
  justify-self: center;
  justify-content: flex-end;
  text-align: center;
}

.trip-head-trip{
  margin: 0;
  font-weight: 700;
  font-size: 0.9rem;
  color: #ffb845;
}
.trip-head-trip a{ color: inherit; text-decoration: none; }
.trip-head-trip a:hover{ text-decoration: underline; }

.trip-head-time{
  margin: 0;
  font-weight: 700;
  font-size: 0.9rem;
  color: #ffb845;
  text-align: right;
}

/* Class-Spalte */
.trip-head-middle{
  justify-self: center;
  text-align: center;
  white-space: nowrap;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 0;
  border: 0;
  background: transparent;
}

/* rechts – Select-Button */
.select-btn{
  background:#129a23;
  color:#fff;
  border:0;
  border-radius:8px;
  padding:4px 10px;
  font-weight:700;
  font-size: 0.8rem;
  line-height:1.2;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  cursor:pointer;
  justify-self: flex-end;
}
.select-btn.selected{ background:#d61c1c; }

/* Trip-Content */
.trips-content,
[class^="trips-content_"]{
  flex: 1 1 auto;
  padding: 8px 10px;
  background-color: rgba(0, 0, 0, 0.55);
  border-radius: 0 0 8px 8px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  text-align: left;
  font-size: 0.85rem;
  line-height: 1.4;
  color: #ddd;
}

/* Route-Text */
.plane{
  font-size: 0.85rem;
  line-height: 1.4;
  display: inline-block;
  color: #ddd;
  flex: 1 1 auto;
  min-width: 0;
}

/* großes Flugzeug-Icon */
.plane2{
  font-size: 50px;
  line-height: 0;
  vertical-align: -10px;
  display: inline-block;
  color: rgba(255, 135, 0, 1);
}

/* spezielle Layouts für AP-Gruppe */
.trips-content_CC .ap,
.trips-content_LL .ap,
.trips-content_IC .ap,
.trips-content_CN .ap,
.trips-content_NN .ap,
.trips-content_RR .ap{
  display:inline-flex;
  gap:.5rem;
  align-items:baseline;
}

/* Trip Infos ganz rechts */
.trips-content > .extras,
[class^="trips-content_"] > .extras{
  margin-left: auto;
}

/* =========================================
   4) SCROLLBARS
   ========================================= */

.state-content::-webkit-scrollbar,
.flights-content::-webkit-scrollbar{ width: 10px; }

.state-content::-webkit-scrollbar-track,
.flights-content::-webkit-scrollbar-track{
  background: var(--bg-dark);
  border-radius: 8px;
}

.state-content::-webkit-scrollbar-thumb,
.flights-content::-webkit-scrollbar-thumb{
  background: var(--accent);
  border-radius: 8px;
  border: 2px solid var(--bg-dark);
}

.state-content::-webkit-scrollbar-thumb:hover,
.flights-content::-webkit-scrollbar-thumb:hover{
  background: rgba(255,170,40,1);
}

/* Light Theme */
body.light .state-content,
body.light .flights-content{
  scrollbar-color: var(--accent) var(--bg-light);
}
body.light .state-content::-webkit-scrollbar-track,
body.light .flights-content::-webkit-scrollbar-track{ background: var(--bg-light); }
body.light .state-content::-webkit-scrollbar-thumb,
body.light .flights-content::-webkit-scrollbar-thumb{ border-color: var(--bg-light); }

/* =========================================
   5) BADGES, LINKS & HILFSBOXEN
   ========================================= */

.iata-badge{
  display:inline-block;
  min-width:2.2ch;
  padding:2px 6px;
  border-radius:8px;
  font-size:0.75rem;
  color:#000;
  line-height:1;
  text-align:center;
  background: rgba(255,220,160,1);
  border:2px solid rgba(255,135,0,1);
}

.airport-link{
  color: #ffb845;
  font-weight: 600;
  text-decoration: none;
}
.airport-link:hover{ color: #ffffff; }

.link-out{
  margin-left:.25rem;
  font-size:.9em;
  opacity:.7;
  color:#fff;
}

/* Flighttime Badge */
.flighttime,
.flighttime-missing{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 80px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  background: rgba(0, 0, 0, 0.75);
  border: 1px solid rgba(255,184,69,0.6);
  color: #f5f5f5;
}
.flighttime-missing{
  opacity:.75;
  border-style: dashed;
  cursor:help;
}
.distance-badge{ min-width: 60px; }

/* Flugnummer Badge (Link) */
.flightnr-badge{
  cursor: pointer;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: inherit;
}

.flightnr-code{ position: relative; z-index: 1; }
.flightnr-badge:hover .flightnr-code{ visibility: hidden; }

.flightnr-badge:hover{
  background: #28a745;
  border-color: rgba(255, 200, 200, 0.9);
}

.flightnr-badge::after{
  content: '';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
}
.flightnr-badge:hover::after{ opacity: 1; }

/* Airline Texte */
.flightnr-badge-wt::after{ content: 'WEEKEND'; }
.flightnr-badge-lh::after{ content: 'LUFTHANSA'; }
.flightnr-badge-cfg::after{ content: 'CONDOR'; }
.flightnr-badge-ewg::after{ content: 'EUROWINGS'; }
.flightnr-badge-mbu::after{ content: 'MARABU'; }

/* Extras (Trip Infos) */
.extras{
  font-size: 0.8rem;
  opacity: 0.9;
}
.extras a,
.extras a:visited{
  color: #ffb845;
  font-weight: 600;
  text-decoration: none;
}
.extras a:hover,
.extras a:focus{
  color: #ffffff;
  text-decoration: underline;
  outline: none;
}

/* =========================================
   6) COORD-HELPER (Filter-Hinweis / Reset / Blockzeit)
   - als 4-Spalten Grid wie Trip-Header
   ========================================= */

.coord-helper{
  margin: 8px 0 12px;
  padding: 12px 10px; /* WICHTIG: links/rechts 10px => exakt wie trips-header */
  min-height: 56px;
  background: rgba(0, 0, 0, 0.45);
  border-radius: 8px;
  border: 1px solid rgba(255,184,69,0.45);
  box-shadow: 0 0 8px rgba(0,0,0,0.6);
  font-size: 0.8rem;
  color: #ddd;
  line-height: 1.4;

  display: grid;
  grid-template-columns: 1.3fr 0.7fr 0.5fr 0.3fr; /* wie Trip-Header */
  align-items: center;
  column-gap: 0; /* “durchgehend” */
}

/* Text links */
.coord-helper-text{
  grid-column: 1 / 2;
}

/* Highlight im Text */
.coord-helper b,
.coord-helper strong{
  color: #ffb845;
  font-weight: 700;
}

/* Reset Link */
.coord-helper-reset{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:2px 10px;
  border-radius:999px;
  margin-left: 10px;
  border:1px solid rgba(255,184,69,0.6);
  color:#ffb845;
  text-decoration:none;
  font-weight:700;
  font-size:0.75rem;
}
.coord-helper-reset:hover{
  color:#fff;
  border-color: rgba(255,184,69,1);
  text-decoration:none;
}

/* Blockzeit in Spalte 2, exakt über “FLUGZEIT & DISTANZ” */
.coord-helper-blocktime{
  grid-column: 2 / 3;
  justify-self: center;
  text-align: center;
  white-space: nowrap;

  display:flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  line-height: 1.1;
}

.coord-helper-blocktime-label{
  font-weight: 700;
  font-size: 0.9rem;
  color: #ffb845;
}

.coord-helper-blocktime-badge{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 80px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  background: rgba(0, 0, 0, 0.75);
  border: 1px solid rgba(255,184,69,0.6);
  color: #f5f5f5;
  white-space: nowrap;
}

/* Light Theme Blockzeit */
body.light .coord-helper-blocktime{ color: #333; }

/* =========================================
   7) FLIGHTS-FILTERLEISTE
   ========================================= */

.flights-filters{
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px 14px;
  margin: 0 0 10px 0;
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.45);
  border-radius: 8px;
  border: 1px solid rgba(255,184,69,0.35);
  box-shadow: 0 0 8px rgba(0,0,0,0.5);
  font-size: 0.8rem;
  color: #ddd;
}

.flights-filters-left{
  display: flex;
  flex: 1 1 auto;
  align-items: flex-end;
  gap: 14px;
  flex-wrap: nowrap;
}

.flights-filters-right{
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 14px;
  margin-left: 12px;
}

/* Labels als Block */
.flights-filters label{
  display: flex;
  flex-direction: column;
  gap: 3px;
  position: relative;
}

/* Fokus-Glow */
.flights-filters label::before{
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 10px;
  background: radial-gradient(circle at 50% 0%, rgba(255,184,69,0.25), transparent 60%);
  opacity: 0;
  transform: scale(0.98);
  pointer-events: none;
  transition: opacity 220ms ease, transform 220ms ease;
}
.flights-filters label:focus-within::before{
  opacity: 1;
  transform: scale(1);
}

/* Label Texte */
.trip-filter-label{
  font-weight: 700;
  font-size: 0.9rem;
  color: #ffb845;
}

/* Selects */
.flights-filters select{
  min-width: 130px;
  padding: 3px 28px 3px 6px;
  border-radius: 6px;
  border: 1px solid rgba(0,0,0,0.55);
  background-image:
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(240,235,220,0.96)),
    url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23ffb845' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat, no-repeat;
  background-position: left top, right 8px center;
  background-size: auto, 10px 6px;
  background-color: transparent;
  color: #000;
  font-size: 0.8rem;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.35) inset;
  transform: translateY(0) scale(1);
  transition: border-color 180ms ease, box-shadow 180ms ease, background-image 180ms ease, transform 180ms ease;
}

.flights-filters select:hover,
.flights-filters select:focus{
  border-color: rgba(255,184,69,0.95);
  background-image:
    linear-gradient(180deg, #fffaf0, #ffe3aa),
    url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23ffb845' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  box-shadow:
    0 0 6px rgba(255,184,69,0.65),
    0 0 0 1px rgba(255,184,69,0.95) inset;
  transform: translateY(-1px) scale(1.02);
}

/* IE/Edge Legacy */
.flights-filters select::-ms-expand{ display: none; }

/* Light Theme */
body.light .flights-filters{
  background: rgba(255,255,255,0.9);
  border-color: rgba(255,184,69,0.6);
  box-shadow: 0 0 8px rgba(0,0,0,0.2);
  color: #111;
}
body.light .flights-filters select{
  background-color: #fff;
  color: #000;
}

/* =========================================
   8) LEAFLET MAP (Step 1/2/3)
   ========================================= */

/* Map-Container in der linken Box */
#leafletMap{
  width: 100%;
  height: 100%;
  min-height: 680px;
  border-radius: 12px;
  border: 2px solid var(--accent);
  box-shadow: 0 0 400px rgba(255,155,0,0.3);
}

/* Marker */
.wetva-ap{
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
}

.wetva-ap-dot{
  display:block;
  width:14px; height:14px;
  border-radius:999px;
  border:2px solid rgba(0,0,0,0.85);
  box-shadow:
    0 0 0 2px rgba(255,184,69,0.25),
    0 0 12px rgba(255,155,0,0.55);
  transition: transform 120ms ease, box-shadow 180ms ease;
}

.leaflet-marker-icon:hover .wetva-ap-dot{
  transform: scale(1.08);
  box-shadow:
    0 0 0 2px rgba(255,184,69,0.45),
    0 0 16px rgba(255,155,0,0.8);
}

/* Popup Look */
.leaflet-popup-content-wrapper{
  background: rgba(0,0,0,0.78);
  color: #f5f5f5;
  border: 1px solid rgba(255,184,69,0.45);
  box-shadow: 0 0 18px rgba(0,0,0,0.8);
  border-radius: 12px;
}
.leaflet-popup-tip{
  background: rgba(0,0,0,0.78);
  border: 1px solid rgba(255,184,69,0.35);
}

.wetva-popup{
  font-family: system-ui, -apple-system, Segoe UI, sans-serif;
  font-size: 13px;
  min-width: 220px;
}
.wetva-popup-title{
  font-weight: 800;
  font-size: 0.92rem;
  color: #ffb845;
  margin: 0 0 6px 0;
}
.wetva-popup-sub{
  font-size: 0.8rem;
  opacity: .95;
  margin-bottom: 10px;
}
.wetva-popup-actions{
  display:flex;
  gap:8px;
  justify-content:flex-end;
  flex-wrap:wrap;
}

.wetva-map-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255,155,0,1);
  color: #000;
  font-weight: 800;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid rgba(0,0,0,0.55);
  box-shadow: 0 0 10px rgba(255,155,0,0.35);
  text-decoration: none;
}
.wetva-map-btn:hover{
  background: rgba(255,184,69,1);
  box-shadow: 0 0 14px rgba(255,184,69,0.6);
  text-decoration: none;
}

/* Leaflet Controls */
.leaflet-control-zoom a{
  background: rgba(0,0,0,0.75);
  color: #ffb845;
  border: 1px solid rgba(255,184,69,0.35);
}
.leaflet-control-attribution{
  background: rgba(0,0,0,0.55);
  color: #ddd;
  border-radius: 8px;
  padding: 4px 8px;
  border: 1px solid rgba(255,184,69,0.25);
}
.leaflet-control-attribution a{ color: #ffb845; }
.leaflet-control-attribution a:hover{
  color: #fff;
  text-decoration: underline;
}

/* Step 2 – Route Lines */
.wetva-route{ filter: drop-shadow(0 0 6px rgba(255, 184, 69, 0.35)); }
.leaflet-overlay-pane path.wetva-route-anim{
  animation: wetvaRouteDraw 0.9s ease-out forwards;
}
@keyframes wetvaRouteDraw{ to { stroke-dashoffset: 0; } }

/* Step 3 Tooltip Styling */
.wetva-country-tip{
  font-family: Verdana, sans-serif;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 10px;
  background: rgba(0,0,0,0.85);
  color: rgba(238,238,238,1);
  border: 1px solid rgba(255,184,69,0.7);
  box-shadow: 0 0 10px rgba(0,0,0,0.6);
}
.leaflet-tooltip{
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* Fixed Airport Info Box */
.wetva-info-box{
  background: rgba(150,150,150,0.70);
  border: 1px solid rgba(255,184,69,0.45);
  border-radius: 12px;
  box-shadow: 0 0 18px rgba(0,0,0,0.8);
  padding: 10px 12px 12px;
  min-width: 260px;
  max-width: 340px;
  position: relative;
}
.wetva-info-close{
  position:absolute;
  top:6px;
  right:8px;
  width:28px;
  height:28px;
  border-radius:10px;
  border:1px solid rgba(255,184,69,0.35);
  background: rgba(0,0,0,0.45);
  color:#ffb845;
  font-size:18px;
  line-height:1;
  cursor:pointer;
}
.wetva-info-close:hover{ color:#fff; border-color: rgba(255,184,69,0.8); }

/* =========================================
   9) VIEWPORT-HÖHE (zwischen Header/Footer)
   - bewusst so gelassen, aber konsolidiert
   ========================================= */

/* Grid soll wirklich bis Rand gehen für eu_* Pages */
.book_overview .main,
.eu_WDE_00 .main,
[class*="eu_"] .main{
  max-width: none !important;
  margin: 0 !important;
  padding-right: 20px;
  padding-left: var(--tr-map-left-pad);
  column-gap: 20px;
  align-items: stretch;
}

/* Beide Hauptboxen viewport-basiert */
[class*="eu_"] .state-box,
[class*="eu_"] .flights-box{
  height: calc(
    100vh
    - (var(--header-height) + 6px)
    - var(--footer-height)
    - var(--content-gap-top)
    - var(--content-gap-bottom)
  ) !important;
  min-height: 420px;
}

/* In der Map-Box NICHT scrollen */
[class*="eu_"] .state-content{
  overflow: hidden !important;
  padding: 0 !important;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
}

/* Leaflet Container: volle Fläche */
[class*="eu_"] #leafletMap{
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

/* Trips rechts: scrollen */
[class*="eu_"] .flights-content{
  overflow-y: auto;
}

/* =========================================
   10) LEGACY SVG MAP (falls noch irgendwo genutzt)
   ========================================= */

#map{
  display: block;
  width: 79%;
  height: auto;
  aspect-ratio: 1000 / 1200;
  max-width: 79%;
}

#map .label{
  font: 24px/1 system-ui, sans-serif;
  fill: rgba(0, 160, 50, 1);
  paint-order: stroke;
  stroke-width: 0;
  pointer-events: none;
}
#map .label text,
#map .label tspan{
  pointer-events: auto;
  cursor: pointer;
}
#map .label rect{ pointer-events: none; }

svg{
  width: auto;
  height: auto;
  max-width: 500px;
}
.city{ fill: orange; cursor: pointer; }
.route{
  stroke: orange;
  stroke-width: 3;
  fill: none;
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  opacity: 1;
  animation: drawRoute 1.5s linear forwards;
}
svg#map .route{ pointer-events: none; }

@keyframes drawRoute{ to { stroke-dashoffset: 0; } }

.tooltip{
  position: absolute;
  background: black;
  color: white;
  padding: 3px 6px;
  border-radius: 3px;
  box-shadow: 0 2px 6px rgba(255,85,0,0.8);
  font-size: 12px;
  display: none;
  pointer-events: none;
}

svg#map text[data-label]{ cursor: pointer; }
svg#map text[data-departure]{
  cursor: pointer;
  transition: opacity .15s ease;
}
svg#map text[data-departure]:hover,
svg#map text[data-departure]:focus{
  opacity: .8;
  text-decoration: underline;
}

/* =========================================
   11) RESPONSIVE
   ========================================= */

@media (max-width: 600px){
  :root{ --tr-map-left-pad: 12px; }

  [class*="eu_"] .main{ padding-right: 12px; }

  .flights-filters{
    flex-direction: column;
    align-items: stretch;
    gap: 6px 10px;
    padding: 6px 8px;
  }

  .flights-filters-left{ flex-wrap: wrap; }

  .flights-filters select{
    min-width: 110px;
    font-size: 0.78rem;
  }

  .flights-filters-right{
    margin-left: 0;
    align-items: flex-start;
  }

  /* untereinander -> normal scrollen */
  [class*="eu_"] .state-box,
  [class*="eu_"] .flights-box{
    height: auto !important;
    min-height: auto;
  }

  [class*="eu_"] #leafletMap{
    height: 360px !important;
  }
}

@media (max-width: 500px){
  .main{
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .state-box,
  .flights-box,
  .trips-box,
  [class^="trips-box_"]{
    height: auto;
    max-height: none;
  }

  .header-inner{
    padding: 12px clamp(120px, 35vw, 480px) 12px 12px;
  }

  .plane2{
    font-size: 36px;
    vertical-align: -6px;
  }

  .trips-header,
  [class^="trips-header_"]{
    column-gap: 0.5rem;
    font-size: 0.9rem;
  }

  .trip-head-middle{
    font-size: 0.7rem;
    padding: 2px 8px;
  }

  .trips-content,
  [class^="trips-content_"]{
    font-size: 0.8rem;
  }

  .select-btn{
    padding: 3px 8px;
    font-size: 0.75rem;
  }
}

.state-header-map{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.map-provider-switch{
  display:flex;
  align-items:center;
  gap:15px;
  font: 16px/1 system-ui, -apple-system, Segoe UI, Roboto, Arial;
  color:black;
}

.map-provider-switch select{
  background:#fff;
  border: 1px solid rgba(255,255,255,0.25);
  color:rgba(0,0,0,1);
  border-radius:10px;
  padding:6px 10px;
  outline:none;
}

/* =========================================================
   HOTFIX: kein horizontales Scrollen + rechts 15px Abstand
   (nur Overrides, restliche Datei bleibt unangetastet)
   ========================================================= */

/* Border/Padding sicher im Grid berechnen */
/*, *::before, *::after{ box-sizing: border-box; }*/

/* In CSS Grid dürfen Kinder schrumpfen, sonst overflow */
.main > .state-box,
.main > .flights-box{ min-width: 0; }

/* eu_* Layout: rechter Abstand exakt 15px, kein X-Overflow */
.book_overview .main,
.eu_WDE_00 .main,
[class*="eu_"] .main{
  padding-right: 15px !important; /* statt 20px */
  overflow-x: hidden !important;  /* Sicherheitsnetz */
}

/* Trips rechts: niemals X-Scroll */
.flights-content{ overflow-x: hidden !important; }

/* Optional: globales Sicherheitsnetz */
html, body{ overflow-x: hidden; }