﻿/* ═══════════════════════════════════════════════════════════════════════
   GLOBALLIST FILTER PANEL — Hero Search Extension
   ═══════════════════════════════════════════════════════════════════════
   .hsf-panel → hero-search altında smooth açılır
   Mevcut hs-select, hs-btn, hs-input ile %100 uyumlu
   ═══════════════════════════════════════════════════════════════════════ */

/* ── hs-row'a flex-wrap ekle (panel alt satıra düşsün) ── */
.hs-row {
    flex-wrap: wrap;
}

/* ── Toggle Butonu ── */
.hsf-toggle {
    flex-basis: 100%;
    text-align: center;
    margin-top: 6px;
}

.hsf-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    border: 1.5px dashed var(--ocean-l);
    border-radius: var(--r-full, 999px);
    background: transparent;
    color: var(--ocean);
    font-size: .75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
}

    .hsf-toggle-btn:hover {
        background: rgba(8,145,178,.06);
        border-style: solid;
    }

/* ── Filtre Paneli (max-height animasyonu) ── */
.hsf-panel {
    flex-basis: 100%;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height .4s cubic-bezier(.4,0,.2,1), opacity .3s ease, padding .3s ease;
    padding: 0;
}

.hsf-panel--open {
    max-height: 900px;
    opacity: 1;
    padding: 14px 4px 6px;
}

/* ── Filtre Grid ── */
.hsf-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

/* ── Tek Alan ── */
.hsf-field {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.hsf-field--full {
    grid-column: 1 / -1;
}

/* ── Label ── */
.hsf-label {
    font-size: .68rem;
    font-weight: 600;
    color: var(--t3);
    text-transform: uppercase;
    letter-spacing: .04em;
    padding-left: 2px;
}

/* ── Filter Select — hs-select DNA'sı ── */
.hsf-select {
    width: 100%;
    padding: 10px 32px 10px 12px;
    border: 0;
    border-radius: var(--r-xl, 12px);
    background: var(--bg-input);
    color: var(--t2);
    font-size: .82rem;
    cursor: pointer;
    outline: 0;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M1.6 4.6a.5.5 0 0 1 .8 0L8 10.3l5.6-5.7a.5.5 0 0 1 .8.8l-6 6a.5.5 0 0 1-.8 0l-6-6a.5.5 0 0 1 0-.8z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    transition: background .2s, box-shadow .2s;
}

    .hsf-select:focus {
        background: var(--sky-1);
        box-shadow: 0 0 0 2px rgba(8,145,178,.15);
    }

/* ── Koşullu filtreler — animasyonlu giriş ── */
.hsf-cf {
    animation: hsfIn .3s ease both;
}

@keyframes hsfIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Checkbox ── */
.hsf-check {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: .82rem;
    color: var(--t2);
    padding: 8px 0 4px;
    user-select: none;
}

    .hsf-check input {
        display: none;
    }

.hsf-check-box {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .2s;
    flex-shrink: 0;
}

.hsf-check input:checked ~ .hsf-check-box {
    background: var(--ocean);
    border-color: var(--ocean);
}

    .hsf-check input:checked ~ .hsf-check-box::after {
        content: '\2713';
        color: #fff;
        font-size: 12px;
        font-weight: 700;
    }

/* ── Alt Butonlar ── */
.hsf-actions {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}

.hsf-act {
    padding: 8px 20px;
    border: 0;
    border-radius: var(--r-xl, 12px);
    font-size: .78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
}

.hsf-act--clear {
    background: rgba(244,63,94,.08);
    color: var(--rose);
}

    .hsf-act--clear:hover {
        background: rgba(244,63,94,.15);
    }

.hsf-act--hide {
    background: var(--bg-input);
    color: var(--t2);
}

    .hsf-act--hide:hover {
        background: var(--sky-1);
        color: var(--ocean);
    }

/* ═══════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .hsf-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .hsf-grid {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .hsf-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .hsf-act {
        text-align: center;
    }
}

/* ── Dark Theme uyumu ── */
[data-theme="dark"] .hsf-select {
    background-color: var(--bg-input);
    color: var(--t2);
}

    [data-theme="dark"] .hsf-select:focus {
        background: var(--sky-1);
    }

[data-theme="dark"] .hsf-toggle-btn {
    border-color: var(--ocean-l);
    color: var(--ocean-l);
}
