.pf-container {
    width: 100%;
}

.pf-filter-group {
    border-bottom: 1px solid #eee;
    margin-bottom: 0;
}

.pf-filter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
    cursor: pointer;
    user-select: none;
}

.pf-filter-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.pf-filter-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.pf-filter-toggle .pf-icon-expand,
.pf-filter-toggle .pf-icon-collapse {
    display: flex;
    align-items: center;
    justify-content: center;
}

.pf-filter-toggle.expanded .pf-icon-expand {
    display: none;
}

.pf-filter-toggle.expanded .pf-icon-collapse {
    display: flex;
}

.pf-filter-toggle:not(.expanded) .pf-icon-expand {
    display: flex;
}

.pf-filter-toggle:not(.expanded) .pf-icon-collapse {
    display: none;
}

.pf-filter-toggle svg,
.pf-filter-toggle i {
    width: 12px;
    height: 12px;
    font-size: 12px;
    color: #666;
}

.pf-filter-content {
    padding: 0 0 15px 0;
    max-height: 300px;
    overflow-y: auto;
}

.pf-filter-group:not(.expanded) .pf-filter-content {
    display: none;
}

.pf-filter-group.expanded .pf-filter-content {
    display: block;
}

.pf-filter-item {
    margin-bottom: 10px;
}

.pf-filter-item:last-child {
    margin-bottom: 0;
}

.pf-filter-item label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: #666;
}

.pf-filter-item input[type="checkbox"] {
    display: none;
}

.pf-checkbox {
    width: 16px;
    height: 16px;
    border: 1px solid #ccc;
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
}

.pf-filter-item input[type="checkbox"]:checked + .pf-checkbox {
    background: #333;
    border-color: #333;
}

.pf-filter-item input[type="checkbox"]:checked + .pf-checkbox::after {
    content: '';
    width: 4px;
    height: 8px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-top: -2px;
}

.pf-item-name {
    flex: 1;
}

.pf-item-count {
    color: #999;
    font-size: 12px;
}

.pf-filter-item.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.pf-filter-item.disabled label {
    color: #ccc;
    cursor: not-allowed;
}

.pf-filter-item.disabled .pf-checkbox {
    border-color: #ddd;
    background: #f5f5f5;
}

/* Loading state */
.pf-container.loading {
    opacity: 0.6;
    pointer-events: none;
}

.pf-container.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid #eee;
    border-top-color: #333;
    border-radius: 50%;
    animation: pf-spin 0.8s linear infinite;
}

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

/* Scrollbar */
.pf-filter-content::-webkit-scrollbar {
    width: 4px;
}

.pf-filter-content::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.pf-filter-content::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 2px;
}

.pf-filter-content::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* Disabled and Zero Count Items */
.pf-filter-item.disabled label,
.pf-filter-item.zero-count label {
    color: #ccc;
    cursor: not-allowed;
}

.pf-filter-item.disabled input[type="checkbox"],
.pf-filter-item.zero-count input[type="checkbox"] {
    pointer-events: none;
}

.pf-filter-item.disabled .pf-checkbox,
.pf-filter-item.zero-count .pf-checkbox {
    border-color: #ddd;
    background: #f5f5f5;
}

.pf-filter-item.zero-count .pf-item-count {
    color: #ccc;
}

/* Loading State */
.pf-container.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

/* Mobile */
@media (max-width: 767px) {
    .pf-filter-header {
        padding: 12px 0;
    }
    
    .pf-filter-title {
        font-size: 14px;
    }
    
    .pf-filter-item label {
        font-size: 13px;
    }
    
    .pf-filter-content {
        max-height: 200px;
    }
}
