/* arama-spotlight.css — tam ekran komut paleti tarzı site araması (.mhspot) */

.mhspot {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
}

    .mhspot.is-open {
        display: block;
    }

.mhspot__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 12, 14, .55);
    -webkit-backdrop-filter: blur(14px) saturate(1.05);
    backdrop-filter: blur(14px) saturate(1.05);
    animation: mhspot-fade .2s ease;
}

.mhspot__panel {
    position: relative;
    z-index: 1;
    width: min(720px, 92vw);
    max-height: 78vh;
    margin: 12vh auto 0;
    display: flex;
    flex-direction: column;
    background: #1b1c1f;
    border: 1px solid rgba(255, 255, 255, .09);
    border-radius: 18px;
    box-shadow: 0 40px 120px rgba(0, 0, 0, .6);
    overflow: hidden;
    color: #fff;
    animation: mhspot-in .2s cubic-bezier(.2, .7, .2, 1);
}

@keyframes mhspot-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes mhspot-in {
    from { opacity: 0; transform: translateY(-10px) scale(.985); }
    to { opacity: 1; transform: none; }
}

/* Arama satırı */
.mhspot__search {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px;
    border-bottom: 1px solid rgba(255, 255, 255, .07);
    flex: 0 0 auto;
}

.mhspot__mag {
    width: 20px;
    height: 20px;
    color: rgba(255, 255, 255, .5);
    flex: 0 0 auto;
}

.mhspot__input {
    flex: 1;
    min-width: 0;
    background: transparent;
    border: 0;
    outline: 0;
    color: #fff;
    font-size: 20px;
    font-family: var(--font);
}

    .mhspot__input::placeholder { color: rgba(255, 255, 255, .4); }

.mhspot__close {
    flex: 0 0 auto;
    display: inline-grid;
    place-items: center;
    height: 30px;
    padding: 0 4px;
    border-radius: 9px;
    background: transparent;
    border: 0;
    cursor: pointer;
}

    .mhspot__close:hover .mhspot__key { background: rgba(255, 255, 255, .16); color: #fff; }

/* Aramayı temizle (X) — yalnızca yazı varken görünür */
.mhspot__clear {
    flex: 0 0 auto;
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    color: rgba(255, 255, 255, .55);
    background: rgba(255, 255, 255, .08);
    border: 0;
    cursor: pointer;
    transition: background .15s, color .15s;
}

    .mhspot__clear:hover { background: rgba(255, 255, 255, .18); color: #fff; }
    .mhspot__clear svg { width: 14px; height: 14px; }

/* Yükleniyor göstergesi */
.mhspot__spin {
    flex: 0 0 auto;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, .18);
    border-top-color: rgba(255, 255, 255, .75);
    animation: mhspot-spin .6s linear infinite;
}

@keyframes mhspot-spin {
    to { transform: rotate(360deg); }
}

/* Sonuç listesi */
.mhspot__body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 10px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, .2) transparent;
}

    .mhspot__body::-webkit-scrollbar { width: 8px; }
    .mhspot__body::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .16); border-radius: 8px; }

.mhspot__group {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .4);
    padding: 12px 14px 8px;
}

/* Grup başlığındaki "Temizle" bağlantısı (son aramalar) */
.mhspot__gclear {
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
    font: inherit;
    letter-spacing: .1em;
    color: rgba(255, 255, 255, .38);
    transition: color .15s;
}

    .mhspot__gclear:hover { color: rgba(255, 255, 255, .8); }

.mhspot__item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    color: #fff;
    text-decoration: none;
    cursor: pointer;
}

.mhspot__item-tx {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mhspot__item-ad {
    font-size: 15.5px;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

    /* Eşleşen harfler — arka plan yerine renk + kalınlık (satır sakin kalsın) */
    .mhspot__item-ad mark {
        background: transparent;
        color: #fff;
        font-weight: 800;
        text-decoration: underline;
        text-decoration-color: rgba(255, 255, 255, .35);
        text-underline-offset: 3px;
    }

.mhspot__item-alt {
    font-size: 12.5px;
    color: rgba(255, 255, 255, .45);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Satır başındaki küçük ikon (geçmiş / tüm sonuçlar) */
.mhspot__item-ic {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    color: rgba(255, 255, 255, .4);
}

/* --- Araç satırı: küçük görsel + fiyat --- */
.mhspot__thumb {
    flex: 0 0 auto;
    width: 56px;
    height: 42px;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(255, 255, 255, .07);
    display: grid;
    place-items: center;
    color: rgba(255, 255, 255, .3);
}

    .mhspot__thumb img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    .mhspot__thumb svg { width: 22px; height: 22px; }

.mhspot__fiyat {
    flex: 0 0 auto;
    font-size: 14px;
    font-weight: 700;
    color: rgba(255, 255, 255, .92);
    white-space: nowrap;
}

/* --- Yükleniyor iskeleti --- */
.mhspot__skel {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
}

.mhspot__skel-th {
    width: 56px;
    height: 42px;
    border-radius: 8px;
    flex: 0 0 auto;
}

.mhspot__skel-tx {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

    .mhspot__skel-tx b { height: 12px; width: 55%; border-radius: 4px; display: block; }
    .mhspot__skel-tx i { height: 10px; width: 32%; border-radius: 4px; display: block; }

.mhspot__skel-th,
.mhspot__skel-tx b,
.mhspot__skel-tx i {
    background: linear-gradient(90deg, rgba(255,255,255,.06) 25%, rgba(255,255,255,.13) 37%, rgba(255,255,255,.06) 63%);
    background-size: 400% 100%;
    animation: mhspot-shimmer 1.3s ease infinite;
}

@keyframes mhspot-shimmer {
    from { background-position: 100% 50%; }
    to   { background-position: 0 50%; }
}

.mhspot__item-kat {
    flex: 0 0 auto;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .02em;
    color: rgba(255, 255, 255, .38);
}

.mhspot__item-arrow {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity .15s ease, transform .15s ease;
}

.mhspot__item.is-active {
    background: rgba(255, 255, 255, .08);
}

    .mhspot__item.is-active .mhspot__item-kat { color: rgba(255, 255, 255, .55); }

    .mhspot__item.is-active .mhspot__item-arrow {
        opacity: .85;
        transform: none;
    }

.mhspot__empty {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 26px 16px 14px;
    color: rgba(255, 255, 255, .62);
    font-size: 15px;
    text-align: center;
}

    .mhspot__empty strong { color: #fff; font-weight: 700; }
    .mhspot__empty span { font-size: 13px; color: rgba(255, 255, 255, .42); }

/* "Araç listesinde ara" satırı — listenin kapanışı, hafifçe ayrılır */
.mhspot__item--tum .mhspot__item-ad { font-weight: 600; }

/* Alt bilgi çubuğu */
.mhspot__foot {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    border-top: 1px solid rgba(255, 255, 255, .07);
    font-size: 12px;
    color: rgba(255, 255, 255, .45);
}

.mhspot__hints {
    display: inline-flex;
    align-items: center;
    gap: 16px;
}

.mhspot__hint {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.mhspot__key {
    display: inline-grid;
    place-items: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 6px;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .12);
    font-size: 11px;
    line-height: 1;
    color: rgba(255, 255, 255, .7);
}

.mhspot__brand {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

/* --- Mobil: tam ekran değil, kenar boşluklu kart --- */
@media (max-width: 560px) {
    .mhspot__panel {
        width: calc(100% - 20px);
        max-height: 80vh;
        margin-top: 7vh;
    }

    .mhspot__search { padding: 14px; gap: 10px; }
    /* iOS Safari 16px altında input'a odaklanınca sayfayı zoom'lar — 16px taban */
    .mhspot__input { font-size: 16px; }
    .mhspot__item { padding: 11px 12px; }
    .mhspot__thumb { width: 48px; height: 36px; }
    .mhspot__fiyat { font-size: 13px; }

    /* Dokunmatikte klavye ipuçları anlamsız; yalnızca marka satırı kalsın */
    .mhspot__hints { display: none; }
    .mhspot__foot { justify-content: center; }
    .mhspot__close { display: none; }
}

/* Hareket azaltma tercihi: dönen/parlayan animasyonları durdur */
@media (prefers-reduced-motion: reduce) {
    .mhspot__panel,
    .mhspot__backdrop { animation: none; }

    .mhspot__spin { animation-duration: 2s; }

    .mhspot__skel-th,
    .mhspot__skel-tx b,
    .mhspot__skel-tx i { animation: none; }
}
