/**
 * Advanced Filters Pro - Frontend Styles
 * Compact, production-ready design
 * Version: 2.3.0
 */

/* CSS Variables with fallbacks */
.afp-filters {
    --afp-font-family: inherit;
    --afp-font-size: 13px;
    --afp-text-color: #374151;
    --afp-text-muted: #6b7280;
    --afp-border-color: #e5e7eb;
    --afp-border-radius: 6px;
    --afp-container-bg: transparent;
    --afp-accent: #3b82f6;
    --afp-expanded-max-height: 200px;

    font-family: var(--afp-font-family);
    font-size: var(--afp-font-size);
    color: var(--afp-text-color);
    background: var(--afp-container-bg);
    border-radius: var(--afp-border-radius);
}

/* Main Container - scrollable when max-height is set */
.afp-filters {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0;
    scrollbar-width: thin;
    scrollbar-color: var(--afp-border-color) transparent;
}

.afp-filters::-webkit-scrollbar {
    width: 6px;
}

.afp-filters::-webkit-scrollbar-track {
    background: transparent;
}

.afp-filters::-webkit-scrollbar-thumb {
    background: var(--afp-border-color);
    border-radius: 3px;
}

/* Filter Item */
.afp-filter-item {
    padding-bottom: 12px;
    border-bottom: 1px solid var(--afp-border-color);
}

.afp-filter-item:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

/* Filter Label */
.afp-filter-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--afp-text-muted);
    margin-bottom: 8px;
}

/* ========================================
   CHECKBOXES
   ======================================== */

.afp-filter-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.afp-checkbox-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* Expanded state - scrollable */
.afp-filter-checkboxes.afp-expanded .afp-checkbox-list {
    max-height: var(--afp-max-height, 200px);
    overflow-y: auto;
    padding-right: 4px;
    scrollbar-width: thin;
}

.afp-checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    margin: 0 -8px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.1s;
}

.afp-checkbox-item:hover {
    background: rgba(0, 0, 0, 0.04);
}

.afp-checkbox-item.afp-hidden-item {
    display: none;
}

.afp-filter-checkboxes.afp-expanded .afp-hidden-item {
    display: flex;
}

.afp-checkbox-item input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.afp-checkbox-box {
    width: 16px;
    height: 16px;
    border: 1.5px solid var(--afp-border-color);
    border-radius: 3px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.afp-checkbox-item input:checked+.afp-checkbox-box {
    background: var(--afp-accent);
    border-color: var(--afp-accent);
}

.afp-checkbox-item input:checked+.afp-checkbox-box::after {
    content: '';
    width: 4px;
    height: 7px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-bottom: 2px;
}

.afp-checkbox-item input:focus-visible+.afp-checkbox-box {
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
}

.afp-checkbox-text {
    flex: 1;
    line-height: 1.3;
}

/* ========================================
   RADIO BUTTONS
   ======================================== */

.afp-filter-radio {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.afp-radio-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.afp-filter-radio.afp-expanded .afp-radio-list {
    max-height: var(--afp-max-height, 200px);
    overflow-y: auto;
    padding-right: 4px;
    scrollbar-width: thin;
}

.afp-radio-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    margin: 0 -8px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.1s;
}

.afp-radio-item:hover {
    background: rgba(0, 0, 0, 0.04);
}

.afp-radio-item.afp-hidden-item {
    display: none;
}

.afp-filter-radio.afp-expanded .afp-hidden-item {
    display: flex;
}

.afp-radio-item input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.afp-radio-dot {
    width: 16px;
    height: 16px;
    border: 1.5px solid var(--afp-border-color);
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.afp-radio-item input:checked+.afp-radio-dot {
    border-color: var(--afp-accent);
}

.afp-radio-item input:checked+.afp-radio-dot::after {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--afp-accent);
    border-radius: 50%;
}

.afp-radio-item input:focus-visible+.afp-radio-dot {
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
}

.afp-radio-text {
    flex: 1;
    line-height: 1.3;
}

/* ========================================
   COUNT BADGE
   ======================================== */

.afp-count {
    font-size: 11px;
    color: var(--afp-text-muted);
    background: rgba(0, 0, 0, 0.05);
    padding: 1px 6px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}

/* ========================================
   TOGGLE MORE BUTTON
   ======================================== */

.afp-toggle-more {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 100%;
    padding: 6px;
    margin-top: 4px;
    background: none;
    border: none;
    font-size: 12px;
    font-weight: 500;
    color: var(--afp-accent);
    cursor: pointer;
    transition: all 0.15s;
}

.afp-toggle-more:hover {
    color: #2563eb;
}

.afp-toggle-icon {
    transition: transform 0.2s;
}

.afp-toggle-more[data-collapsed="false"] .afp-toggle-icon {
    transform: rotate(180deg);
}

/* ========================================
   DROPDOWN
   ======================================== */

.afp-filter-dropdown select {
    width: 100%;
    height: 32px;
    padding: 0 28px 0 10px;
    font-size: var(--afp-font-size);
    font-family: var(--afp-font-family);
    color: var(--afp-text-color);
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") right 8px center no-repeat;
    border: 1px solid var(--afp-border-color);
    border-radius: var(--afp-border-radius);
    appearance: none;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.afp-filter-dropdown select:focus {
    outline: none;
    border-color: var(--afp-accent);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

/* ========================================
   SHARED INPUT STYLES
   ======================================== */

.afp-input {
    width: 100%;
    height: 32px;
    padding: 0 10px;
    font-size: var(--afp-font-size);
    font-family: var(--afp-font-family);
    color: var(--afp-text-color);
    background: #fff;
    border: 1px solid var(--afp-border-color);
    border-radius: var(--afp-border-radius);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.afp-input:focus {
    outline: none;
    border-color: var(--afp-accent);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.afp-input::placeholder {
    color: var(--afp-text-muted);
}

/* ========================================
   RANGE SLIDER - COMPACT
   ======================================== */

.afp-filter-range {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.afp-range-inputs {
    display: flex;
    align-items: center;
    gap: 6px;
}

.afp-range-field {
    display: flex;
    align-items: center;
    gap: 3px;
    flex: 1;
    min-width: 0;
}

.afp-range-unit {
    font-size: 11px;
    color: var(--afp-text-muted);
    flex-shrink: 0;
}

.afp-range-input {
    width: 100%;
    min-width: 0;
    height: 28px;
    padding: 0 6px;
    font-size: 12px;
    font-family: var(--afp-font-family);
    color: var(--afp-text-color);
    text-align: center;
    border: 1px solid var(--afp-border-color);
    border-radius: 4px;
    background: #fff;
    appearance: textfield;
    -moz-appearance: textfield;
    transition: border-color 0.15s;
}

.afp-range-input::-webkit-outer-spin-button,
.afp-range-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.afp-range-input:focus {
    outline: none;
    border-color: var(--afp-accent);
}

.afp-range-sep {
    color: var(--afp-text-muted);
    font-size: 11px;
    flex-shrink: 0;
}

.afp-range-slider {
    position: relative;
    height: 16px;
    display: flex;
    align-items: center;
}

.afp-range-track {
    position: absolute;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--afp-border-color);
    border-radius: 2px;
}

.afp-range-fill {
    position: absolute;
    height: 4px;
    background: var(--afp-accent);
    border-radius: 2px;
}

.afp-range-thumb {
    position: absolute;
    width: 100%;
    height: 4px;
    background: none;
    pointer-events: none;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.afp-range-thumb::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    background: #fff;
    border: 2px solid var(--afp-accent);
    border-radius: 50%;
    cursor: pointer;
    pointer-events: auto;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
    transition: transform 0.1s;
}

.afp-range-thumb::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.afp-range-thumb::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: #fff;
    border: 2px solid var(--afp-accent);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

/* ========================================
   TOGGLE (Boolean/True-False)
   ======================================== */

.afp-filter-toggle {
    display: flex;
    flex-direction: column;
}

.afp-toggle-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px;
    margin: 0 -8px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.1s;
}

.afp-toggle-item:hover {
    background: rgba(0, 0, 0, 0.04);
}

.afp-toggle-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.afp-toggle-switch {
    position: relative;
    width: 36px;
    height: 20px;
    background: var(--afp-border-color, #e5e7eb);
    border-radius: 10px;
    flex-shrink: 0;
    transition: background 0.2s ease;
}

.afp-toggle-slider {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease;
}

.afp-toggle-input:checked+.afp-toggle-switch {
    background: var(--afp-accent, #3b82f6);
}

.afp-toggle-input:checked+.afp-toggle-switch .afp-toggle-slider {
    transform: translateX(16px);
}

.afp-toggle-input:focus-visible+.afp-toggle-switch {
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
}

.afp-toggle-label {
    flex: 1;
    line-height: 1.3;
    font-weight: 500;
    color: var(--afp-text-color, #374151);
}

/* ========================================
   SEARCH INPUT - Shadcn Style
   ======================================== */

.afp-filter-search {
    width: 100%;
}

.afp-search-wrap {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

.afp-search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--afp-text-muted, #9ca3af);
    pointer-events: none;
    flex-shrink: 0;
}

.afp-search-input {
    display: block;
    width: 100%;
    height: 32px;
    margin: 0;
    padding: 0 10px 0 34px;
    font-size: var(--afp-font-size, 13px);
    font-family: var(--afp-font-family, inherit);
    font-weight: 400;
    line-height: 30px;
    color: var(--afp-text-color, #374151);
    background-color: transparent;
    background-image: none;
    border: 1px solid var(--afp-border-color, #e5e7eb);
    border-radius: var(--afp-border-radius, 6px);
    box-shadow: none;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.afp-search-input:focus {
    border-color: var(--afp-accent, #3b82f6);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
    outline: none;
}

.afp-search-input::placeholder {
    color: var(--afp-text-muted, #9ca3af);
    opacity: 1;
}

/* Override WordPress theme button/input styles */
.afp-filters .afp-search-wrap,
.afp-filters .afp-search-input {
    box-sizing: border-box;
}

.afp-filters input[type="text"].afp-search-input {
    height: 32px;
    padding: 0 10px 0 34px;
    border-width: 1px;
    border-style: solid;
    background-color: transparent;
}

/* Ensure input inherits proper styling in all themes */
.afp-filters .afp-filter-search input[type="text"],
.afp-filters .afp-filter-search input[type="search"] {
    background-color: transparent;
    box-shadow: none;
}

/* ========================================
   CLEAR FILTERS BUTTON
   ======================================== */

.afp-clear-all-btn {
    display: none !important;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 10px 16px;
    margin-top: 8px;
    font-size: 13px;
    font-weight: 500;
    font-family: var(--afp-font-family, inherit);
    color: #dc2626;
    background: rgba(220, 38, 38, 0.08);
    border: 1px solid rgba(220, 38, 38, 0.2);
    border-radius: var(--afp-border-radius, 6px);
    cursor: pointer;
    transition: all 0.15s ease;
}

.afp-clear-all-btn:hover {
    background: rgba(220, 38, 38, 0.12);
    border-color: rgba(220, 38, 38, 0.3);
}

.afp-clear-all-btn:active {
    background: rgba(220, 38, 38, 0.15);
}

.afp-filters .afp-clear-all-btn.afp-visible,
.afp-clear-all-btn.afp-visible {
    display: flex !important;
}

.afp-clear-icon {
    flex-shrink: 0;
}

/* ========================================
   CHIPS (Active Filters)
   ======================================== */

.afp-active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 0;
}

.afp-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px 4px 10px;
    font-size: 12px;
    background: rgba(59, 130, 246, 0.1);
    color: var(--afp-accent);
    border-radius: 100px;
}

.afp-chip-remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.15s;
}

.afp-chip-remove:hover {
    opacity: 1;
}

.afp-clear-all {
    font-size: 12px;
    color: var(--afp-text-muted);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
}

.afp-clear-all:hover {
    color: var(--afp-text-color);
}

/* ========================================
   DARK MODE
   ======================================== */

@media (prefers-color-scheme: dark) {
    .afp-filters {
        --afp-text-color: #e5e7eb;
        --afp-text-muted: #9ca3af;
        --afp-border-color: #374151;
        --afp-accent: #60a5fa;
    }

    .afp-checkbox-item:hover,
    .afp-radio-item:hover,
    .afp-toggle-item:hover {
        background: rgba(255, 255, 255, 0.05);
    }

    .afp-count {
        background: rgba(255, 255, 255, 0.1);
    }

    .afp-filter-dropdown select,
    .afp-range-input {
        background: #1f2937;
        color: #e5e7eb;
    }

    .afp-search-input {
        background: transparent;
        color: #e5e7eb;
    }

    .afp-search-icon {
        color: #6b7280;
    }

    .afp-range-thumb::-webkit-slider-thumb,
    .afp-range-thumb::-moz-range-thumb {
        background: #374151;
    }

    .afp-chip {
        background: rgba(96, 165, 250, 0.15);
    }

    .afp-toggle-switch {
        background: #4b5563;
    }

    .afp-toggle-slider {
        background: #9ca3af;
    }

    .afp-toggle-input:checked+.afp-toggle-switch .afp-toggle-slider {
        background: #fff;
    }

    .afp-clear-all-btn {
        color: #f87171;
        background: rgba(248, 113, 113, 0.1);
        border-color: rgba(248, 113, 113, 0.2);
    }

    .afp-clear-all-btn:hover {
        background: rgba(248, 113, 113, 0.15);
        border-color: rgba(248, 113, 113, 0.3);
    }
}

/* ========================================
   LOADING STATES
   ======================================== */

/* Page loading state for URL-based filtering */
body.afp-page-loading {
    cursor: wait;
}

body.afp-page-loading .afp-filters {
    pointer-events: none;
    opacity: 0.6;
}

/* AJAX filtering state */
body.afp-filtering {
    cursor: wait;
}

body.afp-filtering .afp-filters {
    pointer-events: none;
    opacity: 0.7;
}

/* Container loading state for AJAX filtering */
.afp-loading {
    position: relative;
    pointer-events: none;
}

.afp-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
    border: 2px solid var(--afp-border-color, #e5e7eb);
    border-top-color: var(--afp-accent, #3b82f6);
    border-radius: 50%;
    animation: afp-spin 0.6s linear infinite;
}

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

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 480px) {
    .afp-filters {
        padding: 10px;
        gap: 10px;
    }

    .afp-filter-item {
        padding-bottom: 10px;
    }

    .afp-filter-label {
        font-size: 10px;
    }

    .afp-checkbox-item,
    .afp-radio-item {
        padding: 5px 6px;
        margin: 0 -6px;
    }
}

/* ========================================
   THEME OVERRIDE PROTECTION
   High specificity rules with !important
   to prevent WordPress themes from 
   overwriting filter component styles
   ======================================== */

/* Checkbox box borders */
.afp-filters .afp-checkbox-box {
    border: 1.5px solid var(--afp-border-color, #e5e7eb) !important;
    background: transparent !important;
    box-shadow: none !important;
    outline: none !important;
}

.afp-filters .afp-checkbox-item input:checked+.afp-checkbox-box {
    background: var(--afp-accent, #3b82f6) !important;
    border-color: var(--afp-accent, #3b82f6) !important;
}

.afp-filters .afp-checkbox-item input:focus+.afp-checkbox-box,
.afp-filters .afp-checkbox-item input:focus-visible+.afp-checkbox-box {
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3) !important;
    outline: none !important;
}

/* Radio dot borders */
.afp-filters .afp-radio-dot {
    border: 1.5px solid var(--afp-border-color, #e5e7eb) !important;
    background: transparent !important;
    box-shadow: none !important;
    outline: none !important;
}

.afp-filters .afp-radio-item input:checked+.afp-radio-dot {
    border-color: var(--afp-accent, #3b82f6) !important;
}

.afp-filters .afp-radio-item input:focus+.afp-radio-dot,
.afp-filters .afp-radio-item input:focus-visible+.afp-radio-dot {
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3) !important;
    outline: none !important;
}

/* Dropdown select */
.afp-filters .afp-filter-dropdown select {
    border: 1px solid var(--afp-border-color, #e5e7eb) !important;
    border-radius: var(--afp-border-radius, 6px) !important;
    background-color: transparent !important;
    box-shadow: none !important;
    outline: none !important;
}

.afp-filters .afp-filter-dropdown select:hover {
    border-color: var(--afp-border-color, #e5e7eb) !important;
}

.afp-filters .afp-filter-dropdown select:focus,
.afp-filters .afp-filter-dropdown select:active {
    border-color: var(--afp-accent, #3b82f6) !important;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1) !important;
    outline: none !important;
}

/* Range inputs */
.afp-filters .afp-range-input {
    border: 1px solid var(--afp-border-color, #e5e7eb) !important;
    border-radius: 4px !important;
    background: transparent !important;
    box-shadow: none !important;
    outline: none !important;
}

.afp-filters .afp-range-input:hover {
    border-color: var(--afp-border-color, #e5e7eb) !important;
}

.afp-filters .afp-range-input:focus,
.afp-filters .afp-range-input:active {
    border-color: var(--afp-accent, #3b82f6) !important;
    box-shadow: none !important;
    outline: none !important;
}

/* Search input */
.afp-filters .afp-search-input,
.afp-filters input[type="text"].afp-search-input,
.afp-filters input[type="search"].afp-search-input {
    border: 1px solid var(--afp-border-color, #e5e7eb) !important;
    border-radius: var(--afp-border-radius, 6px) !important;
    background-color: transparent !important;
    box-shadow: none !important;
    outline: none !important;
}

.afp-filters .afp-search-input:hover,
.afp-filters input[type="text"].afp-search-input:hover {
    border-color: var(--afp-border-color, #e5e7eb) !important;
}

.afp-filters .afp-search-input:focus,
.afp-filters .afp-search-input:active,
.afp-filters input[type="text"].afp-search-input:focus,
.afp-filters input[type="text"].afp-search-input:active {
    border-color: var(--afp-accent, #3b82f6) !important;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1) !important;
    outline: none !important;
}

/* Generic input overrides */
.afp-filters .afp-input,
.afp-filters input.afp-input {
    border: 1px solid var(--afp-border-color, #e5e7eb) !important;
    border-radius: var(--afp-border-radius, 6px) !important;
    background: transparent !important;
    box-shadow: none !important;
    outline: none !important;
}

.afp-filters .afp-input:focus,
.afp-filters .afp-input:active,
.afp-filters input.afp-input:focus,
.afp-filters input.afp-input:active {
    border-color: var(--afp-accent, #3b82f6) !important;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1) !important;
    outline: none !important;
}

/* Toggle button overrides */
.afp-filters .afp-toggle-more {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}

.afp-filters .afp-toggle-more:hover,
.afp-filters .afp-toggle-more:focus,
.afp-filters .afp-toggle-more:active {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}

/* Chip styling */
.afp-filters .afp-chip,
.afp-active-filters .afp-chip {
    border: none !important;
    box-shadow: none !important;
}

.afp-filters .afp-chip-remove,
.afp-active-filters .afp-chip-remove {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}

.afp-filters .afp-clear-all,
.afp-active-filters .afp-clear-all {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}

/* Toggle switch */
.afp-filters .afp-toggle-switch {
    background: var(--afp-border-color, #e5e7eb) !important;
    border: none !important;
    box-shadow: none !important;
}

.afp-filters .afp-toggle-input:checked+.afp-toggle-switch {
    background: var(--afp-accent, #3b82f6) !important;
}

.afp-filters .afp-toggle-input:focus-visible+.afp-toggle-switch {
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3) !important;
}

/* Clear button */
.afp-filters .afp-clear-all-btn {
    border: 1px solid rgba(220, 38, 38, 0.2) !important;
    border-radius: var(--afp-border-radius, 6px) !important;
    box-shadow: none !important;
    outline: none !important;
}

.afp-filters .afp-clear-all-btn:hover,
.afp-filters .afp-clear-all-btn:focus,
.afp-filters .afp-clear-all-btn:active {
    box-shadow: none !important;
    outline: none !important;
}