/* ===========================================================================
   Arama arayüzü — başlıktaki arama penceresi ve arama sonuçları sayfası
   ---------------------------------------------------------------------------
   Pencere `layout/template.php` içinde tanımlı ve her sayfada var; bu dosya
   da oradan yüklendiği için panel dâhil tüm sayfalarda geçerli.
   Kurallar `#listing-map-modal` altına kapsanmıştır — sayfaların kendi
   arama alanlarıyla (ör. /categories) çakışmaz.
   =========================================================================== */

:root {
    --su-panel: #121414;
    --su-line: #1f2222;
    --su-text: #e9eded;
    --su-muted: #9aa1a1;
    --su-dim: #767d7d;
    --su-accent: #f37a52;
}

/* ---------------------------------------------------------------------------
   Başlıktaki arama penceresi
   --------------------------------------------------------------------------- */
/* Arka karartma. DİKKAT: bu öğe `modal-background modal-dismiss` sınıflarını
   birlikte taşır (dışarı tıklayınca kapansın diye). Bu yüzden aşağıdaki
   kapatma DÜĞMESİ kuralları `button.modal-dismiss` ile sınırlandırılmıştır;
   aksi hâlde tam ekran katman 36px'lik bir kutuya dönüşüyor. */
#listing-map-modal .modal-background {
    position: absolute;
    inset: 0;
    width: auto !important;
    height: auto !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: rgba(3, 5, 5, .74);
    -webkit-backdrop-filter: blur(10px) saturate(115%);
    backdrop-filter: blur(10px) saturate(115%);
    cursor: pointer;
}
#listing-map-modal .modal-content {
    width: calc(100% - 2rem);
    max-width: 680px;
    margin: 0 auto;
    overflow: visible;
}
#listing-map-modal .card {
    border-radius: 1.15rem !important;
    border: 1px solid var(--su-line);
    /* Buzlu cam görünüm. */
    background: rgba(16, 19, 19, .82) !important;
    -webkit-backdrop-filter: blur(22px) saturate(150%);
    backdrop-filter: blur(22px) saturate(150%);
    box-shadow: 0 40px 90px -40px rgba(0, 0, 0, .95);
    overflow: hidden;
}
#listing-map-modal .card-header {
    box-shadow: none;
    border-bottom: 1px solid var(--su-line);
    background: rgba(255, 255, 255, .02);
    padding: .35rem .5rem .35rem 0;
}
#listing-map-modal .card-header-title { padding: 1rem 1.25rem; }
#listing-map-modal .card-header-title span {
    color: var(--su-text) !important;
    font-size: .95rem;
    font-weight: 700;
    letter-spacing: -.01em;
}
#listing-map-modal button.modal-dismiss {
    /* Başlık esnek kutusunda daralmasın; yoksa "Kapat" yazısı kırpılıyor. */
    flex: 0 0 auto;
    white-space: nowrap;
    /* main.css `.card-header .modal-dismiss` için 40px sabit genişlik veriyor. */
    width: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    height: 38px;
    margin-right: .75rem;
    padding: 0 .8rem;
    border-radius: 999px;
    /* Kapatılabildiği anlaşılsın diye ince çember yerine dolgulu, yazılı düğme. */
    border: 1px solid rgba(255, 255, 255, .3);
    background: rgba(255, 255, 255, .1);
    color: #fff;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: -.01em;
    cursor: pointer;
    transition: border-color .25s ease, background .25s ease, color .25s ease;
}
#listing-map-modal button.modal-dismiss:hover,
#listing-map-modal button.modal-dismiss:focus-visible {
    border-color: rgba(255, 96, 72, .75);
    background: rgba(255, 96, 72, .2);
    color: #fff;
}
#listing-map-modal button.modal-dismiss:focus-visible { outline: 2px solid var(--su-accent); outline-offset: 2px; }
#listing-map-modal button.modal-dismiss .icon,
#listing-map-modal button.modal-dismiss .icon i,
#listing-map-modal button.modal-dismiss svg {
    width: 16px; height: 16px;
    color: #fff !important;
    stroke: #fff;
}
/* "Kapat" yazısı dar ekranda yer kaplamasın. */
#listing-map-modal .modal-dismiss-text { line-height: 1; }
@media screen and (max-width: 480px) {
    #listing-map-modal button.modal-dismiss { padding: 0; width: 38px; }
    #listing-map-modal .modal-dismiss-text { display: none; }
}
#listing-map-modal .card-content { padding: 1.25rem; }

/* Pencere içindeki arama alanı — ikon girdinin içinde yuvarlak düğme. */
#listing-map-modal .search_field { position: relative; display: block; width: 100%; margin: 0; }
#listing-map-modal .search_frame {
    width: 100%;
    height: 56px;
    padding: 0 68px 0 1.35rem;
    border-radius: 999px;
    border: 1px solid var(--su-line);
    background: rgba(255, 255, 255, .04);
    color: var(--su-text);
    font-size: .95rem;
    -webkit-box-shadow: none !important;
    box-shadow: none;
    transition: border-color .25s ease, box-shadow .25s ease, background .25s ease;
}
#listing-map-modal .search_frame:focus {
    border-color: rgba(243, 122, 82, .6);
    background: rgba(255, 255, 255, .06);
    box-shadow: 0 0 0 3px rgba(243, 122, 82, .12) !important;
    outline: none;
}
#listing-map-modal .search_frame::placeholder { color: #5f6666; }
#listing-map-modal .search_field label {
    position: absolute;
    right: 7px;
    top: 50%;
    transform: translateY(-50%);
    display: block;
    line-height: 0;
}
#listing-map-modal .search_icon {
    width: 42px;
    height: 42px;
    padding: 11px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 50%;
    background: rgba(12, 14, 14, .6);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    cursor: pointer;
    transition: border-color .25s ease, background .25s ease;
}
#listing-map-modal .search_icon:hover { border-color: rgba(243, 122, 82, .7); background: rgba(243, 122, 82, .16); }

/* Kısa ipucu satırı */
#listing-map-modal .su-hint {
    display: flex;
    align-items: center;
    gap: .4rem;
    margin-top: .85rem;
    color: var(--su-dim);
    font-size: .76rem;
}
#listing-map-modal .su-hint-esc {
    margin-left: auto;
    padding-left: .75rem;
    color: var(--su-dim);
    white-space: nowrap;
}
#listing-map-modal .su-hint-esc kbd {
    display: inline-block;
    padding: .1rem .35rem;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: .3rem;
    background: rgba(255, 255, 255, .06);
    color: var(--su-muted);
    font-family: inherit;
    font-size: .68rem;
    font-weight: 700;
    line-height: 1.35;
}
@media screen and (max-width: 600px) { #listing-map-modal .su-hint-esc { display: none; } }
#listing-map-modal .su-hint svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

@media screen and (max-width: 600px) {
    #listing-map-modal .modal-content { width: calc(100% - 1rem); }
    #listing-map-modal .card-header-title { padding: .85rem 1rem; }
    #listing-map-modal .card-content { padding: 1rem; }
}

/* ---------------------------------------------------------------------------
   Arama sonuçları sayfası
   --------------------------------------------------------------------------- */
.sr-form { max-width: 720px; margin: 0 auto 2.25rem; }
.sr-form .search_field { position: relative; display: block; width: 100%; margin: 0; }
.sr-form .search_frame {
    width: 100%;
    height: 58px;
    padding: 0 70px 0 1.4rem;
    border-radius: 999px;
    border: 1px solid var(--su-line);
    background: rgba(255, 255, 255, .035);
    color: var(--su-text);
    font-size: 1rem;
    -webkit-box-shadow: none !important;
    box-shadow: none;
    transition: border-color .25s ease, box-shadow .25s ease, background .25s ease;
}
.sr-form .search_frame:focus {
    border-color: rgba(243, 122, 82, .6);
    background: rgba(255, 255, 255, .055);
    box-shadow: 0 0 0 3px rgba(243, 122, 82, .12) !important;
    outline: none;
}
.sr-form .search_frame::placeholder { color: #5f6666; }
.sr-form .search_field label { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); display: block; line-height: 0; }
.sr-form .search_icon {
    width: 42px; height: 42px; padding: 11px;
    /* Zemin ve kenarlık public-ui.css'teki `.search_field .search_icon`
       kuralından geliyor; buradaki degrade eziliyordu ve iki dosyanın farklı
       düğme tasarladığını gizliyordu. */
    border-radius: 50%;
    cursor: pointer;
    transition: filter .2s ease;
}
.sr-form .search_icon:hover { filter: brightness(1.06); }
/* İkon konturu AÇIK olmak zorunda.
   `#25100a` (neredeyse siyah) burada parlak degrade zeminli bir düğme
   varsayımıyla yazılmıştı. Ama düğmenin zeminini public-ui.css'teki
   `.search_field .search_icon` kazanıyor (aynı özgüllük, daha sonra
   yükleniyor) ve düğme koyu camlı bir daire olarak çiziliyor. Sonuç: daire
   görünüyor, ikon zeminde kayboluyordu. */
.sr-form .search_icon #primary { stroke: #e9eded !important; }
.sr-form .search_icon:hover #primary { stroke: #fff !important; }

/* Sonuç bölümü başlığı */
.sr-section { margin-bottom: 2.5rem; }
.sr-head {
    display: flex;
    align-items: baseline;
    gap: .6rem;
    margin-bottom: 1rem;
}
.sr-title {
    margin: 0;
    color: #fff;
    font-size: clamp(1.15rem, 2vw, 1.45rem);
    font-weight: 800;
    letter-spacing: -.01em;
}
/* Aranan ifade — vurgulu ve marka tonunda.
   Bulma `strong`u #363636 boyuyor; koyu zeminde kontrast 1.62:1'e düşüyor,
   yani kullanıcı ne aradığını okuyamıyordu. */
.pubhead-lead .sr-term { color: #ffbe9c; font-weight: 700; }

.sr-count { color: var(--su-dim); font-size: .74rem; font-weight: 600; white-space: nowrap; }

.sr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 1.25rem; }
.sr-grid--wide { grid-template-columns: repeat(auto-fill, minmax(272px, 1fr)); }
.sr-grid--faces { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }

/* Sonuç yok */
.sr-empty {
    padding: 2.25rem 1.5rem;
    border-radius: .9rem;
    border: 1px dashed var(--su-line);
    background: rgba(255, 255, 255, .015);
    color: var(--su-muted);
    text-align: center;
    font-size: .95rem;
    line-height: 1.6;
}
.sr-empty strong { color: #fff; }

/* Yan sütun — bağlantılar çip biçiminde */
.sr-side { display: grid; gap: 1.75rem; }
.sr-side-title {
    display: flex;
    align-items: center;
    gap: .45rem;
    margin: 0 0 .8rem;
    color: var(--su-text);
    font-size: .95rem;
    font-weight: 700;
}
.sr-side-title svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.sr-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.sr-chip {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    padding: .38rem .75rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .12);
    background: rgba(255, 255, 255, .03);
    color: var(--su-muted) !important;
    font-size: .76rem;
    font-weight: 600;
    line-height: 1.3;
    transition: border-color .25s ease, color .25s ease, background .25s ease;
}
.sr-chip:hover {
    border-color: rgba(243, 122, 82, .55);
    background: rgba(243, 122, 82, .1);
    color: #ffbe9c !important;
}

@media (prefers-reduced-motion: reduce) and (prefers-reduced-motion: no-preference) /* ETKİSİZ: hareket azaltma yok sayılıyor */ {
    #listing-map-modal .modal-dismiss, #listing-map-modal .search_icon,
    .sr-chip, .sr-form .search_icon { transition: none; }
}
