:root {
  --bg: #0d1210;
  --panel-bg: #141b17;
  --green: #34d17c;
  --green-deep: #0f5132;
  --green-dim: #1c3a29;
  --accent: #ff9152;
  --text: #eef4f0;
  --text-dim: #93a49b;
  --border: #24312b;
  --warn: #ff6b6b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Sora", "Helvetica Neue", Arial, sans-serif;
}

.site-header {
  background: linear-gradient(135deg, #0f1b15 0%, #0d1210 70%);
  color: var(--text);
  padding: 26px 32px 22px;
  border-bottom: 3px solid var(--green);
  box-shadow: 0 6px 24px -12px rgba(52, 209, 124, 0.35);
}

.logo {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--green);
}

.tagline {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  margin-top: 6px;
  color: var(--text-dim);
  text-transform: uppercase;
}

.panel {
  max-width: 960px;
  margin: 24px auto;
  padding: 24px;
}

.field-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.toggle-btn {
  background: #000;
  color: var(--text);
  border: 1px solid var(--border);
  padding: 9px 18px;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
}

.toggle-btn.active {
  background: var(--green);
  color: #08150f;
  border-color: var(--green);
}

.ucl-panel {
  background: var(--panel-bg);
  border: 1px solid var(--border);
  border-left: 4px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 24px;
}

/* Per-competition accent -- border stripe only, title stays the default
   light text on all three (kept consistent rather than only for UCL, where
   the official navy is too dark to read as text on this background). */
.ucl-panel--ucl {
  border-left-color: #0232FF; /* official 2024-27 UEFA Champions League brand electric blue */
}
.ucl-panel--uel {
  border-left-color: #ff5a00; /* no single published hex like UCL's; a common approximation of its orange */
}
.ucl-panel--uecl {
  border-left-color: var(--green); /* the site's own accent -- no separate brand color */
}

.ucl-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

/* Same width on every competition's club select, regardless of how long
   that competition's title/subtitle is (which would otherwise squeeze or
   stretch it via the header's space-between layout). */
.ucl-panel-header select {
  width: 220px;
  max-width: 100%;
  flex-shrink: 0;
}

.ucl-panel-title {
  font-weight: 800;
  font-size: 15px;
}

.ucl-panel-sub {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 2px;
}

.ucl-fixture-list {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Fixed-width columns so date, HOME/AWAY, and the opponent name all line up
   across every row -- a flex row sized each cell to its own content, so a
   longer date string ("22 Oct" vs "5 Nov") shifted every column after it. */
.ucl-fixture-row {
  display: grid;
  grid-template-columns: 38px 205px 64px 1fr auto;
  align-items: center;
  gap: 12px;
  background: #000;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 12px;
}

.ucl-fixture-md {
  font-weight: 800;
  color: var(--green);
  font-size: 12px;
}

.ucl-fixture-date {
  font-size: 13px;
  text-align: center;
}

.ucl-badge {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  width: fit-content;
}

.ucl-badge-home {
  background: var(--green-dim);
  color: var(--green);
}

.ucl-badge-away {
  background: #3a2410;
  color: var(--accent);
}

.ucl-fixture-opponent {
  font-size: 13px;
  font-weight: 600;
}

.ucl-plan-btn {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.ucl-plan-btn:hover {
  background: rgba(255, 145, 82, 0.12);
}

.top-options-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.trip-row {
  display: flex;
  gap: 8px;
}

.select-input {
  background: #000;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.select-input:focus,
.date-input:focus,
.number-input:focus,
.location-input:focus {
  outline: none;
  border-color: var(--green);
}

.dates-row {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin: 12px 0 8px;
  align-items: flex-end;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.date-input {
  background: #000;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 32px 8px 10px;
  font-size: 14px;
  color-scheme: dark;
  width: 100%;
}

/* Native <input type=date> renders its value in whatever format the user's
   OS/browser locale dictates (05.09.2026 here, 09/05/2026 there, ...), and
   in this environment's browser the built-in calendar glyph doesn't render
   at all. Rather than fight either of those, we hide the native text and
   icon and draw our own: a plain-JS-formatted "15 Sep 2026" overlay that
   reads the same everywhere, plus our own SVG calendar icon. The native
   input stays fully in place underneath (still keyboard/a11y-operable,
   still the thing that actually opens the date picker) -- only its paint is
   suppressed. */
.date-input,
.date-input::-webkit-datetime-edit,
.date-input::-webkit-datetime-edit-fields-wrapper,
.date-input::-webkit-datetime-edit-text,
.date-input::-webkit-datetime-edit-month-field,
.date-input::-webkit-datetime-edit-day-field,
.date-input::-webkit-datetime-edit-year-field {
  color: transparent;
}

/* Stretch the (invisible) native picker indicator over the whole field so
   clicking anywhere opens the calendar, not just a tiny corner icon. */
.date-input::-webkit-calendar-picker-indicator {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  opacity: 0;
  cursor: pointer;
}

.date-field {
  position: relative;
}

.date-display {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text);
  font-size: 14px;
  pointer-events: none;
  white-space: nowrap;
}

.date-field-icon {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 17px;
  height: 17px;
  color: var(--green);
  pointer-events: none;
}

.number-input {
  background: #000;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 14px;
  width: 68px;
}

.date-mode-caption {
  font-size: 11px;
  color: var(--text-dim);
  max-width: 420px;
  margin-bottom: 20px;
}

.sides-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 20px;
}

@media (max-width: 720px) {
  .sides-row {
    grid-template-columns: 1fr;
  }

  /* Fixed grid columns need room the panel doesn't have below this width --
     they'd overflow the row's own background/border instead of wrapping.
     Stack each fixture's pieces into their own line instead: MD, date,
     HOME/AWAY, opponent, then "Fly there" as a full-width button closing
     out the card -- same source order the markup already puts them in. */
  .ucl-fixture-row {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 12px;
  }
  .ucl-fixture-date {
    text-align: left;
  }
  .ucl-plan-btn {
    margin-top: 4px;
    text-align: center;
  }
}

.search-side {
  position: relative;
  background: var(--panel-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
}

.location-input {
  width: 100%;
  background: #000;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  margin-bottom: 10px;
}

.suggestions {
  position: absolute;
  /* Higher than Leaflet's own control z-index (1000, e.g. the +/- zoom
     buttons), so a long suggestion list isn't hidden behind the map. */
  z-index: 2000;
  left: 18px;
  right: 18px;
  top: 70px;
  background: #000;
  border: 1px solid var(--border);
  border-radius: 10px;
  max-height: 240px;
  overflow-y: auto;
}

.suggestion-item {
  padding: 8px 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid var(--border);
}

.suggestion-item:last-child {
  border-bottom: none;
}

.suggestion-item:hover {
  background: var(--green-dim);
}

.suggestion-label {
  font-size: 14px;
  font-weight: 600;
}

.suggestion-sub {
  font-size: 11px;
  color: var(--text-dim);
}

.mode-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.radius-row {
  margin-bottom: 10px;
}

.radius-slider {
  width: 100%;
  accent-color: var(--green);
}

.draw-hint {
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 10px;
}

.map-container {
  height: 320px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
}

/* Flat map: dark "ocean" background behind the green country fills.
   Leaflet adds .leaflet-container to the same div as .map-container, so this
   must be a compound selector, not a descendant one. */
.map-container.leaflet-container {
  background: #060a08;
}

.map-container .leaflet-control-zoom a {
  background: #000;
  color: var(--text);
  border-color: var(--border);
}

.map-container .leaflet-control-zoom a:hover {
  background: var(--green-dim);
}

.map-container .leaflet-control-attribution {
  background: rgba(0, 0, 0, 0.6);
  color: var(--text-dim);
}

.map-container .leaflet-control-attribution a {
  color: var(--text-dim);
}

.panel-status {
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-dim);
  min-height: 16px;
}

.panel-status.status-warn {
  color: var(--warn);
}

.airport-list-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 6px;
}

.airport-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.airport-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #000;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 10px 5px 8px;
  font-size: 12px;
  line-height: 1.2;
}

.airport-chip-flag {
  font-size: 14px;
}

.airport-chip-code {
  font-weight: 800;
  color: var(--green);
  letter-spacing: 0.5px;
}

.airport-chip-name {
  color: var(--text-dim);
}

.error-box {
  background: #2a1414;
  border: 1px solid var(--warn);
  color: var(--warn);
  padding: 10px 14px;
  border-radius: 10px;
  margin-bottom: 16px;
  font-size: 13px;
}

.search-btn-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.search-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--green) 0%, #1fae63 100%);
  color: #08150f;
  border: none;
  border-radius: 999px;
  padding: 17px;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 1px;
  cursor: pointer;
  box-shadow: 0 10px 24px -10px rgba(52, 209, 124, 0.55);
}

.search-btn:hover {
  filter: brightness(1.08);
}

.search-btn-secondary {
  width: auto;
  background: transparent;
  color: var(--green);
  border: 1px solid var(--green);
  box-shadow: none;
  padding: 9px 22px;
  font-size: 12px;
  font-weight: 700;
}

.search-btn-secondary:hover {
  background: var(--green-dim);
  filter: none;
}

.search-btn-caption {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 8px;
  text-align: center;
}

.hidden {
  display: none !important;
}
