/* ── Harita ── */
#map {
    margin: 0;
    padding: 0;
    height: 600px !important;
    max-width: none;
    position: relative;
    display: block;
}

/* ──────────────────────────────────────────────────────────
   Google InfoWindow wrapper sıfırlama

   index.html örneğinden öğrenilen yaklaşım:
   - .gm-style-iw'a sadece konumsal düzeltme yap (top/left: 0)
   - Görsel tasarımı (border-radius, shadow, bg) kendi
     #iw-container'ına bırak
   - Google'ın shadow/background div'lerini CSS ile gizle
────────────────────────────────────────────────────────── */

/* En dış wrapper'a shadow ver — iç elemanların taşması scroll yaratmaz */
.gm-style-iw-a {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
    border-radius: 12px !important;
}

/* Ana wrapper: padding/görsel sıfırla */
.gm-style-iw,
.gm-style-iw-c {
    top: 0 !important;
    left: 0 !important;
    padding: 0 !important;
    border-radius: 12px !important;
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    overflow: hidden !important;
}

/* İçerik alanı: taşmayı gizle, padding sıfırla */
.gm-style-iw-d {
    overflow: hidden !important;
    padding: 0 !important;
    max-height: none !important;
}

/* index.html tekniği: Google'ın arka plan shadow katmanlarını gizle.
   Bu div'ler .gm-style-iw'nin önceki kardeşidir. */
.gm-style-iw-tc,
.gm-style-iw-t::after {
    display: none !important;
}

/* Google'ın varsayılan kapat butonunu gizle */
.gm-ui-hover-effect,
.gm-style-iw-chr {
    display: none !important;
}

/* domready'de JS tarafından eklenen parent class.
   index.html'deki .gm-style-iw-parent yaklaşımı. */
.iw-custom-parent {
    /* İhtiyaç duyulursa ek konumsal ayarlar buraya */
}

/* ──────────────────────────────────────────────────────────
   #iw-container — tüm görsel tasarım burada

   Genişlik JS tarafından inline style ile verilir:
   style="width: Xpx;"
   Bu sayede Google wrapper'ının herhangi bir kuralı
   bizi etkileyemez.
────────────────────────────────────────────────────────── */
#iw-container {
    display: flex;
    flex-direction: column;
    font-family: 'Open Sans', sans-serif;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-sizing: border-box;
}

/* ── Görsel alan ── */
#iw-container .iw-image-wrapper {
    position: relative;
    width: 100%;
    height: 140px;
    overflow: hidden;
    flex-shrink: 0;
}

#iw-container .iw-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Görsel üstü koyu örtü + başlık */
#iw-container .iw-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.06) 0%, rgba(0,0,0,0.55) 100%);
    display: flex;
    align-items: flex-end;
    padding: 12px 14px;
}

#iw-container .iw-title {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
    line-height: 1.3;
}

/* Kendi kapat butonu */
#iw-container .iw-close-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: #444;
    line-height: 1;
    padding: 0;
    transition: background 0.15s;
    z-index: 1;
}

#iw-container .iw-close-btn:hover {
    background: #ffffff;
}

/* ── Meta bilgileri ── */
#iw-container .iw-meta {
    padding: 12px 14px 6px;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

#iw-container .iw-meta-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 12.5px;
    color: #555555;
    line-height: 1.5;
}

#iw-container .iw-meta-row svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    margin-top: 2px;
    stroke: #0071dc;
}

#iw-container .iw-meta-row strong {
    color: #222222;
    font-weight: 600;
}

/* ── Topla butonu ── */
#iw-container .iw-footer {
    padding: 10px 14px 14px;
}

#iw-container .iw-btn {
    display: block;
    width: 100%;
    padding: 9px;
    background: #0071dc;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s;
    box-sizing: border-box;
}

#iw-container .iw-btn:hover {
    background: #005bb5;
}

/* ── Küçük ekran: iç elemanları küçült ──
   Container genişliği zaten JS tarafından küçültülüyor. */
@media (max-width: 480px) {
    #iw-container .iw-image-wrapper {
        height: 110px;
    }
    #iw-container .iw-title {
        font-size: 14px;
    }
    #iw-container .iw-meta-row {
        font-size: 11.5px;
    }
    #iw-container .iw-meta {
        padding: 10px 12px 4px;
    }
    #iw-container .iw-footer {
        padding: 8px 12px 12px;
    }
}

/* ── Autocomplete dropdown ── */
.pac-container {
    z-index: 9999 !important;
}
