/**
 * WC Product Filters - Frontend Styles
 */

/* Container */
.wcpf-filters {
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
}

.wcpf-widget-title {
    margin: 0 0 20px 0;
    color: #667634;
    font-size: 14px;
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
}

/* Filter Sections */
.wcpf-filter-section {
    margin-bottom: 20px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 15px;
}

.wcpf-filter-section:last-of-type {
    border-bottom: none;
    margin-bottom: 15px;
}

/* Filter Title */
.wcpf-filter-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 0 12px 0;
    font-size: 15px;
    font-weight: 600;
    color: #000;
}

.wcpf-collapsible .wcpf-filter-title {
    cursor: pointer;
    user-select: none;
    padding: 8px 0;
    margin-bottom: 0;
    transition: color 0.2s ease;
}

.wcpf-collapsible .wcpf-filter-title:hover {
    color: #a1bd4a;
}


.wcpf-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    transition: transform 0.2s ease;
}

.wcpf-toggle svg {
    width: 12px;
    height: 12px;
}

.wcpf-collapsible.wcpf-collapsed .wcpf-toggle {
    transform: rotate(-90deg);
}

/* Filter Content */
.wcpf-filter-content {
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.2s ease;
}

.wcpf-collapsible .wcpf-filter-content {
    padding-top: 10px;
}

.wcpf-collapsible.wcpf-collapsed .wcpf-filter-content {
    max-height: 0 !important;
    opacity: 0;
    padding-top: 0;
}

/* Filter List */
.wcpf-filter-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.wcpf-filter-list::-webkit-scrollbar {
    width: 6px;
}

.wcpf-filter-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.wcpf-filter-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.wcpf-filter-list::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* Filter Items */
.wcpf-filter-item {
    margin-bottom: 8px;
}

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

.wcpf-filter-item label {
    display: flex;
    align-items: center;
    cursor: pointer;
    color: #000;
    transition: color 0.2s ease;
}

.wcpf-filter-item label:hover {
    color: #a1bd4a;
}

.wcpf-filter-item input[type="checkbox"] {
    margin: 0 10px 0 0;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    cursor: pointer;
    accent-color: #a1bd4a;
}

.wcpf-item-name {
    color: #000;
}

/* Clear All Filters link */
.wcpf-clear-all-link {
    display: block;
    font-size: 12px;
    margin-bottom: 12px;
    text-decoration: underline;
    cursor: pointer;
}

/* Actions */
.wcpf-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.wcpf-filters .wcpf-apply-filters,
.wcpf-filters .wcpf-clear-filters {
    flex: 1;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    font-family: 'Roboto-light', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #a1bd4a !important;
    color: #fff !important;
}

.wcpf-filters .wcpf-apply-filters:hover,
.wcpf-filters .wcpf-clear-filters:hover {
    background: #8fa842 !important;
}

.wcpf-filters .wcpf-apply-filters:disabled {
    background: #ccc !important;
    cursor: not-allowed;
}

/* Responsive button visibility — desktop-only hidden on mobile, mobile-only hidden on desktop */
@media (max-width: 767px) {
    .wcpf-actions--desktop-only {
        display: none !important;
    }
}

@media (min-width: 768px) {
    .wcpf-actions--mobile-only {
        display: none !important;
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .wcpf-filter-list {
        max-height: 200px;
        overflow-y: scroll;
    }
}

@media (max-width: 1280px) {
    .wcpf-actions {
        flex-direction: column;
    }
    
    .wcpf-apply-filters,
    .wcpf-clear-filters {
        width: 100%;
    }
}
