/* public/css/components/district-finder.css
   "İlçemi bul" bölümü (ana sayfa), profil kartı ve ilçe sayfası kaydet çubuğu.
   Yalnızca .ilf-* sınıflarını ve kendi kimliklerini etkiler. */

#navMyDistrictLink[hidden], #mobileMyDistrictLink[hidden], .ilf [hidden], .ilf[hidden], [data-ilce-save][hidden] { display: none !important; }

/* ---------- Ana sayfa bölümü ---------- */
.ilf-section { padding: 4rem 0; border-top: 1px solid color-mix(in srgb, var(--border) 60%, transparent); }
.ilf-wrap { max-width: 80rem; margin: 0 auto; padding: 0 1rem; }
@media (min-width: 640px) { .ilf-wrap { padding: 0 1.5rem; } }
@media (min-width: 1024px) { .ilf-wrap { padding: 0 2rem; } }

.ilf-panel {
  position: relative; overflow: hidden;
  display: grid; gap: 2rem; grid-template-columns: 1fr;
  padding: 1.5rem; border-radius: calc(var(--radius) * 2);
  border: 1px solid var(--border);
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(var(--brand-rgb), .12), transparent 55%),
    radial-gradient(90% 80% at 0% 100%, rgba(14, 165, 233, .08), transparent 60%),
    var(--card);
  box-shadow: var(--shadow-md);
}
@media (min-width: 640px) { .ilf-panel { padding: 2rem; } }
@media (min-width: 960px) { .ilf-panel { grid-template-columns: 1.05fr 1fr; padding: 2.5rem; align-items: center; } }

.ilf-badge {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .7rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--brand); background: rgba(var(--brand-rgb), .1);
  border: 1px solid rgba(var(--brand-rgb), .25); border-radius: 999px; padding: .25rem .65rem;
}
.ilf-title { margin: .85rem 0 .6rem; font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.2rem); line-height: 1.15; font-weight: 800; letter-spacing: -.02em; color: var(--foreground); }
.ilf-title em { font-style: normal; color: var(--brand); }
.ilf-lead { font-size: .95rem; line-height: 1.6; color: var(--muted-foreground); max-width: 38rem; }
.ilf-points { list-style: none; margin: 1.1rem 0 0; padding: 0; display: grid; gap: .55rem; }
.ilf-points li { display: flex; gap: .6rem; align-items: flex-start; font-size: .875rem; color: var(--foreground); line-height: 1.45; }
.ilf-points li span[aria-hidden] { flex: 0 0 auto; width: 1.6rem; height: 1.6rem; display: grid; place-items: center; border-radius: .5rem; background: var(--ilf-soft, var(--muted)); font-size: .85rem; }
.ilf-popular { margin-top: 1.25rem; font-size: .75rem; color: var(--muted-foreground); }
.ilf-popular a { display: inline-block; margin: .3rem .3rem 0 0; padding: .3rem .65rem; border-radius: 999px; border: 1px solid var(--border); background: var(--background); color: var(--foreground); text-decoration: none; transition: border-color var(--dur-fast), color var(--dur-fast); }
.ilf-popular a:hover { border-color: var(--brand); color: var(--brand); }

/* Telefonda "Konumumla ilçemi bul" kutusu başlığın hemen altında görünsün */
@media (max-width: 959px) {
  .ilf-panel { gap: 1.25rem; }
  .ilf-copy { display: contents; }
  .ilf-intro { order: 1; }
  .ilf-finder-col { order: 2; }
  .ilf-more { order: 3; }
}

/* ---------- Bulucu kutusu (ana sayfa + profil) ---------- */
.ilf-box {
  background: var(--background); border: 1px solid var(--border); border-radius: calc(var(--radius) * 1.6);
  padding: 1.25rem; box-shadow: var(--shadow-sm);
}
@media (min-width: 640px) { .ilf-box { padding: 1.5rem; } }
.ilf-box-title { font-size: 1rem; font-weight: 700; color: var(--foreground); margin: 0 0 .25rem; }
.ilf-box-sub { font-size: .8rem; color: var(--muted-foreground); margin: 0 0 1rem; }

.ilf-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 44px; padding: .65rem 1.1rem; border-radius: var(--radius);
  font-size: .875rem; font-weight: 700; text-decoration: none; cursor: pointer;
  border: 1px solid transparent; transition: transform var(--dur-fast) var(--ease-out), background var(--dur-fast), box-shadow var(--dur-fast), opacity var(--dur-fast);
  white-space: nowrap;
}
.ilf-btn:active { transform: translateY(1px); }
.ilf-btn:disabled { opacity: .65; cursor: progress; }
.ilf-btn-primary { background: var(--brand); color: var(--brand-foreground); box-shadow: 0 6px 18px -8px rgba(var(--brand-rgb), .7); }
.ilf-btn-primary:hover { filter: brightness(1.07); }
.ilf-btn-ghost { background: var(--background); color: var(--foreground); border-color: var(--border); }
.ilf-btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.ilf-btn-sm { min-height: 36px; padding: .4rem .8rem; font-size: .8rem; }
.ilf-btn-locate { width: 100%; font-size: .95rem; min-height: 52px; }
.ilf-btn-locate .ilf-loc-ico { font-size: 1.1rem; }
.ilf-btn-locate.is-busy .ilf-loc-ico { animation: ilf-pulse 1s ease-in-out infinite; }
@keyframes ilf-pulse { 50% { transform: scale(1.25); opacity: .6; } }

.ilf-or { display: flex; align-items: center; gap: .75rem; margin: 1rem 0; font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted-foreground); }
.ilf-or::before, .ilf-or::after { content: ""; flex: 1; height: 1px; background: var(--border); }

.ilf-search { position: relative; }
.ilf-search label { display: block; font-size: .75rem; font-weight: 600; color: var(--foreground); margin-bottom: .35rem; }
.ilf-input-wrap { position: relative; }
.ilf-input-wrap > span { position: absolute; left: .85rem; top: 50%; transform: translateY(-50%); color: var(--muted-foreground); pointer-events: none; font-size: .9rem; }
.ilf-input {
  width: 100%; min-height: 46px; padding: .6rem .9rem .6rem 2.3rem; border-radius: var(--radius);
  border: 1px solid var(--input); background: var(--background); color: var(--foreground); font-size: 16px; /* iOS yakınlaştırmasını önler */
}
.ilf-input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(var(--brand-rgb), .18); }
.ilf-results {
  position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: .3rem; list-style: none;
  background: var(--popover); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); max-height: 18rem; overflow-y: auto;
}
.ilf-opt { display: flex; justify-content: space-between; gap: .75rem; align-items: center; padding: .6rem .7rem; border-radius: calc(var(--radius) * .7); cursor: pointer; font-size: .875rem; }
.ilf-opt.is-active, .ilf-opt:hover { background: rgba(var(--brand-rgb), .09); }
.ilf-opt-name { font-weight: 600; color: var(--foreground); }
.ilf-opt-il { font-size: .75rem; color: var(--muted-foreground); }
.ilf-empty { padding: .7rem; font-size: .8rem; color: var(--muted-foreground); }

.ilf-status { margin-top: 1rem; font-size: .85rem; line-height: 1.5; border-radius: var(--radius); padding: .75rem .9rem; border: 1px solid var(--border); background: var(--ilf-soft, var(--muted)); color: var(--foreground); }
.ilf-status.is-warn { background: rgba(245, 158, 11, .1); border-color: rgba(245, 158, 11, .35); }
.ilf-status.is-err { background: rgba(239, 68, 68, .08); border-color: rgba(239, 68, 68, .3); }
.ilf-status.is-ok { background: rgba(16, 185, 129, .08); border-color: rgba(16, 185, 129, .3); }
.ilf-status.is-found { background: rgba(var(--brand-rgb), .06); border-color: rgba(var(--brand-rgb), .3); padding: 1rem; animation: ilf-in var(--dur-base) var(--ease-out); }
@keyframes ilf-in { from { opacity: 0; transform: translateY(4px); } }
.ilf-spin { display: inline-block; width: .9rem; height: .9rem; vertical-align: -2px; margin-right: .35rem; border-radius: 50%; border: 2px solid rgba(var(--brand-rgb), .25); border-top-color: var(--brand); animation: ilf-rot .8s linear infinite; }
@keyframes ilf-rot { to { transform: rotate(360deg); } }

.ilf-found-main { display: flex; flex-direction: column; gap: .1rem; margin-bottom: .8rem; }
.ilf-found-k { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--brand); }
.ilf-found-name { font-size: 1.2rem; font-weight: 800; color: var(--foreground); }
.ilf-found-km { font-size: .75rem; color: var(--muted-foreground); }
.ilf-found-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.ilf-found-actions .ilf-btn { flex: 1 1 12rem; }
.ilf-cancel { margin-top: .65rem; }

.ilf-link { background: none; border: 0; padding: 0; font: inherit; font-size: .8rem; font-weight: 600; color: var(--brand); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.ilf-link:hover { opacity: .8; }
.ilf-chip { display: inline-flex; align-items: center; gap: .3rem; font-size: .8rem; font-weight: 700; color: #059669; background: rgba(16, 185, 129, .1); border: 1px solid rgba(16, 185, 129, .3); padding: .35rem .7rem; border-radius: 999px; }
.dark .ilf-chip { color: #34d399; }
.ilf-muted { font-size: .75rem; color: var(--muted-foreground); }

.ilf-saved { margin-bottom: 1rem; }
.ilf-saved-row { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; padding: .85rem; border-radius: var(--radius); background: rgba(var(--brand-rgb), .07); border: 1px solid rgba(var(--brand-rgb), .25); }
.ilf-pin { font-size: 1.3rem; }
.ilf-saved-txt { flex: 1 1 8rem; display: flex; flex-direction: column; min-width: 0; }
.ilf-saved-k { font-size: .7rem; font-weight: 600; color: var(--muted-foreground); }
.ilf-saved-txt b { font-size: 1rem; color: var(--foreground); }
.ilf-saved-row .ilf-btn { flex: 1 1 auto; }
.ilf-saved-actions { display: flex; gap: .5rem; align-items: center; margin-top: .5rem; font-size: .8rem; color: var(--muted-foreground); }
.ilf-hint { margin: 0; font-size: .8rem; line-height: 1.5; color: var(--muted-foreground); background: var(--ilf-soft, var(--muted)); border-radius: var(--radius); padding: .65rem .8rem; }
.ilf-privacy { margin: .9rem 0 0; font-size: .7rem; color: var(--muted-foreground); line-height: 1.5; }

/* ---------- Profil kartı ---------- */
.ilf-profile { border: 1px solid var(--border); border-radius: calc(var(--radius) * 1.6); background: var(--card); padding: 1.25rem; box-shadow: var(--shadow-xs); }
@media (min-width: 900px) {
  .ilf-profile { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 1.5rem; align-items: start; }
  .ilf-profile .ilf-saved { margin-bottom: 0; }
}
.ilf-profile-head h2 { font-size: 1rem; font-weight: 800; margin: 0 0 .25rem; color: var(--foreground); }
.ilf-profile-head p { font-size: .8rem; color: var(--muted-foreground); margin: 0 0 .9rem; line-height: 1.5; }

/* ---------- İlçe sayfası kaydet çubuğu ---------- */
.ilf-savebar { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-top: .9rem; }

/* ---------- Bildirim paneli (public/js/pwa.js): profil kartı + kayıtlı ilçenin sayfası ---------- */
.ilf-push {
  margin: 1rem 0; padding: 1rem 1.1rem; border-radius: calc(var(--radius) * 1.4);
  border: 1px solid rgba(var(--brand-rgb), .28);
  background: linear-gradient(135deg, rgba(var(--brand-rgb), .08), transparent 70%), var(--background);
}
.ilf-push-head { display: flex; gap: .75rem; align-items: flex-start; }
.ilf-push-ico { flex: 0 0 auto; width: 2.2rem; height: 2.2rem; display: grid; place-items: center; border-radius: .65rem; background: rgba(var(--brand-rgb), .12); font-size: 1.05rem; }
.ilf-push-head > div > b:first-child { display: block; font-size: .95rem; color: var(--foreground); }
.ilf-push-head p { margin: .3rem 0 0; font-size: .82rem; line-height: 1.5; color: var(--muted-foreground); }
.ilf-push-head .ilf-chip { margin-right: .35rem; }
.ilf-push-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .6rem; margin-top: .85rem; }
.ilf-push-mode { display: flex; flex-direction: column; gap: .25rem; flex: 1 1 15rem; min-width: 0; }
.ilf-push-mode span { font-size: .72rem; font-weight: 600; color: var(--foreground); }
.ilf-push-mode select {
  width: 100%; min-height: 36px; padding: .35rem .6rem; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--background); color: var(--foreground); font-size: .8rem;
}
.ilf-push-msg { margin: .65rem 0 0; font-size: .8rem; color: var(--brand); }

/* ---------- Kayıtlı ilçe listesi (profil + kurulum sayfası) ---------- */
.ilf-mylist { display: grid; gap: .55rem; }
.ilf-mylist-row { flex-wrap: wrap; }
.ilf-mylist-act { display: flex; align-items: center; gap: .75rem; margin-left: auto; }
.ilf-mylist-act .ilf-btn { min-height: 34px; }

/* ---------- İlçe sayfası: ilçelerim arasında geçiş ---------- */
.ilf-switch { display: flex; align-items: center; gap: .6rem; margin: 0 0 .9rem; min-width: 0; }
.ilf-switch-k { flex: 0 0 auto; font-size: .7rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted-foreground, #64748b); }
.ilf-switch-row { display: flex; gap: .45rem; overflow-x: auto; scrollbar-width: none; padding: 2px; min-width: 0; -webkit-overflow-scrolling: touch; }
.ilf-switch-row::-webkit-scrollbar { display: none; }
.ilf-switch-chip {
  flex: 0 0 auto; display: inline-flex; align-items: center; min-height: 36px; padding: .35rem .9rem; border-radius: 999px;
  border: 1px solid var(--border, #e2e8f0); background: var(--card, #fff); color: var(--foreground, #0f172a);
  font-size: .85rem; font-weight: 600; text-decoration: none; transition: border-color .15s, color .15s, background .15s;
}
.ilf-switch-chip:hover { border-color: var(--brand, #2563eb); color: var(--brand, #2563eb); }
.ilf-switch-chip.is-current { background: var(--brand, #2563eb); border-color: var(--brand, #2563eb); color: #fff; }
.ilf-switch-add { border-style: dashed; color: var(--muted-foreground, #64748b); }

/* İlçeler arası geçişte yumuşak sayfa geçişi (destekleyen tarayıcılarda) */
@view-transition { navigation: auto; }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }

/* ---------- Bildirim paneli: toplu bildirim anahtarı ---------- */
.ilf-push-bundle { display: flex; align-items: center; gap: .5rem; flex: 1 1 100%; font-size: .8rem; color: var(--foreground); cursor: pointer; }
.ilf-push-bundle input { width: 18px; height: 18px; accent-color: var(--brand); }
.ilf-push-bundle small { color: var(--muted-foreground); }
.ilf-push-when { flex: 1 1 100%; margin: 0; font-size: .76rem; line-height: 1.5; color: var(--muted-foreground); }
.ilf-push-when b { color: var(--foreground); font-weight: 600; }
