/*
 * OTEL LİSTESİ HARİTASI — görünüm  [20.10.2026 · patron talebi]
 *
 * 🔴 TASARIM KARARI (20.10, ilk deneme geri alındı):
 * Harita ÖNCE listenin yanına, grid'in içine konmuştu. Liste 3 kolondan 2'ye
 * düşünce otel kartının kendi 12'li ızgarası sıkıştı ve fiyat "₺3 2.9 00" diye
 * alt alta kırıldı. Ayrıca genel listede oteller İzmir'den Dubai'ye dağınık
 * olduğu için harita yarı dünyayı gösteriyordu.
 *
 * Şimdiki hâli: harita TAM EKRAN AYRI KATMAN. Liste sayfasının düzenine hiç
 * dokunmaz — solda kompakt otel kartları, sağda büyük harita.
 */

/* Katman kapalıyken sayfada hiçbir iz bırakmaz. */
#ts-harita-kolon { display: none; }

#ts-harita-kolon.ts-acik {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 100001;          /* site yükleme katmanı 100000 */
    background: #fff;
}

body.ts-hrt-mobil-acik { overflow: hidden; }

.ts-harita-sarmal {
    height: 100%;
    display: grid;
    grid-template-rows: auto 1fr;
}

/* --- üst şerit --- */
/* 🔴 z-index ŞART: harita kütüphanesinin iç katmanları yüksek z-index taşıyor.
   Şeride ve sol panele yığın sırası verilmezse harita İKİSİNİN DE ÜSTÜNE biniyor:
   "Listeye dön" düğmesi kayboluyor, kompakt kartların yarısı kırpılıyor. */
.ts-harita-ust {
    position: relative;
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 16px;
    border-bottom: 1px solid #e8eef6;
    background: #fff;
    box-shadow: 0 2px 12px -8px rgba(16, 29, 51, .4);
}

.ts-harita-baslik {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.ts-harita-baslik i { color: #0057b8; }
#ts-harita-bilgi {
    font-size: 13.5px;
    color: #334155;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#ts-harita-kapat {
    flex: 0 0 auto;
    border: 0;
    background: #0057b8;
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    padding: 8px 16px;
    border-radius: 9px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 7px;
}
#ts-harita-kapat:hover { background: #00458f; }

/* --- gövde: kart şeridi + harita --- */
.ts-harita-govde {
    display: grid;
    grid-template-columns: 384px 1fr;
    min-height: 0;
    overflow: hidden;
}

#ts-harita-liste {
    position: relative;
    z-index: 500;              /* bkz. .ts-harita-ust — Leaflet panelleri 400 */
    overflow-y: auto;
    border-right: 1px solid #e8eef6;
    background: #f7f9fc;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#ts-harita {
    position: relative;
    z-index: 1;
    min-height: 0;
    height: 100%;
    overflow: hidden;          /* Leaflet kendi alanının dışına taşmasın */
}

/* Oteller çok dağınıkken çıkan bilgi şeridi (harita yarı dünyayı gösteriyorsa). */
#ts-harita-uyari {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 18px;
    z-index: 600;              /* Leaflet panelleri 400 */
    max-width: min(560px, calc(100% - 32px));
    background: rgba(15, 27, 45, .92);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.45;
    padding: 10px 16px;
    border-radius: 10px;
    box-shadow: 0 10px 26px -14px rgba(0, 0, 0, .7);
}
#ts-harita-uyari i { color: #feba02; margin-right: 6px; }
#ts-harita-hepsi {
    margin-left: 8px;
    border: 0;
    background: #feba02;
    color: #0f1b2d;
    font-weight: 800;
    font-size: 12.5px;
    padding: 5px 12px;
    border-radius: 7px;
    cursor: pointer;
}
#ts-harita-hepsi:hover { background: #ffcf3f; }

/* --- katmandaki kompakt otel kartı --- */
.ts-hk {
    display: flex;
    gap: 11px;
    background: #fff;
    border: 1.5px solid #e8eef6;
    border-radius: 12px;
    padding: 9px;
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.ts-hk:hover { border-color: #0057b8; box-shadow: 0 8px 20px -14px rgba(16, 29, 51, .5); }
.ts-hk.ts-hk-secili {
    border-color: #0057b8;
    box-shadow: 0 0 0 3px rgba(0, 87, 184, .15);
}

.ts-hk-gorsel {
    flex: 0 0 92px;
    width: 92px;
    height: 76px;
    border-radius: 9px;
    object-fit: cover;
    background: #e9eef5;
}
.ts-hk-govde { min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.ts-hk-yildiz { color: #feba02; font-size: 11px; line-height: 1; margin-bottom: 3px; }
.ts-hk-ad {
    font-weight: 700;
    font-size: 13.5px;
    line-height: 1.25;
    color: #0f1b2d;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.ts-hk-fiyat { font-weight: 800; font-size: 14px; color: #0057b8; margin-top: 4px; }
.ts-hk-fiyat span { font-weight: 500; font-size: 11px; color: #64748b; }

#ts-harita-liste .ts-hk-bos {
    padding: 22px 14px;
    text-align: center;
    color: #64748b;
    font-size: 13px;
    line-height: 1.6;
}

/* --- mobil --- */
/* 🔴 ALT BAR ÇAKIŞMASI [21.10.2026]
   Mobil alt bar (.tps-mbn / .tps-mbng) position:fixed + z-index:2147483000 ile
   duruyor; harita katmanı (z-index 100001) onun ALTINDA kalıyor, kart şeridi
   barın arkasına giriyordu. Sitede hamburger menü için zaten kullanılan desenin
   aynısı: katman açıkken alt bar GİZLENİR, kapanınca geri gelir.
   (body.ts-hrt-mobil-acik sınıfını JS ekleyip kaldırıyor.) */
body.ts-hrt-mobil-acik .tps-mbn,
body.ts-hrt-mobil-acik .tps-mbng { display: none !important; }

@media (max-width: 767px) {
    /* Alt bar body'ye 80px padding ekliyor; tam ekran katmanda o boşluk istenmez. */
    body.ts-hrt-mobil-acik { padding-bottom: 0 !important; }
}

/* --- mobil: harita üstte, kartlar altta yatay şerit --- */
@media (max-width: 900px) {
    .ts-harita-govde {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr auto;
    }
    #ts-harita { order: 1; }
    #ts-harita-liste {
        order: 2;
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        border-right: 0;
        border-top: 1px solid #e8eef6;
        max-height: 142px;
        padding: 10px 10px calc(10px + env(safe-area-inset-bottom, 0px));
        scroll-snap-type: x mandatory;
    }
    .ts-hk { flex: 0 0 268px; scroll-snap-align: start; }
}

/* --- "haritada göster" düğmesi --- */
#ts-harita-dugme {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border: 2px solid #0057b8;
    border-radius: 10px;
    background: #fff;
    color: #0057b8;
    font-weight: 700;
    font-size: 13.5px;
    cursor: pointer;
    transition: transform .18s ease, background-color .18s ease, color .18s ease;
}
#ts-harita-dugme:hover { background: #0057b8; color: #fff; transform: translateY(-1px); }
#ts-harita-dugme:active { transform: translateY(0) scale(.97); }

/* --- fiyat etiketi (Google AdvancedMarkerElement içeriği) ---
   🔴 18.11.2026: Leaflet'ten geçildi. Eskiden kutu Leaflet'in "kalıcı
   tooltip"iydi ve genişliğini Leaflet belirliyordu; üç ayrı yöntem denenip
   bırakılmıştı. Google doğrudan DOM elemanı aldığı için kutu kendi içeriğine
   göre genişliyor — max-content yine de bırakıldı, dış bir kural kutuyu
   daraltmaya kalkarsa diye. */
.ts-fiyat {
    /* 🔴 GENİŞLİK İÇERİKTEN ZORLANIR.
       Teşhis şöyle dedi: kutu 26px, yani yalnız iç boşluk + kenarlık kadar —
       metnin genişliği hiç sayılmamış, fiyat dışarı taşıyordu. Bir yerdeki
       kural kutuyu sıfır genişliğe düşürüyor; max-content onu kesin olarak
       metnin doğal genişliğine sabitler. */
    width: max-content !important;
    min-width: max-content !important;
    max-width: none !important;
    margin: 0;
    padding: 7px 12px;
    background: #0057b8;
    color: #fff;
    border: 1.5px solid #fff;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -.2px;
    white-space: nowrap;
    box-shadow: 0 3px 10px rgba(16, 29, 51, .35);
    transition: background-color .14s ease, transform .14s ease, box-shadow .14s ease;
    cursor: pointer;
}
/* Eski Leaflet ok/üçgen çıkıntısı kalmadı; kural yine de zararsız durur. */
.ts-fiyat::before { display: none; }

.ts-fiyat:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 16px rgba(16, 29, 51, .45);
}

/* Seçili: ikincil marka rengi (rakipte turuncu, bizde sarı). */
.ts-fiyat-secili {
    background: #feba02;
    color: #0f1b2d;
    border-color: #fff;
    transform: scale(1.1);
    box-shadow: 0 6px 18px rgba(254, 186, 2, .55);
}

/* Fiyatı olmayan otel: aynı kutu, sakin ton. */
.ts-fiyat-sade { background: #64748b; font-weight: 700; }
.ts-fiyat-sade.ts-fiyat-secili { background: #feba02; color: #0f1b2d; }

/* 🔴 Google'ın InfoWindow kabuğu — iç boşluğu biz yönetiyoruz.
   Varsayılan kabuk dolgu ve kapatma düğmesi için yer bırakıyor; balonumuz
   kendi görselini kenara dayalı bastığı için sıfırlanır. */
.gm-style .gm-style-iw-c {
    padding: 0 !important;
    border-radius: 12px;
    overflow: hidden;
    max-width: none !important;
}
.gm-style .gm-style-iw-d { overflow: hidden !important; padding: 0 !important; max-height: none !important; }
/* Google balonun altına küçük bir ok çiziyor; kartımızın köşeleri yuvarlak
   olduğu için ok kalsın, gölgesi karta değmesin. */
.gm-style .gm-style-iw-tc::after { background: #fff; }

/* Kapat düğmesi kartın İÇİNDE, SAĞDA, yuvarlak  [11.11.2026]
   🔴 Bu görünüm Leaflet balonu için yazılmıştı (.leaflet-popup-close-button);
   Google'a geçerken aynısı korundu — düğme kartın dışına taşıyordu. */
.gm-style .gm-style-iw-c button.gm-ui-hover-effect,
.gm-style .gm-style-iw-chr button.gm-ui-hover-effect,
.gm-style .gm-style-iw-c > button[aria-label] {
    position: absolute !important; top: 8px !important; right: 8px !important; left: auto !important;
    width: 24px !important; height: 24px !important; padding: 0 !important; margin: 0 !important;
    display: flex !important; align-items: center; justify-content: center;
    border-radius: 50%; background: rgba(255, 255, 255, .93) !important; color: #0F1B2D !important;
    opacity: 1 !important;
    box-shadow: 0 1px 5px rgba(0, 20, 50, .3); z-index: 5;
}
.gm-style .gm-style-iw-c button.gm-ui-hover-effect:hover,
.gm-style .gm-style-iw-c > button[aria-label]:hover { background: #fff !important; }
/* Google düğmenin içine kendi çarpı görselini koyuyor; ölçüsünü sabitle. */
.gm-style .gm-style-iw-c button.gm-ui-hover-effect > span,
.gm-style .gm-style-iw-c > button[aria-label] > span {
    width: 14px !important; height: 14px !important; margin: 0 !important;
}
/* Yeni sürümlerde başlık şeridi balonun üstünde yer kaplıyor — kartımız
   kendi başlığını bastığı için gizlenir. */
.gm-style .gm-style-iw-chr { position: absolute; top: 0; right: 0; height: 0; min-height: 0; }

/* --- pin balonu --- */
.ts-hrt-popup { width: 212px; }
.ts-hrt-popup img { width: 100%; height: 108px; object-fit: cover; display: block; }
.ts-hrt-popup-govde { padding: 9px 11px 11px; }
.ts-hrt-popup-yildiz { color: #feba02; font-size: 12px; line-height: 1; margin-bottom: 3px; }
.ts-hrt-popup-ad {
    font-weight: 700;
    font-size: 13.5px;
    line-height: 1.3;
    color: #0f1b2d;
    margin-bottom: 5px;
}
.ts-hrt-popup-fiyat { font-weight: 800; font-size: 15px; color: #0057b8; margin-bottom: 8px; }
.ts-hrt-popup-btn {
    display: block;
    text-align: center;
    background: #0057b8;
    color: #fff !important;
    font-weight: 700;
    font-size: 12.5px;
    padding: 7px 0;
    border-radius: 8px;
    text-decoration: none !important;
}



/*
 | SEYRELTİLMİŞ ETİKET — NOKTA  [21.10.2026]
 | Aynı ızgara hücresine düşen ikinci ve sonraki oteller küçük noktaya iner;
 | yakınlaştırınca etiketleri geri açılır. Kümeleme yerine kullanılan yöntem.
 */
.ts-fiyat.ts-fiyat-nokta {
    /* Nokta etiketin ARKASINDA kalır; kenarına taşsa bile kutuyu kirletmez. */
    z-index: 1 !important;
    width: 12px !important;
    min-width: 0 !important;
    height: 12px;
    padding: 0 !important;
    border-radius: 50%;
    font-size: 0;
    line-height: 0;
    overflow: hidden;
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .35);
}

.ts-fiyat.ts-fiyat-nokta:hover {
    width: 15px !important;
    height: 15px;
}
