/* =====================================================================================================
 *  kingstur-harita.css  —  Otel listesi harita görünümü + mobil filtre çubuğu
 * -----------------------------------------------------------------------------------------------------
 *  1  Değişkenler
 *  2  "Haritada göster" kartı
 *  3  Tam ekran harita kabuğu
 *  4  Harita üstü öğeler (pin, küme, balon)
 *  5  Mobil filtre çubuğu (yatay kaydırmalı çipler)
 *  6  Alttan açılan yarım ekran panel
 *  7  Mobil / RTL / hareket azaltma
 * ===================================================================================================== */

/* ============ 1  DEĞİŞKENLER ============================================================= */

:root {
  --kt-lacivert: #141b4d;
  --kt-kirmizi: #db0406;
  --kt-mavi: #006ce4;
  --kt-metin: #1a1a2e;
  --kt-soluk: #6b7280;
  --kt-cizgi: #e6e8ef;
  --kt-zemin: #ffffff;
  --kt-golge: 0 10px 30px rgba(16, 24, 64, .12);
  --kt-golge-yumusak: 0 2px 10px rgba(16, 24, 64, .08);
  --kt-yuvarlak: 14px;
  --kt-harita-kat: 1080;   /* bootstrap modal 1055; haritanın üstünde kalması gerekiyor */
}

/* ============ 2  "HARİTADA GÖSTER" KARTI ================================================= */

.kt-harita-kart {
  margin: 0 0 16px;
}

.kt-harita-kart__buton {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 0;
  border: 1px solid var(--kt-cizgi);
  border-radius: var(--kt-yuvarlak);
  background: var(--kt-zemin);
  box-shadow: var(--kt-golge-yumusak);
  overflow: hidden;
  cursor: pointer;
  text-align: start;
  transition: box-shadow .18s ease, border-color .18s ease, transform .18s ease;
}

.kt-harita-kart__buton:hover {
  border-color: #cbd3e6;
  box-shadow: var(--kt-golge);
  transform: translateY(-1px);
}

.kt-harita-kart__buton:focus-visible {
  outline: 2px solid var(--kt-mavi);
  outline-offset: 2px;
}

.kt-harita-kart__gorsel {
  position: relative;
  flex: 0 0 auto;
  width: 96px;
  height: 74px;
  overflow: hidden;
}

.kt-harita-kart__gorsel svg {
  display: block;
  width: 100%;
  height: 100%;
}

.kt-harita-kart__pin {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.kt-harita-kart__pin svg {
  width: 26px;
  height: 26px;
  fill: var(--kt-kirmizi);
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .28));
}

.kt-harita-kart__metin {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 14px 10px 0;
  min-width: 0;
}

.kt-harita-kart__metin strong {
  font-size: 15px;
  font-weight: 600;
  color: var(--kt-lacivert);
  line-height: 1.25;
}

.kt-harita-kart__metin small {
  font-size: 12.5px;
  color: var(--kt-soluk);
  line-height: 1.35;
}

/* ============ 3  TAM EKRAN HARİTA KABUĞU ================================================= */

.kt-harita[hidden] { display: none !important; }

.kt-harita {
  position: fixed;
  inset: 0;
  z-index: var(--kt-harita-kat);
  display: flex;
  flex-direction: column;
  background: #eef1f5;
  animation: kt-harita-gir .22s ease;
}

@keyframes kt-harita-gir {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Harita ya da alttan açılan panel açıkken arka sayfanın kaymasını engelle.
   İki ayrı sınıf: biri kapanırken diğerinin kilidini açmasın. */
body.kt-harita-acik,
body.kt-sayfa-acik { overflow: hidden !important; }

.kt-harita__ust {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 16px;
  background: var(--kt-zemin);
  border-bottom: 1px solid var(--kt-cizgi);
  box-shadow: 0 2px 12px rgba(16, 24, 64, .06);
  z-index: 2;
}

.kt-harita__kapat {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px 8px 10px;
  border: 1px solid var(--kt-cizgi);
  border-radius: 999px;
  background: var(--kt-zemin);
  color: var(--kt-metin);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}

.kt-harita__kapat:hover { background: #f4f6fa; border-color: #cbd3e6; }

.kt-harita__kapat svg { width: 15px; height: 15px; fill: currentColor; }

.kt-harita__baslik {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.kt-harita__baslik strong {
  font-size: 16px;
  font-weight: 600;
  color: var(--kt-lacivert);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kt-harita__baslik small { font-size: 12.5px; color: var(--kt-soluk); }

.kt-harita__govde {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
}

.kt-harita__tuval {
  position: absolute;
  inset: 0;
  background: #eef1f5;
}

/* Durum şeridi (yükleniyor / hata / sonuç yok) */
.kt-harita__durum {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 500;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  max-width: calc(100% - 32px);
  padding: 9px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .96);
  box-shadow: var(--kt-golge);
  font-size: 13.5px;
  color: var(--kt-metin);
}

.kt-harita__durum[hidden] { display: none !important; }

.kt-harita__donen {
  width: 15px;
  height: 15px;
  border: 2px solid #dfe3ee;
  border-top-color: var(--kt-kirmizi);
  border-radius: 50%;
  animation: kt-donme .7s linear infinite;
}

.kt-harita__durum.kt-bitti .kt-harita__donen { display: none; }

@keyframes kt-donme { to { transform: rotate(360deg); } }

.kt-harita__not {
  position: absolute;
  left: 14px;
  bottom: 22px;
  z-index: 500;
  max-width: min(340px, calc(100% - 28px));
  padding: 9px 13px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .96);
  box-shadow: var(--kt-golge-yumusak);
  font-size: 12.5px;
  color: var(--kt-soluk);
}

.kt-harita__not[hidden] { display: none !important; }

/* ============ 4  HARİTA ÜSTÜ ÖĞELER ===================================================== */

/* --- fiyat pini --- */
.kt-pin {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--kt-lacivert);
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .3);
  border: 1.5px solid #fff;
  cursor: pointer;
  transition: transform .12s ease, background .12s ease;
}

.kt-pin:hover { transform: scale(1.06); background: #1d2766; }

.kt-pin.kt-pin--secili {
  background: var(--kt-kirmizi);
  transform: scale(1.08);
  z-index: 600 !important;
}

/* gezilmiş oteli soluklaştır (booking gibi) */
.kt-pin.kt-pin--gorulmus { background: #6f7899; }

/* --- küme --- */
.kt-kume {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(20, 27, 77, .92);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .3);
  cursor: pointer;
  transition: transform .12s ease;
}

.kt-kume:hover { transform: scale(1.08); }

.kt-kume--buyuk { width: 48px; height: 48px; font-size: 14px; }

/* Leaflet varsayılan ikon kutusunu sıfırla.
   Kutu 0x0 bırakılıp içindeki etiket kendini noktaya ortalıyor; böylece pin/küme
   koordinatın sol üstüne değil TAM ÜSTÜNE oturuyor. */
.kt-isaret {
  background: none !important;
  border: 0 !important;
  width: 0 !important;
  height: 0 !important;
}

.kt-isaret > span {
  position: absolute;
  left: 0;
  top: 0;
  transform: translate(-50%, -50%);
}

/* --- otel balonu --- */
.kt-balon .leaflet-popup-content-wrapper {
  padding: 0;
  border-radius: var(--kt-yuvarlak);
  box-shadow: var(--kt-golge);
  overflow: hidden;
}

.kt-balon .leaflet-popup-content {
  margin: 0;
  width: 264px !important;
}

.kt-balon .leaflet-popup-tip { box-shadow: var(--kt-golge-yumusak); }

.kt-kart {
  display: block;
  color: inherit;
  text-decoration: none;
}

.kt-kart:hover { color: inherit; text-decoration: none; }

.kt-kart__resim {
  display: block;
  width: 100%;
  height: 128px;
  object-fit: cover;
  background: #eef1f5;
}

.kt-kart__govde { padding: 11px 13px 13px; }

.kt-kart__ad {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--kt-mavi);
  line-height: 1.3;
  margin: 0 0 3px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.kt-kart__yildiz { color: #f0a500; font-size: 11px; letter-spacing: 1px; }

.kt-kart__konum {
  font-size: 12px;
  color: var(--kt-soluk);
  margin: 3px 0 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kt-kart__satir {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  margin-top: 9px;
}

.kt-kart__puan {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--kt-soluk);
}

.kt-kart__puan b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 22px;
  padding: 0 6px;
  border-radius: 6px 6px 6px 2px;
  background: var(--kt-mavi);
  color: #fff;
  font-size: 12px;
}

.kt-kart__fiyat { text-align: end; line-height: 1.15; }

.kt-kart__fiyat del { display: block; font-size: 11.5px; color: #b0b6c8; }

.kt-kart__fiyat strong { font-size: 16px; color: var(--kt-metin); font-weight: 700; }

.kt-kart__iade {
  display: inline-block;
  margin-top: 6px;
  font-size: 11.5px;
  color: #1a7f37;
  font-weight: 500;
}

.kt-kart__buton {
  display: block;
  margin: 10px 13px 13px;
  padding: 9px 12px;
  border-radius: 9px;
  background: var(--kt-lacivert);
  color: #fff !important;
  font-size: 13.5px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
}

.kt-kart__buton:hover { background: #1d2766; color: #fff; }

/* ============ 5  MOBİL FİLTRE ÇUBUĞU ==================================================== */

.kt-fbar { display: none; }   /* varsayılan: masaüstünde yok */

.kt-fbar__kaydir {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 10px 12px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
}

.kt-fbar__kaydir::-webkit-scrollbar { display: none; }

.kt-cip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 14px;
  border: 1px solid var(--kt-cizgi);
  border-radius: 999px;
  background: var(--kt-zemin);
  color: var(--kt-metin);
  font-size: 13.5px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  scroll-snap-align: start;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}

.kt-cip:active { transform: scale(.97); }

.kt-cip svg { width: 14px; height: 14px; fill: currentColor; flex: 0 0 auto; }

/* [hidden] tek basina yetmiyor: display:inline-flex onu ezerdi. */
.kt-cip__sayi[hidden] { display: none !important; }

.kt-cip__sayi {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--kt-kirmizi);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.kt-cip--dolu {
  border-color: var(--kt-lacivert);
  background: var(--kt-lacivert);
  color: #fff;
}

.kt-cip--dolu .kt-cip__sayi { background: #fff; color: var(--kt-lacivert); }

.kt-cip--harita {
  border-color: #cfd6e8;
  background: #f2f5ff;
  color: var(--kt-lacivert);
  font-weight: 600;
}

/* ============ 6  ALTTAN AÇILAN YARIM EKRAN PANEL ======================================== */

.kt-sayfa[hidden] { display: none !important; }

.kt-sayfa {
  position: fixed;
  inset: 0;
  z-index: 1090;
  display: flex;
  align-items: flex-end;
}

.kt-sayfa__perde {
  position: absolute;
  inset: 0;
  background: rgba(11, 16, 38, .48);
  opacity: 0;
  transition: opacity .24s ease;
}

.kt-sayfa.kt-acik .kt-sayfa__perde { opacity: 1; }

.kt-sayfa__panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-height: 82vh;
  min-height: 46vh;
  display: flex;
  flex-direction: column;
  background: var(--kt-zemin);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -8px 40px rgba(11, 16, 38, .26);
  transform: translateY(100%);
  transition: transform .28s cubic-bezier(.32, .72, 0, 1);
  will-change: transform;
}

.kt-sayfa.kt-acik .kt-sayfa__panel { transform: translateY(0); }

.kt-sayfa__tut {
  flex: 0 0 auto;
  padding: 9px 0 3px;
  display: flex;
  justify-content: center;
  cursor: grab;
  touch-action: none;
}

.kt-sayfa__tut::before {
  content: "";
  width: 42px;
  height: 4px;
  border-radius: 999px;
  background: #d7dbe7;
}

.kt-sayfa__ust {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 16px 12px;
  border-bottom: 1px solid var(--kt-cizgi);
}

.kt-sayfa__baslik {
  font-size: 16px;
  font-weight: 600;
  color: var(--kt-lacivert);
  margin: 0;
}

.kt-sayfa__temizle {
  border: 0;
  background: none;
  color: var(--kt-mavi);
  font-size: 13.5px;
  font-weight: 500;
  padding: 6px 2px;
  cursor: pointer;
}

.kt-sayfa__temizle[disabled] { color: #b8bece; cursor: default; }

.kt-sayfa__govde {
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 4px 16px 12px;
  overscroll-behavior: contain;
}

/* panele taşınan filtre bloğu, panelde başlıksız ve tam genişlik dursun */
.kt-sayfa__govde .filter_type { border: 0 !important; padding: 6px 0 0 !important; margin: 0 !important; }
.kt-sayfa__govde .filter_type > h6 { display: none !important; }
.kt-sayfa__govde .filter_type .toggle-link { display: inline-block; margin-top: 6px; }
.kt-sayfa__govde ul.hidden { display: block !important; }   /* panelde hepsi görünsün */

.kt-sayfa__alt {
  flex: 0 0 auto;
  padding: 10px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--kt-cizgi);
  background: var(--kt-zemin);
}

.kt-sayfa__uygula {
  width: 100%;
  height: 48px;
  border: 0;
  border-radius: 12px;
  background: var(--kt-lacivert);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.kt-sayfa__uygula:active { transform: scale(.99); }

/* ============ 7  MOBİL / RTL / HAREKET AZALTMA ========================================== */

@media (max-width: 991.98px) {

  /* çubuk görünür ve sonuçların üstüne yapışır.
     DİKKAT: bootstrap `.row` bir flex kabı; genişlik verilmezse çip satırı
     içeriği kadar uzayıp sayfayı yatayda kaydırıyor. flex tabanını sabitliyoruz. */
  .kt-fbar {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    position: sticky;
    top: 0;
    z-index: 30;
    margin: 0 0 10px;
    background: var(--kt-zemin);
    border-bottom: 1px solid var(--kt-cizgi);
    box-shadow: 0 2px 10px rgba(16, 24, 64, .05);
  }

  .kt-fbar__kaydir { max-width: 100%; }

  /* Eski dikey filtre paneli mobilde tamamen gizlenir; içeriği panellerde kullanılıyor.
     Kutunun tamamını gizliyoruz, yoksa boş beyaz bir şerit kalıyordu.
     `page_key` gizli alanı içeride kalsa da FormData'ya girmeye devam eder;
     alttan açılan panel forma AYRI bir düğüm olarak eklendiği için etkilenmez. */
  body.kt-fbar-aktif #filters_col { display: none !important; }

  /* Mobilde "Haritada göster" kartı yerine çubuktaki "Harita" çipi kullanılıyor;
     ikisi birden durunca aynı işi iki kez yapmış oluyorlar. */
  body.kt-fbar-aktif .kt-harita-kart { display: none !important; }

  .kt-harita__ust { padding: 8px 12px; gap: 10px; }
  .kt-harita__kapat span { display: none; }
  .kt-harita__kapat { padding: 9px; }
  .kt-harita__baslik strong { font-size: 15px; }

  .kt-balon .leaflet-popup-content { width: 232px !important; }
  .kt-kart__resim { height: 112px; }
}

/* Mobilde balon yerine alta yapışan kart daha rahat okunuyor */
@media (max-width: 575.98px) {
  .kt-harita__durum { font-size: 12.5px; padding: 8px 13px; }
  .kt-harita__not { left: 10px; right: 10px; bottom: 14px; max-width: none; }
}

/* --- sağdan sola diller --- */
[dir="rtl"] .kt-harita-kart__metin { padding: 10px 0 10px 14px; }
[dir="rtl"] .kt-harita__kapat { padding: 8px 10px 8px 14px; }
[dir="rtl"] .kt-kart__fiyat { text-align: start; }

/* --- hareketi azalt --- */
@media (prefers-reduced-motion: reduce) {
  .kt-harita,
  .kt-sayfa__panel,
  .kt-sayfa__perde,
  .kt-harita-kart__buton,
  .kt-pin,
  .kt-kume {
    animation: none !important;
    transition: none !important;
  }
}
