/**
 * Shlomi Business City Filter - Styles
 * RTL-optimized for Hebrew content
 */

/* ===== City Badge on Business Card ===== */
.bc-city-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, #e8f4fd, #d1ecf9);
    color: #1565c0;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    margin-top: 6px;
    margin-bottom: 4px;
    border: 1px solid rgba(21, 101, 192, 0.15);
    line-height: 1.4;
    white-space: nowrap;
}

.bc-city-badge svg {
    flex-shrink: 0;
    color: #1976d2;
}

/* ===== City Filter Wrapper ===== */
.sbc-city-filter-wrap {
    width: 100%;
    margin-top: 12px;
}

.sbc-city-filter {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 10px 16px;
    direction: rtl;
}

.sbc-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
}

.sbc-label svg {
    color: #1976d2;
}

.sbc-city-select {
    flex: 1;
    padding: 8px 14px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    background: #fff;
    color: #333;
    cursor: pointer;
    direction: rtl;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M6 8L1 3h10z' fill='%23666'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 12px center;
    padding-left: 32px;
    min-width: 180px;
    max-width: 300px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.sbc-city-select:hover {
    border-color: #1976d2;
}

.sbc-city-select:focus {
    outline: none;
    border-color: #1976d2;
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.15);
}

/* ===== Clear Button ===== */
.sbc-clear-btn {
    background: none;
    border: 1px solid #ccc;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 18px;
    line-height: 1;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.sbc-clear-btn:hover {
    background: #fee2e2;
    border-color: #ef4444;
    color: #ef4444;
}

/* ===== Active Filter State ===== */
.sbc-city-select option:checked {
    font-weight: 600;
}

/* ===== Animation for filtered cards ===== */
.biz-card-wrapper,
.biz-card {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.biz-card-wrapper[style*="display: none"],
.biz-card[style*="display: none"] {
    opacity: 0;
    transform: scale(0.95);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .sbc-city-filter {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .sbc-city-select {
        max-width: 100%;
        width: 100%;
    }

    .bc-city-badge {
        font-size: 11px;
        padding: 2px 8px;
    }
}

/* ===== Integration with existing quick-filters ===== */
.biz-filters .sbc-city-filter-wrap {
    border-top: 1px solid #eee;
    padding-top: 12px;
}

/* ===== Dark mode support ===== */
@media (prefers-color-scheme: dark) {
    .bc-city-badge {
        background: linear-gradient(135deg, #1a3a52, #1e3d55);
        color: #64b5f6;
        border-color: rgba(100, 181, 246, 0.2);
    }

    .sbc-city-filter {
        background: #1e1e1e;
        border-color: #333;
    }

    .sbc-city-select {
        background: #2a2a2a;
        border-color: #444;
        color: #eee;
    }

    .sbc-label {
        color: #ddd;
    }
}
