/* ── Pico CSS değişken köprüleri ── */
:root {
  --accent:      var(--pico-primary, #0172ad);
  --accent-soft: rgba(1, 114, 173, 0.1);
  --muted:       var(--pico-muted-color, #646b79);
  --text:        var(--pico-color, #373c44);
  --card:        var(--pico-card-background-color, #fff);
  --border:      var(--pico-muted-border-color, rgb(231,234,239.5));
  --surface:     var(--pico-background-color, #fff);
  --ceramic:     var(--pico-card-sectioning-background-color, rgb(251,251.5,252.25));
  --radius:      var(--pico-border-radius, 0.25rem);
}

/* ── Tipografi ── */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Figtree', system-ui, sans-serif;
}
@media (min-width: 576px) {
  h1 { font-size: 2.5rem; line-height: 1.0625; }
  h2 { font-size: 2rem;   line-height: 1.125; }
  h3 { font-size: 1.75rem; line-height: 1.15; }
}

/* Pico'nun 950px container breakpoint'ini kullan — override yok */

/* ── Header ── */
header {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 0;
  margin-bottom: 2rem;
}
header .container { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }

header .brand {
  font-family: 'Figtree', system-ui, sans-serif;
  font-size: 1.75rem;
  font-weight: 800;
  color: #000;
  text-decoration: none;
  letter-spacing: -0.02em;
  position: relative;
  display: inline-flex;
  align-items: flex-start;
}
header .brand-sparkle {
  display: inline-flex;
  flex-direction: column;
  gap: 1px;
  margin-left: 2px;
  transform: translateY(-2px);
}
header .brand-sparkle img {
  height: 0.55rem;
  width: auto;
  opacity: 0.85;
}
header .live-badge {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #ef4444;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.25rem 0.55rem;
  border-radius: 2rem;
}
header .live-dot {
  width: 0.45rem;
  height: 0.45rem;
  background: #ef4444;
  border-radius: 50%;
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .4; transform: scale(.8); }
}

/* ── Hero ── */
.hero {
  text-align: center;
  padding: 3.5rem 0 3rem;
  margin: 0 0 2rem;
}
.hero h2 {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.0625;
  margin: 0 0 1.5rem;
  color: var(--text);
}
@media (min-width: 1280px) {
  .hero h2 { font-size: 3rem; line-height: 1; }
}
.hero h2 mark {
  padding: 0;
  background: linear-gradient(to right, rgb(132,38,108), rgb(111,57,133), rgb(93,63,154), rgb(67,71,157));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-desc    { font-size: 1.125rem; color: var(--muted); line-height: 1.6; margin: 0 0 0.5rem; }
.hero-tagline { font-size: 0.875rem; color: var(--muted); margin: 0; }

/* ── Sekme navigasyonu ── */
.tab-nav {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 2px);
  padding: 0.3rem;
}
.tab-btn {
  flex: 1;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--pico-transition, 0.2s ease-in-out);
}
.tab-btn:hover { color: var(--text); background: var(--ceramic); }
.tab-btn.aktif { background: var(--pico-secondary-background, #525f7a); color: #fff; }
.tab-panel        { display: none; }
.tab-panel.aktif  { display: block; }

/* ── Kart (Step) ── */
.step {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1rem;
}
.step h3 { margin: 0 0 0.75rem; }
.step h4 { margin: 0 0 0.75rem; }
.step-title {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 0.35rem;
}

/* ── Tab ikonu (sekme buton img) ── */
.tab-icon { height: 1.1em; vertical-align: middle; margin-right: 4px; }

/* ── Input / Select ── */
input[type="search"], select {
  border-color: var(--border) !important;
  border-radius: var(--radius) !important;
  -webkit-appearance: none;
}
input[type="search"]:focus, select:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px rgba(1,114,173,.12) !important;
}

/* ── Öneri listeleri ── */
#oneri-listesi,
#durak-oneri-listesi {
  list-style: none;
  padding: 0;
  margin: 0.35rem 0 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: none;
  background: var(--card);
  box-shadow: 0 4px 16px rgba(0,0,0,.07);
}
#oneri-listesi li,
#durak-oneri-listesi li {
  padding: 0.6rem 1rem;
  cursor: pointer;
  transition: background 0.1s;
  border-bottom: 1px solid var(--border);
}
#oneri-listesi li:last-child,
#durak-oneri-listesi li:last-child { border-bottom: none; }
#oneri-listesi li:hover,
#oneri-listesi li.aktif,
#durak-oneri-listesi li:hover { background: var(--ceramic); }
#oneri-listesi { display: none; }
#oneri-listesi li { display: flex; gap: 0.75rem; align-items: baseline; }

.hat-kodu  { font-weight: 700; color: var(--accent); min-width: 3rem; }
.hat-adi   { color: var(--muted); font-size: 0.875rem; }
.durak-kodu { font-weight: 600; color: var(--accent); font-size: 0.8rem; }
.durak-adi  { font-weight: 600; color: var(--text); }
.durak-ilce { color: var(--muted); font-size: 0.82rem; margin-left: 0.35rem; }

/* ── Görünürlük ── */
#yon-bolumu   { display: none; }
#yon-select   { margin-top: 0.5rem; }
#konum-bolumu { display: none; }
#durak-detay  { display: none; }

/* ── Araç sayısı + butonlar ── */
#arac-sayisi { font-size: 0.875rem; color: var(--muted); margin-bottom: 0.5rem; }

.status-aktif     { color: #22c55e; }
.status-sefer-yok { color: #ef4444; }

#yenile-btn {
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-size: 0.8rem; padding: 0.3rem 0.9rem;
  background: var(--accent); color: #fff;
  border: none; border-radius: var(--radius);
  cursor: pointer; float: right; margin-top: -0.15rem;
  transition: var(--pico-transition, 0.2s ease-in-out);
}
#yenile-btn:hover { background: var(--pico-primary-hover, #015887); }

#konum-sec-btn {
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-size: 0.8rem; padding: 0.3rem 0.9rem;
  background: transparent; color: var(--accent);
  border: 1px solid var(--accent); border-radius: var(--radius);
  cursor: pointer; margin-bottom: 0.65rem;
  transition: var(--pico-transition, 0.2s ease-in-out);
}
#konum-sec-btn:hover  { background: var(--accent-soft); }
#konum-sec-btn.aktif  { background: var(--accent-soft); }

/* ── Harita ── */
#harita {
  height: 420px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 0.75rem;
  z-index: 0;
}
#harita.konum-sec-modu,
#harita.konum-sec-modu * { cursor: crosshair !important; }

.leaflet-marker-icon, .leaflet-marker-shadow {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
}
.bus-icon, .bus-icon-aktif { cursor: pointer; transition: transform .15s; }
.bus-icon:hover  { transform: scale(1.15); }
.bus-icon-aktif  { transform: scale(1.2); filter: drop-shadow(0 0 4px #b45309); }

.kullanici-marker {
  background: #6b7280; color: #fff;
  border-radius: 50%; width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
.leaflet-control-zoom a       { color: var(--accent) !important; font-weight: 700 !important; }
.leaflet-control-zoom a:hover { background: var(--accent) !important; color: #fff !important; }
.leaflet-control-zoom         { border: 1px solid var(--border) !important; box-shadow: 0 1px 4px rgba(0,0,0,.1) !important; }

/* ── Inline otobüs ikonları ── */
.bus-inline    { height: 1.1em; vertical-align: middle; margin-right: 4px; }
.bus-inline-sm { height: 0.9em; vertical-align: middle; margin-right: 3px; }

/* ── Popup ── */
.popup-yon  { color: var(--muted); font-size: 0.85rem; display: block; }
.popup-saat { font-size: 0.8rem; display: block; }
.popup-mesafe { color: var(--accent); font-size: 0.8rem; display: block; }

/* ── Banner ── */
#en-yakin-banner {
  background: var(--accent-soft);
  border: 1px solid rgba(1,114,173,.25);
  border-radius: var(--radius);
  padding: 0.65rem 1rem;
  margin-bottom: 0.75rem;
  font-size: 0.875rem;
  display: none;
}
#duyuru-banner { display: none; margin-bottom: 0.75rem; }
.duyuru-item {
  background: #fffbeb; border: 1px solid #fde68a;
  border-radius: var(--radius); padding: 0.6rem 0.9rem;
  font-size: 0.84rem; margin-bottom: 0.4rem; color: #78350f;
}

/* ── Tablo ── */
.table-overflow { overflow-x: auto; }
table { width: 100%; font-size: 0.875rem; border-collapse: collapse; }
thead th {
  background: var(--surface); font-weight: 600; font-size: 0.72rem;
  text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted);
  padding: 0.5rem 0.75rem; border-bottom: 2px solid var(--border); white-space: nowrap;
}
tbody td { padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--ceramic); }
tbody tr.aktif-satir td { background: var(--accent-soft); font-weight: 600; }

.koordinat-link { color: var(--accent); text-decoration: none; font-size: 0.8rem; }
.koordinat-link:hover { text-decoration: underline; }
.mesafe-chip {
  display: inline-block; background: var(--ceramic); color: var(--accent);
  border-radius: 9999px; padding: 0.1rem 0.5rem; font-size: 0.78rem; font-weight: 600; white-space: nowrap;
}

/* ── Planlanan saatler ── */
#planlanan-wrapper { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.planlanan-baslik {
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.09em; color: var(--muted); margin-bottom: 0.5rem;
}
.planlanan-saatler { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.saat-chip {
  padding: 0.25rem 0.6rem; border-radius: 9999px;
  font-size: 0.875rem;
  background: var(--ceramic); color: var(--text); border: 1px solid var(--border); white-space: nowrap;
}
.saat-chip.siradaki { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 600; }
.saat-chip.gecmis   { opacity: .3; }

/* ── Sayaçlar ── */
#countdown, #durak-countdown {
  font-size: 0.75rem; color: var(--muted); margin-bottom: 0.4rem; display: none;
}

/* ── Durak geliş listesi ── */
.durak-baslik {
  display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 1rem;
}
.gelis-listesi { display: flex; flex-direction: column; gap: 0.45rem; }
.gelis-item {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.6rem 0.9rem; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  cursor: pointer; transition: var(--pico-transition, 0.2s ease-in-out);
}
.gelis-item:hover { border-color: var(--accent); background: var(--accent-soft); }
.gelis-hat-kodu {
  background: var(--accent); color: #fff; border-radius: var(--radius);
  padding: 0.2rem 0.65rem; font-weight: 700; font-size: 0.875rem;
  min-width: 2.8rem; text-align: center; flex-shrink: 0;
}
.gelis-hat-adi  { flex: 1; font-size: 0.875rem; color: var(--text); }
.gelis-sure     { font-weight: 700; font-size: 0.875rem; white-space: nowrap; text-align: right; }
.gelis-sure.yakin { color: #15803d; }
.gelis-sure.orta  { color: var(--accent); }
.gelis-sure.uzak  { color: var(--muted); }
.gelis-saat       { font-size: 0.75rem; color: var(--muted); display: block; }

/* ── Hat badge'leri ── */
.hatlar-bolumu { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.hatlar-baslik {
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.09em; color: var(--muted); margin-bottom: 0.5rem;
}
.hat-badge {
  display: inline-flex; align-items: center; gap: 0.3rem;
  background: var(--ceramic); border: 1px solid var(--border); color: var(--text);
  border-radius: 9999px; padding: 0.25rem 0.75rem; font-size: 0.875rem; font-weight: 600;
  cursor: pointer; margin: 0 0.3rem 0.3rem 0;
  transition: var(--pico-transition, 0.2s ease-in-out);
}
.hat-badge:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ── Yükleniyor / Boş durum ── */
.durum-mesaj { text-align: center; color: var(--muted); padding: 2rem 0; font-size: 0.9rem; }
.spinner {
  display: inline-block; width: 1.1rem; height: 1.1rem;
  border: 2px solid var(--border); border-top-color: var(--accent);
  border-radius: 50%; animation: spin .7s linear infinite;
  vertical-align: middle; margin-right: 0.4rem;
}
@keyframes spin { to { transform: rotate(360deg); } }
