/**
 * Oto Yedek Parça - Arama Sonuçları Sidebar Filtre Stilleri
 * Trendyol/Hepsiburada tarzı sol sidebar
 */

.oyp-search-facets {
    background: #fff;
    border: 1px solid #e6e6e6;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.oyp-facets-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid #eaeaea;
    background: #fafafa;
    border-radius: 8px 8px 0 0;
}

.oyp-facets-title {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.oyp-facets-title .material-icons {
    font-size: 18px;
    color: #007bff;
}

.oyp-clear-all {
    font-size: 12px;
    color: #dc3545;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s;
}

.oyp-clear-all:hover {
    background: #fde8e8;
    text-decoration: none;
    color: #c82333;
}

.oyp-clear-all .material-icons {
    font-size: 14px;
}

/* Her bir facet (Marka, Model, Yıl, Motor) */
.oyp-facet {
    border-bottom: 1px solid #f0f0f0;
}

.oyp-facet:last-of-type {
    border-bottom: none;
}

.oyp-facet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s;
}

.oyp-facet-head:hover {
    background: #f8f9fa;
}

.oyp-facet-label {
    font-weight: 600;
    color: #333;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.oyp-facet-total {
    color: #999;
    font-weight: 400;
    font-size: 12px;
}

.oyp-facet-chevron {
    color: #999;
    font-size: 18px;
    transition: transform 0.2s;
}

.oyp-facet.collapsed .oyp-facet-chevron {
    transform: rotate(180deg);
}

.oyp-facet.collapsed .oyp-facet-body {
    display: none;
}

.oyp-facet-body {
    padding: 4px 0 12px 0;
    max-height: 320px;
    overflow-y: auto;
}

.oyp-facet-body::-webkit-scrollbar {
    width: 5px;
}

.oyp-facet-body::-webkit-scrollbar-track {
    background: #f8f9fa;
}

.oyp-facet-body::-webkit-scrollbar-thumb {
    background: #d0d0d0;
    border-radius: 3px;
}

.oyp-facet-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.oyp-facet-item {
    margin: 0;
}

.oyp-facet-item.active .oyp-facet-link {
    background: #e8f0fe;
    color: #1a73e8;
    font-weight: 600;
}

.oyp-facet-item.active .oyp-facet-link .oyp-facet-count {
    color: #1a73e8;
}

.oyp-facet-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 16px;
    color: #444;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
    font-size: 13px;
    line-height: 1.4;
}

.oyp-facet-link:hover {
    background: #f5f5f5;
    color: #007bff;
    text-decoration: none;
}

.oyp-facet-name {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.oyp-facet-name .material-icons {
    font-size: 16px;
    color: #1a73e8;
}

.oyp-facet-item:not(.active) .oyp-facet-name .oyp-facet-radio {
    color: #c0c0c0;
    font-size: 16px;
    visibility: hidden;
}

.oyp-facet-link:hover .oyp-facet-name .oyp-facet-radio {
    visibility: visible;
}

.oyp-facet-count {
    color: #999;
    font-size: 12px;
    font-weight: 400;
    flex-shrink: 0;
    margin-left: 8px;
}

.oyp-facet-hint {
    margin: 0;
    padding: 8px 16px;
    color: #999;
    font-size: 12px;
    font-style: italic;
    display: flex;
    align-items: center;
    gap: 4px;
}

.oyp-facet-hint .material-icons {
    font-size: 14px;
}

.oyp-facets-footer {
    padding: 12px 16px;
    background: #f8f9fa;
    border-top: 1px solid #eaeaea;
    border-radius: 0 0 8px 8px;
    text-align: center;
}

.oyp-facets-count {
    font-size: 12px;
    color: #666;
}

.oyp-facets-count strong {
    color: #007bff;
    font-weight: 700;
    font-size: 14px;
}

/* ==========================================
   Aktif Filtreler (Chip'ler)
   ========================================== */
.oyp-active-vehicle-filters {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
    background: #fff;
    border: 1px solid #e6e6e6;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.oyp-active-filters-label {
    font-weight: 600;
    color: #555;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-right: 4px;
}

.oyp-active-filters-label .material-icons {
    font-size: 16px;
    color: #007bff;
}

.oyp-active-filters-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    flex: 1;
    min-width: 0;
}

.oyp-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 4px 5px 10px;
    background: #e8f0fe;
    color: #1a73e8;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.2;
}

.oyp-filter-chip small {
    color: #5a82b8;
    font-weight: 400;
    font-size: 11px;
    margin-right: 2px;
}

.oyp-filter-chip strong {
    font-weight: 600;
}

.oyp-chip-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    color: #1a73e8;
    text-decoration: none;
    transition: background 0.2s;
    margin-left: 2px;
}

.oyp-chip-remove:hover {
    background: rgba(26, 115, 232, 0.2);
    color: #1a73e8;
    text-decoration: none;
}

.oyp-chip-remove .material-icons {
    font-size: 14px;
}

.oyp-clear-filters-link {
    color: #dc3545;
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s;
    white-space: nowrap;
}

.oyp-clear-filters-link:hover {
    background: #fde8e8;
    color: #c82333;
    text-decoration: none;
}

.oyp-clear-filters-link .material-icons {
    font-size: 14px;
}

/* ==========================================
   Mobil için drawer tarzı görünüm
   ========================================== */
@media (max-width: 767px) {
    .oyp-active-vehicle-filters {
        padding: 10px 12px;
    }

    .oyp-filter-chip {
        font-size: 12px;
        padding: 4px 4px 4px 8px;
    }

    .oyp-search-facets {
        margin-bottom: 14px;
    }

    .oyp-facets-header {
        padding: 12px 14px;
    }

    .oyp-facet-head {
        padding: 10px 14px;
    }

    .oyp-facet-link {
        padding: 6px 14px;
    }

    .oyp-active-filters-label {
        font-size: 12px;
    }
}

/* Çok küçük ekranlar */
@media (max-width: 480px) {
    .oyp-active-vehicle-filters {
        flex-direction: column;
        align-items: flex-start;
    }

    .oyp-active-filters-list {
        width: 100%;
    }
}
