/* ==========================================================================
   Haritada İlanlar Sayfası Stilleri (.listings-map-section & .fibi-embedded-map)
   ========================================================================== */

.listings-map-section {
    padding: 50px 0 80px;
    background-color: #fcfcfc;
}

.listings-map-section,
.fibi-embedded-map {
    font-family: "Rubik", sans-serif;
}

/* --------------------------------------------------------------------------
   Filtre Çubuğu (.lm-toolbar)
   -------------------------------------------------------------------------- */
:is(.listings-map-section, .fibi-embedded-map) .lm-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 16px;
}

/* Buton Grupları (.lm-group) */
:is(.listings-map-section, .fibi-embedded-map) .lm-group {
    display: inline-flex;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

:is(.listings-map-section, .fibi-embedded-map) .lm-group .lm-btn {
    background: #ffffff;
    border: none;
    border-right: 1px solid #e5e7eb;
    font-size: 14px;
    font-family: inherit;
    color: #2d2929;
    padding: 8px 14px;
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease;
    outline: none;
}

:is(.listings-map-section, .fibi-embedded-map) .lm-group .lm-btn:last-child {
    border-right: none;
}

:is(.listings-map-section, .fibi-embedded-map) .lm-group .lm-btn:hover:not(.is-active) {
    background-color: #f7f7f7;
}

:is(.listings-map-section, .fibi-embedded-map) .lm-group .lm-btn.is-active {
    background: #2dbe6c;
    color: #ffffff;
    font-weight: 500;
}

/* İl & Fiyat Filtreleri */
:is(.listings-map-section, .fibi-embedded-map) .lm-city-wrapper,
:is(.listings-map-section, .fibi-embedded-map) .lm-price-wrapper {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

:is(.listings-map-section, .fibi-embedded-map) #lmCity,
:is(.listings-map-section, .fibi-embedded-map) #lmDistrict {
    height: 40px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    min-width: 170px;
    padding: 0 12px;
    font-size: 14px;
    font-family: inherit;
    color: #2d2929;
    background-color: #ffffff;
    outline: none;
    cursor: pointer;
    box-sizing: border-box;
}

:is(.listings-map-section, .fibi-embedded-map) #lmCity:focus,
:is(.listings-map-section, .fibi-embedded-map) #lmDistrict:focus {
    border-color: #2dbe6c;
}

:is(.listings-map-section, .fibi-embedded-map) #lmMinPrice,
:is(.listings-map-section, .fibi-embedded-map) #lmMaxPrice {
    height: 40px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    width: 120px;
    padding: 0 12px;
    font-size: 14px;
    font-family: inherit;
    color: #2d2929;
    background-color: #ffffff;
    outline: none;
    box-sizing: border-box;
}

:is(.listings-map-section, .fibi-embedded-map) #lmMinPrice:focus,
:is(.listings-map-section, .fibi-embedded-map) #lmMaxPrice:focus {
    border-color: #2dbe6c;
}

:is(.listings-map-section, .fibi-embedded-map) #lmRooms {
    height: 40px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    min-width: 130px;
    padding: 0 12px;
    font-size: 14px;
    font-family: inherit;
    color: #2d2929;
    background-color: #ffffff;
    outline: none;
    cursor: pointer;
    box-sizing: border-box;
}

:is(.listings-map-section, .fibi-embedded-map) #lmRooms:focus {
    border-color: #2dbe6c;
}

:is(.listings-map-section, .fibi-embedded-map) select:disabled,
:is(.listings-map-section, .fibi-embedded-map) #lmDistrict:disabled {
    opacity: .55;
    cursor: not-allowed;
}

/* İlan Sayacı */
:is(.listings-map-section, .fibi-embedded-map) #lmCount {
    margin-left: auto;
    font-size: 14px;
    color: #93959e;
}

/* --------------------------------------------------------------------------
   İçerik Gövdesi (.lm-body: Harita + Liste)
   -------------------------------------------------------------------------- */
:is(.listings-map-section, .fibi-embedded-map) .lm-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 16px;
}

/* Harita Alanı (.lm-map) */
:is(.listings-map-section, .fibi-embedded-map) .lm-map {
    height: 640px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    z-index: 1;
    overflow: hidden;
}

/* Liste Alanı (.lm-list) */
:is(.listings-map-section, .fibi-embedded-map) .lm-list {
    height: 640px;
    overflow-y: auto;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 10px;
    box-sizing: border-box;
}

/* Boş ve Hata Durumları */
:is(.listings-map-section, .fibi-embedded-map) .lm-empty,
:is(.listings-map-section, .fibi-embedded-map) .lm-error {
    padding: 40px 20px;
    text-align: center;
    font-size: 14px;
    color: #93959e;
    line-height: 1.5;
}

:is(.listings-map-section, .fibi-embedded-map) .lm-error {
    color: #dc2626;
}

/* --------------------------------------------------------------------------
   Liste Kartı (.lm-card)
   -------------------------------------------------------------------------- */
:is(.listings-map-section, .fibi-embedded-map) .lm-card {
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: 12px;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color .15s ease;
    border-bottom: 1px solid #f3f4f6;
}

:is(.listings-map-section, .fibi-embedded-map) .lm-card:last-child {
    border-bottom: none;
}

:is(.listings-map-section, .fibi-embedded-map) .lm-card:hover,
:is(.listings-map-section, .fibi-embedded-map) .lm-card:focus {
    background-color: #f7f7f7;
    outline: none;
}

:is(.listings-map-section, .fibi-embedded-map) .lm-card-img-wrap {
    width: 96px;
    height: 72px;
    border-radius: 6px;
    overflow: hidden;
    background-color: #f3f4f6;
    flex-shrink: 0;
}

:is(.listings-map-section, .fibi-embedded-map) .lm-card-img {
    width: 96px;
    height: 72px;
    object-fit: cover;
    border-radius: 6px;
    display: block;
}

:is(.listings-map-section, .fibi-embedded-map) .lm-card-info {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

:is(.listings-map-section, .fibi-embedded-map) .lm-card-top {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 3px;
}

:is(.listings-map-section, .fibi-embedded-map) .lm-card-title {
    font-size: 14px;
    font-weight: 600;
    color: #2d2929;
    margin: 0 0 3px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

:is(.listings-map-section, .fibi-embedded-map) .lm-card-price {
    font-size: 15px;
    font-weight: 700;
    color: #2dbe6c;
    margin-bottom: 2px;
}

:is(.listings-map-section, .fibi-embedded-map) .lm-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 2px;
}

:is(.listings-map-section, .fibi-embedded-map) .lm-card-loc {
    font-size: 12px;
    color: #93959e;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

:is(.listings-map-section, .fibi-embedded-map) .lm-card-link {
    font-size: 12px;
    font-weight: 600;
    color: #2dbe6c;
    text-decoration: none;
    flex-shrink: 0;
    padding: 2px 6px;
    border-radius: 4px;
    transition: background-color .15s ease, color .15s ease;
}

:is(.listings-map-section, .fibi-embedded-map) .lm-card-link:hover {
    background-color: #eafaf1;
    color: #25a25c;
}

/* --------------------------------------------------------------------------
   Rozetler (.lm-badge)
   -------------------------------------------------------------------------- */
:is(.listings-map-section, .fibi-embedded-map) .lm-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    line-height: 1.2;
}

:is(.listings-map-section, .fibi-embedded-map) .lm-badge--sale {
    background: #dcfce7;
    color: #15803d;
}

:is(.listings-map-section, .fibi-embedded-map) .lm-badge--rent {
    background: #dbeafe;
    color: #1d4ed8;
}

/* --------------------------------------------------------------------------
   Popup Stilleri (.lm-popup & Leaflet Entegrasyonu)
   -------------------------------------------------------------------------- */
:is(.listings-map-section, .fibi-embedded-map) .leaflet-popup-content-wrapper {
    padding: 0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

:is(.listings-map-section, .fibi-embedded-map) .leaflet-popup-content {
    margin: 0;
    width: 240px !important;
    line-height: 1.4;
    font-family: "Rubik", sans-serif;
}

:is(.listings-map-section, .fibi-embedded-map) .lm-popup {
    width: 240px;
    box-sizing: border-box;
}

:is(.listings-map-section, .fibi-embedded-map) .lm-popup-img-wrap {
    width: 100%;
    height: 130px;
    overflow: hidden;
    background: #f3f4f6;
}

:is(.listings-map-section, .fibi-embedded-map) .lm-popup-img {
    width: 100%;
    height: 130px;
    object-fit: cover;
    display: block;
}

:is(.listings-map-section, .fibi-embedded-map) .lm-popup-content {
    padding: 10px 12px 12px;
}

:is(.listings-map-section, .fibi-embedded-map) .lm-popup-title {
    font-size: 15px;
    font-weight: 600;
    color: #2d2929;
    margin: 6px 0 4px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

:is(.listings-map-section, .fibi-embedded-map) .lm-popup-price {
    font-size: 15px;
    font-weight: 700;
    color: #2dbe6c;
    margin-bottom: 4px;
}

:is(.listings-map-section, .fibi-embedded-map) .lm-popup-features {
    font-size: 12px;
    color: #93959e;
    margin-bottom: 4px;
}

:is(.listings-map-section, .fibi-embedded-map) .lm-popup-location {
    font-size: 12px;
    color: #93959e;
    margin-bottom: 6px;
}

:is(.listings-map-section, .fibi-embedded-map) .lm-approx-note {
    font-size: 11px;
    font-style: italic;
    color: #93959e;
    margin-bottom: 8px;
}

:is(.listings-map-section, .fibi-embedded-map) .lm-popup-link {
    display: block;
    text-align: center;
    background: #2dbe6c;
    color: #ffffff !important;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: background-color .15s ease;
}

:is(.listings-map-section, .fibi-embedded-map) .lm-popup-link:hover {
    background: #25a25c;
    color: #ffffff !important;
}

/* --------------------------------------------------------------------------
   Yaklaşık Konum İşaretçisi (.lm-approx)
   -------------------------------------------------------------------------- */
:is(.listings-map-section, .fibi-embedded-map) .fibi-marker.lm-approx,
.fibi-marker.lm-approx {
    border-style: dashed;
    opacity: .85;
}

/* --------------------------------------------------------------------------
   Lejant (.lm-legend)
   -------------------------------------------------------------------------- */
:is(.listings-map-section, .fibi-embedded-map) .lm-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 18px;
    font-size: 13px;
    color: #93959e;
    margin-top: 12px;
}

:is(.listings-map-section, .fibi-embedded-map) .lm-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

:is(.listings-map-section, .fibi-embedded-map) .lm-legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

:is(.listings-map-section, .fibi-embedded-map) .lm-legend-dot--sale {
    background: #16a34a;
}

:is(.listings-map-section, .fibi-embedded-map) .lm-legend-dot--rent {
    background: #2563eb;
}

:is(.listings-map-section, .fibi-embedded-map) .lm-legend-dot--approx {
    background: #ffffff;
    border: 2px dashed #93959e;
}

/* --------------------------------------------------------------------------
   Duyarlı Tasarım (Responsive Media Queries)
   -------------------------------------------------------------------------- */
@media (max-width: 991px) {
    :is(.listings-map-section, .fibi-embedded-map) .lm-body {
        grid-template-columns: 1fr;
    }

    :is(.listings-map-section, .fibi-embedded-map) .lm-map {
        height: 60vh;
        min-height: 360px;
    }

    :is(.listings-map-section, .fibi-embedded-map) .lm-list {
        height: auto;
        max-height: none;
    }
}

@media (max-width: 575px) {
    :is(.listings-map-section, .fibi-embedded-map) .lm-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    :is(.listings-map-section, .fibi-embedded-map) .lm-group {
        width: 100%;
        display: flex;
    }

    :is(.listings-map-section, .fibi-embedded-map) .lm-group .lm-btn {
        flex: 1;
        text-align: center;
        padding: 8px 6px;
    }

    :is(.listings-map-section, .fibi-embedded-map) .lm-city-wrapper,
    :is(.listings-map-section, .fibi-embedded-map) .lm-price-wrapper {
        width: 100%;
    }

    :is(.listings-map-section, .fibi-embedded-map) #lmCity,
    :is(.listings-map-section, .fibi-embedded-map) #lmDistrict,
    :is(.listings-map-section, .fibi-embedded-map) #lmMinPrice,
    :is(.listings-map-section, .fibi-embedded-map) #lmMaxPrice,
    :is(.listings-map-section, .fibi-embedded-map) #lmRooms {
        width: 100%;
        min-width: 100%;
    }

    :is(.listings-map-section, .fibi-embedded-map) #lmCount {
        margin-left: 0;
        text-align: center;
    }
}

/* --------------------------------------------------------------------------
   Satılık / Kiralık Görsel Ayrımı
   -------------------------------------------------------------------------- */
:is(.listings-map-section, .fibi-embedded-map) .lm-card--sale {
    border-left: 4px solid #2dbe6c;
    background: linear-gradient(90deg, rgba(45, 190, 108, .07), #fff 45%);
}

:is(.listings-map-section, .fibi-embedded-map) .lm-card--rent {
    border-left: 4px solid #2563eb;
    background: linear-gradient(90deg, rgba(37, 99, 235, .07), #fff 45%);
}

:is(.listings-map-section, .fibi-embedded-map) .lm-card--sale:hover,
:is(.listings-map-section, .fibi-embedded-map) .lm-card--sale:focus {
    background: linear-gradient(90deg, rgba(45, 190, 108, .12), #f9fafb 45%);
}

:is(.listings-map-section, .fibi-embedded-map) .lm-card--rent:hover,
:is(.listings-map-section, .fibi-embedded-map) .lm-card--rent:focus {
    background: linear-gradient(90deg, rgba(37, 99, 235, .12), #f9fafb 45%);
}

/* Kart & Popup Etiketleri (.lm-card-tag & .lm-card-type) */
:is(.listings-map-section, .fibi-embedded-map) .lm-card-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .6px;
    padding: 3px 9px;
    border-radius: 4px;
    color: #ffffff;
    line-height: 1.2;
}

:is(.listings-map-section, .fibi-embedded-map) .lm-card-tag--sale {
    background-color: #2dbe6c;
}

:is(.listings-map-section, .fibi-embedded-map) .lm-card-tag--rent {
    background-color: #2563eb;
}

:is(.listings-map-section, .fibi-embedded-map) .lm-card-type {
    display: inline-block;
    font-size: 12px;
    color: #93959e;
    margin-left: 6px;
    vertical-align: middle;
}

/* Fiyat Etiketi & Fiyat Periyodu */
:is(.listings-map-section, .fibi-embedded-map) .lm-price-label {
    display: block;
    font-size: 11px;
    color: #93959e;
    text-transform: none;
    margin-top: 6px;
    line-height: 1.2;
}

:is(.listings-map-section, .fibi-embedded-map) .lm-card--rent .lm-card-price {
    color: #1d4ed8;
}

:is(.listings-map-section, .fibi-embedded-map) .lm-price-period {
    font-size: 12px;
    font-weight: 500;
    color: #93959e;
    margin-left: 3px;
}

/* Liste Bölüm Başlıkları (.lm-list-head) */
:is(.listings-map-section, .fibi-embedded-map) .lm-list-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 10px 12px;
    margin: 4px 0 6px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}

:is(.listings-map-section, .fibi-embedded-map) .lm-list-head--sale {
    background-color: #ecfdf3;
    color: #15803d;
}

:is(.listings-map-section, .fibi-embedded-map) .lm-list-head--rent {
    background-color: #eff6ff;
    color: #1d4ed8;
}

:is(.listings-map-section, .fibi-embedded-map) .lm-list-count {
    font-size: 12px;
    font-weight: 600;
    padding: 2px 9px;
    border-radius: 10px;
    background-color: #ffffff;
    color: #2d2929;
}


/* --------------------------------------------------------------------------
   "Bu alanda ara" ve "Daha fazla göster" Düğmeleri
   -------------------------------------------------------------------------- */
:is(.listings-map-section, .fibi-embedded-map) .lm-search-area {
    background-color: #ffffff;
    color: #2dbe6c;
    border: 1px solid #2dbe6c;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    min-height: 40px;
    padding: 8px 18px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color .15s ease, color .15s ease, border-color .15s ease;
    box-sizing: border-box;
    margin-top: 10px;
    margin-right: 10px;
}

:is(.listings-map-section, .fibi-embedded-map) .lm-search-area:hover:not(:disabled) {
    background-color: #eafaf1;
    color: #25a25c;
    border-color: #25a25c;
}

:is(.listings-map-section, .fibi-embedded-map) .lm-search-area:disabled {
    opacity: .7;
    cursor: not-allowed;
    background-color: #f7f7f7;
    color: #93959e;
    border-color: #e5e7eb;
}

:is(.listings-map-section, .fibi-embedded-map) .lm-more {
    width: 100%;
    min-height: 44px;
    background-color: #ffffff;
    color: #2dbe6c;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    padding: 10px 16px;
    margin: 12px 0 6px;
    cursor: pointer;
    text-align: center;
    display: block;
    box-sizing: border-box;
    transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}

:is(.listings-map-section, .fibi-embedded-map) .lm-more:hover,
:is(.listings-map-section, .fibi-embedded-map) .lm-more:focus-visible {
    background-color: #eafaf1;
    color: #25a25c;
    border-color: #2dbe6c;
}

:is(.listings-map-section, .fibi-embedded-map) .lm-search-area:focus-visible,
:is(.listings-map-section, .fibi-embedded-map) .lm-more:focus-visible {
    outline: 2px solid #2dbe6c;
    outline-offset: 2px;
}
