/* Yeniden kullanılan parçalar: buton, alan, çip, rozet, istasyon kartı */

.ico { display: grid; place-items: center; }
.ico svg { display: block; }

/* ══ Butonlar ═════════════════════════════════════════════════════ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  min-height: var(--tap);
  padding: 0 var(--s5);
  border-radius: var(--r-md);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  background: var(--surface-hi);
  border: 1px solid var(--line);
  transition: transform var(--dur-fast) var(--ease),
              background var(--dur-fast) var(--ease),
              opacity var(--dur-fast) var(--ease);
}
.btn:active { transform: scale(0.975); }
.btn[disabled] { opacity: 0.4; pointer-events: none; }

.btn--primary {
  background: linear-gradient(135deg, var(--accent), #10c6cf);
  color: var(--accent-ink);
  border-color: transparent;
  box-shadow: var(--shadow-md), var(--glow-accent);
}
.btn--ghost  { background: transparent; border-color: var(--line-strong); color: var(--text-mid); }
.btn--sm     { min-height: 36px; padding: 0 var(--s4); font-size: 0.82rem; border-radius: var(--r-sm); }
.btn--lg     { min-height: 54px; font-size: 1rem; border-radius: var(--r-md); }
.btn--block  { width: 100%; }

.icon-btn {
  width: var(--tap); height: var(--tap);
  flex: none;
  display: grid; place-items: center;
  border-radius: var(--r-full);
  color: var(--text-mid);
  transition: transform var(--dur-fast) var(--ease),
              color var(--dur-fast) var(--ease),
              background var(--dur-fast) var(--ease);
}
.icon-btn:hover  { color: var(--text); background: var(--surface-hi); }
.icon-btn:active { transform: scale(0.9); }
.icon-btn--glass {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  color: var(--text);
}
.icon-btn[aria-pressed="false"] { color: var(--text-dim); opacity: 0.6; }

/* ══ Arama alanı ══════════════════════════════════════════════════ */

.field {
  display: flex;
  align-items: center;
  gap: var(--s2);
  height: 46px;
  padding: 0 var(--s3);
  border-radius: var(--r-md);
  background: var(--surface-hi);
  border: 1px solid var(--line);
  color: var(--text-dim);
  transition: border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.field:focus-within { border-color: var(--accent); color: var(--accent); }

/* Mobilde harita üzerinde yüzüyor */
.field--float {
  height: 50px;
  border-radius: var(--r-full);
  padding: 0 var(--s4);
  background: var(--glass);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-md);
}

.field input {
  flex: 1; min-width: 0;
  border: 0; background: none;
  color: var(--text);
  font-size: 0.92rem;
  -webkit-user-select: text; user-select: text;
}
.field input::placeholder { color: var(--text-dim); }

.field__clear {
  width: 24px; height: 24px;
  flex: none;
  display: grid; place-items: center;
  border-radius: var(--r-full);
  background: var(--line);
  color: var(--text-mid);
}

/* ══ Filtre çipleri ═══════════════════════════════════════════════ */

.chips {
  display: flex;
  gap: var(--s2);
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.chips::-webkit-scrollbar { display: none; }

.chips--float {
  padding: 2px 0;
  mask-image: linear-gradient(90deg, #000 88%, transparent);
  -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent);
}

.chip {
  flex: none;
  height: 34px;
  padding: 0 var(--s4);
  border-radius: var(--r-full);
  font-size: 0.8rem;
  font-weight: 550;
  color: var(--text-mid);
  background: var(--glass);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--line);
  white-space: nowrap;
  transition: all var(--dur-fast) var(--ease);
}
.chip:active { transform: scale(0.95); }
.chip.is-active {
  color: var(--accent-ink);
  background: var(--accent);
  border-color: transparent;
  box-shadow: var(--glow-accent);
}

/* ══ Rozetler ═════════════════════════════════════════════════════ */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 0 var(--s2);
  border-radius: 7px;
  font-size: 0.69rem;
  font-weight: 650;
  letter-spacing: 0.01em;
  background: var(--line);
  color: var(--text-mid);
  white-space: nowrap;
}
.badge svg { width: 12px; height: 12px; }
.badge--dc     { background: rgba(0, 122, 255, 0.11); color: var(--dc); }
.badge--ac     { background: rgba(124, 92, 255, 0.11); color: var(--ac); }
.badge--power  { background: var(--accent-soft); color: var(--accent); }
.badge--green  { background: rgba(0, 168, 107, 0.11); color: var(--ok); }
.badge--soft   { background: transparent; border: 1px solid var(--line); color: var(--text-dim); }
.badge--approx { background: var(--warn-soft); color: var(--warn); }
.badge--radar  { background: var(--danger-soft); color: var(--danger); }

/* ══ İstasyon kartı ═══════════════════════════════════════════════ */

.stations { display: flex; flex-direction: column; gap: var(--s2); }

.station {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: var(--s3);
  align-items: center;
  padding: var(--s3);
  border-radius: var(--r-md);
  background: var(--surface-hi);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease),
              background var(--dur-fast) var(--ease);
}
.station:hover   { background: var(--surface-hover); }
.station:active  { transform: scale(0.985); }
.station.is-active { border-color: var(--accent); background: var(--accent-soft); }

/* Marka madalyonu — haritadaki işaretçiyle aynı dili konuşuyor */
.station__logo {
  width: 42px; height: 42px;
  border-radius: var(--r-sm);
  display: grid; place-items: center;
  background: #fff;
  border: 1px solid var(--line);
  overflow: hidden;
  position: relative;
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
}
.station__logo img { width: 74%; height: 74%; object-fit: contain; }
/* Güç sınıfını anlatan alt şerit */
.station__logo::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: var(--pw, var(--accent));
}

.station__main { min-width: 0; }
.station__name {
  font-size: 0.92rem;
  font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.station__meta {
  margin-top: 2px;
  font-size: 0.74rem; color: var(--text-dim);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.station__tags { display: flex; gap: 4px; margin-top: 6px; flex-wrap: wrap; }

.station__dist { text-align: right; }
.station__dist b     { display: block; font-size: 0.92rem; color: var(--accent); }
.station__dist small { color: var(--text-dim); font-size: 0.66rem; }

/* ══ Boş durum ════════════════════════════════════════════════════ */

.empty {
  padding: var(--s10) var(--s4);
  text-align: center;
  color: var(--text-dim);
  display: flex; flex-direction: column; gap: var(--s3); align-items: center;
  font-size: 0.86rem;
}
.empty__ico { color: var(--text-dim); opacity: 0.5; }

.skeleton {
  height: 66px;
  border-radius: var(--r-md);
  background: linear-gradient(100deg,
    var(--surface-hi) 30%, rgba(255, 255, 255, 0.05) 50%, var(--surface-hi) 70%);
  background-size: 240% 100%;
  animation: shimmer 1.3s linear infinite;
}
@keyframes shimmer {
  from { background-position: 140% 0; }
  to   { background-position: -40% 0; }
}

/* ══ Bildirim ═════════════════════════════════════════════════════ */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tabbar-h) + var(--safe-b) + var(--s6));
  transform: translate(-50%, 12px);
  z-index: var(--z-toast);
  max-width: min(92vw, 420px);
  padding: var(--s3) var(--s5);
  border-radius: var(--r-full);
  background: var(--surface-solid);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-lg);
  font-size: 0.84rem;
  text-align: center;
  opacity: 0;
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease-out);
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.toast.is-error   { border-color: rgba(239, 68, 68, 0.5); color: #fca5a5; }

body.is-navigating .toast { bottom: calc(var(--safe-b) + 190px); }

@media (min-width: 1024px) {
  .toast { bottom: var(--s6); left: calc(50% + var(--sidebar-w) / 2); }
}

/* Bağlantı da buton gibi görünebilmeli (izin kapısındaki https bağlantısı) */
a.btn { text-decoration: none; }

/* ══ Arama önerileri ══════════════════════════════════════════════
   Arama kutusunun hemen altında açılan kısa liste. En fazla altı
   öneri: harita üstünde daha uzun bir liste ekranı kaplıyor ve
   seçimi zorlaştırıyor. */

.suggest {
  position: absolute;
  top: calc(100% + var(--s2));
  left: 0; right: 0;
  z-index: 5;
  padding: var(--s2);
  border-radius: var(--r-lg);
  background: var(--surface-solid);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  animation: suggest-in var(--dur-fast) var(--ease-out) both;
  max-height: 60vh;
  overflow-y: auto;
  overscroll-behavior: contain;
}
@keyframes suggest-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: none; }
}

.suggest__item {
  display: flex;
  align-items: center;
  gap: var(--s3);
  width: 100%;
  padding: var(--s2);
  border-radius: var(--r-md);
  text-align: left;
  transition: background var(--dur-fast) var(--ease);
}
.suggest__item:hover,
.suggest__item.is-active { background: var(--surface-hi); }
.suggest__item:active { background: var(--surface-hover); }

.suggest__logo {
  width: 38px; height: 38px;
  flex: none;
  border-radius: var(--r-sm);
  display: grid; place-items: center;
  background: #fff;
  border: 1px solid var(--line);
  overflow: hidden;
  position: relative;
  font-weight: 700;
  font-size: 0.9rem;
  color: #fff;
}
.suggest__logo img { width: 74%; height: 74%; object-fit: contain; }
.suggest__logo::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: var(--pw, var(--accent));
}

/* Yer önerisi istasyondan ayrışsın diye yuvarlak ve mavi */
.suggest__pin {
  width: 38px; height: 38px;
  flex: none;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(0, 122, 255, 0.1);
  color: var(--accent-2);
}

.suggest__main { flex: 1; min-width: 0; }
.suggest__name {
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.suggest__sub {
  font-size: 0.74rem;
  color: var(--text-dim);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-top: 1px;
}

.suggest__dist {
  flex: none;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
}
.suggest__chev { flex: none; color: var(--text-dim); }
