/* Panel her zaman DOM'da; yalnizca acikken gorunur (mobilde tam ekran sheet,
   masaustunde arama alaninin altina ankorlu dropdown — bkz. asagidaki
   ".-desktop" kurallari ve app.blade.php script'indeki positionDesktop()). */
.mdest-sheet { display: none; }

/* --- Icerik gorselleri: mobil ve masaustu ortak (konumlama disinda) --- */
.mdest-handle {
    width: 40px; height: 4px;
    background: #d8d8d8;
    border-radius: 2px;
    margin: 8px auto 0;
    flex: 0 0 auto;
}

.mdest-head {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px 8px;
}
.mdest-back {
    background: none; border: 0; padding: 4px 6px;
    color: #1a1a1a; line-height: 0; cursor: pointer;
}
.mdest-head__title {
    flex: 1;
    text-align: center;
    font-size: 17px;
    font-weight: 700;
    color: #14274a;
    /* Sol oka gore optik ortalama */
    margin-right: 34px;
}

.mdest-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 4px 16px calc(20px + env(safe-area-inset-bottom, 0px));
}

.mdest-input {
    width: 100%;
    height: 48px;
    border: 1px solid #dfe3ea;
    border-radius: 10px;
    padding: 0 14px;
    font-size: 15px;
    color: #14274a;
    background: #fff;
    outline: none;
}
.mdest-input::placeholder { color: #9aa4b2; }
.mdest-input:focus { border-color: var(--ot-primary, #eb662b); }

.mdest-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #eaf2fe;
    color: #1a5fd0;
    border: 0;
    border-radius: 8px;
    padding: 9px 14px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
    cursor: pointer;
    text-decoration: none;
    text-align: left;
}
.mdest-chip:active { background: #dbe8fd; }
.mdest-near { margin-top: 12px; }

/* En son aramalar: her zaman en fazla 3 kayit (RECENT_MAX), tek satirda yan
   yana — 3 esit sutunlu grid ile 2. satira inmeleri engelleniyor; uzun
   isimler tasmasin diye metin kesilip "..." ile gosteriliyor. */
#mdestRecent {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
#mdestRecent .mdest-chip {
    width: 100%;
    overflow: hidden;
}
#mdestRecent .mdest-chip span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
#mdestRecent .mdest-chip i,
#mdestRecent .mdest-chip .mdest-ico { flex: 0 0 auto; font-size: 14px; }

.mdest-section { margin-top: 16px; }
.mdest-section__title {
    font-size: 16px;
    font-weight: 700;
    color: #14274a;
    margin-bottom: 4px;
}
.mdest-chips { display: flex; flex-wrap: wrap; gap: 10px; }

/* Sonuc listesi */
.mdest-results { margin-top: 8px; }
.mdest-group__title {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #8a93a3;
    padding: 12px 2px 2px;
}
.mdest-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    background: none;
    border: 0;
    border-bottom: 1px solid #f1f3f6;
    padding: 9px 2px;
    text-align: left;
    font-size: 15px;
    color: #14274a;
    cursor: pointer;
}
.mdest-item:active { background: #f7f9fc; }
/* Tema, button:hover için çok yüksek özgüllükte turuncu gradyan/gölge/yukarı kayma uyguluyor; arama listesinde
   (destinasyon/tesis seçenekleri) sade, modern bir hover kullanılır. Özgüllük bilerek yüksek tutuldu. */
html body .mdest-sheet .mdest-item.mdest-item.mdest-item:hover,
html body .mdest-sheet .mdest-item.mdest-item.mdest-item:focus-visible {
    background: #f4f6fb !important;
    color: #14274a !important;
    border-color: #f1f3f6 !important;
    box-shadow: none !important;
    transform: none !important;
    border-radius: 10px;
}
html body .mdest-sheet .mdest-item.mdest-item.mdest-item:hover i,
html body .mdest-sheet .mdest-item.mdest-item.mdest-item:hover .mdest-ico { color: #eb662b !important; }
html body .mdest-sheet .mdest-chip.mdest-chip.mdest-chip:hover {
    background: #eaf1fe !important;
    color: #14274a !important;
    border-color: transparent !important;
    box-shadow: none !important;
    transform: none !important;
}
.mdest-item i,
.mdest-item .mdest-ico { color: #8a93a3; font-size: 17px; flex: 0 0 auto; }
.mdest-empty { padding: 24px 2px; color: #8a93a3; font-size: 14px; }
.mdest-hint { padding: 4px 2px 0; color: #8a93a3; font-size: 13px; }

/* --- Mobil: tam ekran alttan acilan sheet --- */
@media (max-width: 767px) {
    /* Panel acikken eski oneri listesi ve alt menu gorunmesin */
    #search-suggestions { display: none !important; }

    body.mdest-open { overflow: hidden !important; }
    body.mdest-open .mobile-bottom-nav,
    body.mdest-open .bravo-whatsapp-float,
    body.mdest-open .bravo-phone-float { display: none !important; }

    .mdest-sheet {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 100020;
        background: rgba(0, 0, 0, .35);
        visibility: hidden;
        opacity: 0;
        transition: opacity .22s ease, visibility .22s ease;
    }
    .mdest-sheet.-open { visibility: visible; opacity: 1; }

    .mdest-panel {
        position: absolute;
        left: 0; right: 0; bottom: 0;
        top: 60px;
        background: #fff;
        border-radius: 18px 18px 0 0;
        display: flex;
        flex-direction: column;
        transform: translateY(100%);
        transition: transform .28s cubic-bezier(.4, 0, .2, 1);
        overflow: hidden;
    }
    .mdest-sheet.-open .mdest-panel { transform: translateY(0); }
}

/* --- Masaustu: arama alaninin altina ankorlu dropdown ---
   Konum (top/left/width) script'te positionDesktop() ile inline stil olarak
   yazilir; burada sadece gorunum/kutu kurulmasi var. Mobil "geri" oku ve
   surukleme tutamaci burada gereksiz oldugu icin gizli. */
.mdest-sheet.-desktop {
    display: none;
    position: absolute;
    z-index: 1050;
    background: transparent;
}
.mdest-sheet.-desktop.-open { display: block; }
.mdest-sheet.-desktop .mdest-panel {
    position: static;
    transform: none;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #eef0f4;
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(20, 30, 60, .16);
    max-height: 420px;
    overflow: hidden;
}
.mdest-sheet.-desktop .mdest-handle,
.mdest-sheet.-desktop .mdest-head,
.mdest-sheet.-desktop .mdest-input { display: none; }
.mdest-sheet.-desktop .mdest-body {
    padding: 14px 16px 16px;
}
