/* Ok2web Filter - Frontend Styles */

/* Widget Container */
.ok2wf-widget {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    padding: 20px;
}

/* Active Filters */
.ok2wf-active-filters {
    margin-bottom: 20px;
    padding: 15px;
    background: #f7f7f7;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

.ok2wf-active-filters-title {
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ok2wf-active-filters-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.ok2wf-active-filter-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: #fff;
    border: 1px solid #d0d0d0;
    border-radius: 3px;
    font-size: 13px;
    line-height: 1.4;
    transition: all 0.2s ease;
}

.ok2wf-active-filter-item:hover {
    border-color: #999;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.ok2wf-active-filter-item .ok2wf-filter-label {
    color: #666;
    font-weight: 500;
}

.ok2wf-active-filter-item .ok2wf-filter-value {
    color: #333;
    font-weight: 600;
}

.ok2wf-remove-filter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    margin-left: 4px;
    background: #e74c3c;
    color: #fff;
    border-radius: 50%;
    text-decoration: none;
    font-size: 16px;
    font-weight: bold;
    line-height: 1;
    transition: all 0.2s ease;
    cursor: pointer;
}

.ok2wf-remove-filter:hover {
    background: #c0392b;
    transform: scale(1.1);
}

.ok2wf-clear-all {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background: #e74c3c;
    color: #fff !important;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
    border: none;
}

.ok2wf-clear-all:hover {
    background: #c0392b;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Filter Form */
.ok2wf-filter-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: relative; /* v5.0.0: anchor for .ok2wf-inline-apply-popup */
}

.ok2wf-filters {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Filter Group */
.ok2wf-filter-group {
    padding-bottom: 1px;margin-bottom: 1px;
}


.ok2wf-filter-group:last-of-type {
    border-bottom: none;
}

.ok2wf-filter-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 8px 0;
    padding: 5px 10px;
}
/* Collapsible filter title - specific styles */
.ok2wf-collapsible-title {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    user-select: none;
    padding: 0px 0;
    margin: 0 !important;
    line-height: 1.2;
    font-size: 14px;
}

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

.ok2wf-filter-list li {
    margin: 3px 0 3px 0;
}

/* Highlight selected items - text style, no background */
.ok2wf-filter-list li.ok2wf-selected label,
.ok2wf-filter-list li.ok2wf-term-selected label {
    font-weight: 700;
    color: #0066cc;
}

/* Disabled items (zero count) */
.ok2wf-filter-list li.ok2wf-term-disabled label {
    color: #aaa;
    cursor: not-allowed;
}

.ok2wf-filter-list li.ok2wf-term-disabled input {
    opacity: 0.5;
}

.ok2wf-filter-list label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: #555;
    transition: color 0.2s;
}

.ok2wf-filter-list label:hover {
    color: #000;
}

.ok2wf-filter-list input[type="checkbox"],
.ok2wf-filter-list input[type="radio"] {
    margin-right: 6px;
}

.ok2wf-filter-list .count {
    color: #999;
    font-size: 12px;
    margin-left: auto;
}

/* View: List columns */
.ok2wf-filter-list.ok2wf-view-list_2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

/* View: Tiles */
.ok2wf-filter-list.ok2wf-view-tiles {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 5px;
}

/* UI Type: Images (term thumbnails) */
.ok2wf-filter-list.ok2wf-image {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
    gap: 10px;
}

/* Override generic list-item flex styles for image UI */
.ok2wf-filter-list.ok2wf-image li {
    display: block !important;
    justify-content: initial;
    align-items: initial;
    flex-wrap: initial;
    gap: 0;
}

.ok2wf-filter-list.ok2wf-image li label {
    flex: initial;
    width: 100%;
}

.ok2wf-image-tile {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px;
    border: 2px solid #e5e5e5;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    text-align: center;
}

.ok2wf-image-tile input {
    display: none;
}

.ok2wf-image-tile:hover {
    border-color: #999;
}

.ok2wf-image-tile:has(input:checked) {
    border-color: #2c3e50;
    box-shadow: 0 0 0 2px rgba(44, 62, 80, 0.15);
}

.ok2wf-image-box {
    width: 80px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ok2wf-term-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.ok2wf-image-label {
    font-size: 12px;
    line-height: 1.2;
    color: #555;
    min-height: 2.4em;
}

.ok2wf-image-tile .count {
    margin-left: 0;
    font-size: 11px;
}

.ok2wf-tile {
    display: inline-flex !important;
    padding: 5px 7px;
    line-height: 1;
    border: 2px solid #e5e5e5;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
}

.ok2wf-tile input {
    display: none;
}

.ok2wf-tile:hover {
    border-color: #999;
}

.ok2wf-tile input:checked + .ok2wf-tile-label {
    color: #fff;
}

.ok2wf-tile:has(input:checked) {
    background: #2c3e50;
    border-color: #2c3e50;
    color: #fff;
}

.ok2wf-tile-label {
    font-weight: 500;
    transition: color 0.2s;
}

.ok2wf-tile .count {
    font-size: 12px;
    color: #999;
    margin-left: 4px;
}

.ok2wf-tile:has(input:checked) .count {
    color: rgba(255, 255, 255, 0.7);
}

/* UI Type: Color swatches */
.ok2wf-filter-list.ok2wf-color {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.ok2wf-color-item {
    margin: 0 !important;
}

.ok2wf-color-label {
    position: relative;
    display: block !important;
    cursor: pointer;
}

.ok2wf-color-label input {
    display: none;
}

.ok2wf-color-swatch {
    display: block;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 3px solid #e5e5e5;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.ok2wf-color-label:hover .ok2wf-color-swatch {
    border-color: #999;
    transform: scale(1.1);
}

.ok2wf-color-label input:checked + .ok2wf-color-swatch {
    border-color: #2c3e50;
    border-width: 4px;
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px #2c3e50;
}

.ok2wf-view-color .ok2wf-color-swatch {
    width: 44px;
    height: 44px;
}

/* UI Type: Dropdown */
.ok2wf-filter-list.ok2wf-dropdown,
.ok2wf-filter-list.ok2wf-dropdown_search {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

/* Dropdown with search */
.ok2wf-dropdown-search-wrapper {
    position: relative;
}

.ok2wf-dropdown-filter {
    width: 100%;
    padding: 8px 12px;
    margin-bottom: 6px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    box-sizing: border-box;
}

.ok2wf-dropdown-filter:focus {
    outline: none;
    border-color: #2c3e50;
    box-shadow: 0 0 0 1px #2c3e50;
}

/* View: Tags */
.ok2wf-filter-list.ok2wf-view-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ok2wf-tag {
    display: inline-flex !important;
    align-items: center;
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
    font-size: 13px;
}

.ok2wf-tag input {
    display: none;
}

.ok2wf-tag:hover {
    border-color: #999;
    background: #f5f5f5;
}

.ok2wf-tag:has(input:checked) {
    background: #2c3e50;
    border-color: #2c3e50;
    color: #fff;
}

.ok2wf-tag-label {
    font-weight: 500;
    transition: color 0.2s;
}

.ok2wf-tag:has(input:checked) .ok2wf-tag-label {
    color: #fff;
}

/* Color swatch inside tile */
.ok2wf-tile-swatch {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    flex-shrink: 0;
}

.ok2wf-color-tile {
    flex-direction: row;
    align-items: center;
    gap: 6px;
}

/* Color swatch inside tag */
.ok2wf-tag-swatch {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-right: 2px;
    border: 2px solid rgba(0,0,0,0.15);
}

.ok2wf-color-tag {
    gap: 6px;
}

.ok2wf-color-tag:has(input:checked) .ok2wf-tag-swatch {
    border-color: rgba(255,255,255,0.5);
}

/* Image inside tag */
.ok2wf-tag-image {
    width: 20px;
    height: 20px;
    object-fit: contain;
    flex-shrink: 0;
    margin-right: 2px;
    border-radius: 2px;
}

.ok2wf-image-tag {
    gap: 6px;
}

/* Price Filter */
/* Slider track */
.ok2wf-price-slider {
    position: relative;
    margin-bottom: 12px;
}

.ok2wf-price-slider-track {
    position: relative;
    height: 4px;
    background: #e5e5e5;
    border-radius: 2px;
    margin: 14px 0 6px;
}

.ok2wf-price-slider-range {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: #2c3e50;
    border-radius: 2px;
}

.ok2wf-price-range-min,
.ok2wf-price-range-max {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    pointer-events: none;
}

.ok2wf-price-range-min::-webkit-slider-thumb,
.ok2wf-price-range-max::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #2c3e50;
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.25);
    cursor: pointer;
    pointer-events: all;
}

.ok2wf-price-range-min::-moz-range-thumb,
.ok2wf-price-range-max::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #2c3e50;
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.25);
    cursor: pointer;
    pointer-events: all;
}

.ok2wf-price-range-min::-webkit-slider-runnable-track,
.ok2wf-price-range-max::-webkit-slider-runnable-track {
    background: transparent;
}

.ok2wf-price-range-min::-moz-range-track,
.ok2wf-price-range-max::-moz-range-track {
    background: transparent;
}

.ok2wf-price-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ok2wf-price-inputs input[type="number"] {
    flex: 1;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.ok2wf-price-sep {
    color: #999;
    font-weight: 600;
}

/* Stock & Sale Filters */
.ok2wf-stock label,
.ok2wf-sale label {
    display: flex;
    align-items: center;
    font-size: 14px;
    cursor: pointer;
}

/* Actions */
.ok2wf-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.button.ok2wf-apply,
.button.ok2wf-reset,
.ok2wf-inline-apply,
.ok2wf-show-more {
    appearance: none;
    -webkit-appearance: none;
    box-shadow: none;
    text-shadow: none;
    text-decoration: none !important;
    border: 1px solid transparent;
    outline: none;
}

.ok2wf-apply,
.ok2wf-reset {
    flex: 1;
    padding: 6px 12px;
    text-align: center;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}

.ok2wf-apply {
    background: #2c3e50 !important;
    color: #fff !important;
    border-color: #2c3e50 !important;
}

.ok2wf-apply:hover {
    background: #1a252f !important;
    color: #fff !important;
    border-color: #1a252f !important;
}

.ok2wf-apply:disabled,
.button.ok2wf-apply:disabled {
    opacity: 1;
    background: #607080 !important;
    color: #fff !important;
    border-color: #607080 !important;
    cursor: not-allowed;
}

.ok2wf-reset {
    background: #e5e5e5 !important;
    color: #2f3b46 !important;
    border-color: #d0d7de !important;
}

.ok2wf-reset:hover {
    background: #d0d0d0 !important;
    color: #1f2933 !important;
    border-color: #c2c8cf !important;
}

/* Responsive */
@media (max-width: 768px) {
    .ok2wf-filter-list.ok2wf-view-list_2 {
        grid-template-columns: 1fr;
    }
}

/* Filter on shop/archive pages */
.woocommerce .ok2wf-widget {
    margin-bottom: 30px;
}

/* Active filter indicator */
.ok2wf-filter-list li:has(input:checked) > label {
    font-weight: 600;
    color: #2c3e50;
}

/* ==========================================================================
   Inline Apply Button (next to each filter)
   ========================================================================== */

.ok2wf-inline-apply {
    background: #2c3e50 !important;
    color: #fff !important;
    border: 1px solid #2c3e50 !important;
    border-radius: 4px;
    padding: 5px 10px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    cursor: pointer;
    margin-left: 10px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px !important;
    vertical-align: middle;
    line-height: 1;
    white-space: nowrap;
    min-height: 20px !important;
    min-width: 96px;
}

.ok2wf-inline-apply:hover {
    background: #1a252f !important;
    color: #fff !important;
    border-color: #1a252f !important;
    transform: scale(1.05);
}

.ok2wf-inline-apply:active {
    transform: scale(0.95);
}

.ok2wf-inline-apply:disabled {
    opacity: 1;
    background: #607080 !important;
    color: #fff !important;
    border-color: #607080 !important;
    cursor: not-allowed;
}

.ok2wf-apply-zero,
.ok2wf-inline-apply-zero {
    background: #2c3e50 !important;
    color: #fff !important;
    border-color: #2c3e50 !important;
}

.ok2wf-apply-zero:hover,
.ok2wf-inline-apply-zero:hover,
.ok2wf-apply-zero:disabled,
.ok2wf-inline-apply-zero:disabled {
    background: #2c3e50 !important;
    color: #fff !important;
    border-color: #2c3e50 !important;
}

.ok2wf-inline-apply:focus,
.ok2wf-inline-apply:focus-visible,
.button.ok2wf-apply:focus,
.button.ok2wf-apply:focus-visible,
.button.ok2wf-reset:focus,
.button.ok2wf-reset:focus-visible,
.ok2wf-show-more:focus,
.ok2wf-show-more:focus-visible {
    outline: 2px solid #2c3e50;
    outline-offset: 2px;
}

.ok2wf-inline-apply .ok2wf-icon {
    font-size: 14px;
    font-weight: bold;
}

.ok2wf-inline-apply .ok2wf-spinner {
    display: inline-block;
    animation: ok2wf-rotate 1s linear infinite;
}

/* v5.0.0: popup variant — anchored outside the widget, on the right.
   JS positions vertically via inline `top: Npx`. */
.ok2wf-inline-apply.ok2wf-inline-apply-popup {
    position: absolute;
    left: calc(100% + 14px);
    margin-left: 0 !important;
    transform: translateY(-50%);
    z-index: 50;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
    pointer-events: auto;
}

.ok2wf-inline-apply.ok2wf-inline-apply-popup::before {
    content: '';
    position: absolute;
    left: -7px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 7px solid transparent;
    border-bottom: 7px solid transparent;
    border-right: 7px solid #2c3e50;
}

/* Narrow viewports: don't push popup outside the widget — keep it at the right
   edge of the widget instead (overlay last column slightly). */
@media (max-width: 900px) {
    .ok2wf-inline-apply.ok2wf-inline-apply-popup {
        left: auto;
        right: 8px;
        transform: translateY(-50%);
    }
    .ok2wf-inline-apply.ok2wf-inline-apply-popup::before {
        display: none;
    }
}

@keyframes ok2wf-rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* For list items with inline button */
.ok2wf-filter-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

.ok2wf-filter-list li label {
    flex: 1;
    min-width: 0;
}

/* ==========================================================================
   Scrollable Filter Lists
   ========================================================================== */

.ok2wf-filter-list.ok2wf-scrollable {
    max-height: 250px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 5px;
}

/* Filter Count Badge */
.ok2wf-filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 8px;
    margin-left: 8px;
    background: #e74c3c;
    color: #fff;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .ok2wf-active-filters {
        padding: 12px;
        margin-bottom: 15px;
    }
    
    .ok2wf-active-filters-title {
        font-size: 12px;
        margin-bottom: 8px;
    }
    
    .ok2wf-active-filters-list {
        gap: 6px;
    }
    
    .ok2wf-active-filter-item {
        font-size: 12px;
        padding: 5px 8px;
        gap: 4px;
    }
    
    .ok2wf-remove-filter {
        width: 16px;
        height: 16px;
        font-size: 14px;
    }
    
    .ok2wf-clear-all {
        padding: 5px 10px;
        font-size: 11px;
    }
    
    .ok2wf-filter-count {
        min-width: 20px;
        height: 20px;
        padding: 0 6px;
        font-size: 11px;
        margin-left: 6px;
    }
}


/* Custom Scrollbar */
.ok2wf-filter-list.ok2wf-scrollable::-webkit-scrollbar {
    width: 8px;
}

.ok2wf-filter-list.ok2wf-scrollable::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.ok2wf-filter-list.ok2wf-scrollable::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.ok2wf-filter-list.ok2wf-scrollable::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Firefox scrollbar */
.ok2wf-filter-list.ok2wf-scrollable {
    scrollbar-width: thin;
    scrollbar-color: #c1c1c1 #f1f1f1; margin-bottom: 20px;
}

/* ==========================================================================
   Loading Overlay
   ========================================================================== */

.ok2wf-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.ok2wf-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #2c3e50;
    border-radius: 50%;
    animation: ok2wf-spin 1s linear infinite;
}

@keyframes ok2wf-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.ok2wf-loading-overlay p {
    font-size: 16px;
    color: #555;
    margin: 0;
}

.ok2wf-loading-image {
    max-width: 220px;
    height: auto;
}

/* ==========================================================================
   Filter Badge
   ========================================================================== */

.ok2wf-filter-badge {
    display: inline-block;
    background: #d63638;
    color: #fff;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 6px;
    font-weight: 400;
    vertical-align: middle;
}

/* ==========================================================================
   Show More Button
   ========================================================================== */

.ok2wf-filter-list li.ok2wf-hidden-item {
    display: none;
}

/* When "Show more" is expanded, cap list height and allow scrolling */
.ok2wf-filter-list.ok2wf-show-more-expanded {
    max-height: 300px;
}

.ok2wf-show-more {
    display: block;
    width: 100%;
    margin: 5px 0px 10px;
    padding: 0px 10px !important;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #1b73cb !important;
    font-size: 12px !important;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    /* text-transform: uppercase !important; */
    line-height: 1 !important;
    min-height: 24px !important;
}

.ok2wf-show-more:hover {
    background: #e8e8e8;
    border-color: #bbb;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.ok2wf-show-more:active {
    transform: translateY(0);
    box-shadow: none;
}

.ok2wf-show-more.expanded {
    background: #2c3e50;
    color: #fff;
    border-color: #2c3e50;
}

.ok2wf-show-more.expanded:hover {
    background: #1a252f;
    border-color: #1a252f;
}

.ok2wf-show-more::after {
    content: '▼';
    display: inline-block;
    margin-left: 8px;
    font-size: 10px;
    transition: transform 0.3s ease;
}

.ok2wf-show-more.expanded::after {
    content: '▲';
}

/* ==========================================================================
   Pagination (AJAX)
   ========================================================================== */

.ok2wf-pagination-wrap {
    clear: both;
    width: 100%;
}

/* ==========================================================================
   Mobile Responsive
   ========================================================================== */

@media (max-width: 480px) {
    .ok2wf-floating-apply {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .ok2wf-filter-list.ok2wf-scrollable {
        max-height: 200px;
    }
}

/* ==========================================================================
   Price Validation Error
   ========================================================================== */

.ok2wf-price-error {
    color: #d63638;
    font-size: 12px;
    margin-top: 8px;
    padding: 8px 12px;
    background: #fcf0f0;
    border: 1px solid #f0c0c0;
    border-radius: 4px;
    animation: ok2wf-shake 0.4s ease-in-out;
}

.ok2wf-input-error {
    border-color: #d63638 !important;
    box-shadow: 0 0 0 1px #d63638 !important;
}

@keyframes ok2wf-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* ==========================================================================
   Collapsible Filter Groups
   ========================================================================== */

.ok2wf-filter-title-wrap {
    margin-bottom: 2px;
}

.ok2wf-collapsible .ok2wf-filter-title-wrap {
    cursor: pointer;
}

.ok2wf-filter-title-text {
    margin: 0;
    padding: 0;
    line-height: 1;
    font-weight: 500;
    font-size: 14px;
}
/* v5.0.4: Toggle-icon geometry is fully generated by
   SettingsService::getDynamicCss() per icon style (plus / circle_plus /
   square_plus / chevron / caret / arrow / dash) + animation mode.
   Static frontend.css only declares the bare-minimum fallback that lets the
   icon take its space before the inline <style> is parsed. All geometry/colour
   rules previously hardcoded here have been removed because:
     - .ok2wf-collapse-icon::before with width:10px;height:1px broke chevron,
       which expects width:6px;height:1px rotated by ±45deg.
     - .ok2wf-collapse-icon::after with rotate(90deg);opacity:0 in expanded
       state killed the bottom arm of chevron/caret ("only one stripe visible"
       reported in 5.0.3). */

.ok2wf-collapse-icon {
    flex-shrink: 0;
}

.ok2wf-collapsible.ok2wf-collapsed .ok2wf-filter-content {
    display: none;
}

.ok2wf-filter-content {
    margin-top: 10px;
}

/* ==========================================================================
   Slider Filter
   ========================================================================== */

.ok2wf-slider-filter,
.ok2wf-filter-slider {
    padding: 10px 0;
}

.ok2wf-slider-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.ok2wf-slider-inputs input[type="number"] {
    flex: 1;
    min-width: 0;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    text-align: center;
}

.ok2wf-slider-inputs input[type="number"]:focus {
    border-color: #0066cc;
    outline: none;
}

.ok2wf-slider-sep {
    color: #999;
    font-size: 14px;
}

.ok2wf-slider-apply-btn {
    width: 100%;
    padding: 10px 16px;
    margin-top: 15px;
    background: #0066cc;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
}

.ok2wf-slider-apply-btn:hover {
    background: #0052a3;
}

.ok2wf-slider-apply-btn:active {
    background: #003d7a;
}

.ok2wf-slider-track,
.ok2wf-filter-slider .ok2wf-slider-container {
    position: relative;
    height: 20px;
    margin: 0 8px 15px;
}

.ok2wf-slider-track input[type="range"],
.ok2wf-filter-slider .ok2wf-range {
    position: absolute;
    width: 100%;
    height: 5px;
    top: 8px;
    background: transparent;
    pointer-events: none;
    -webkit-appearance: none;
    appearance: none;
}

.ok2wf-slider-track input[type="range"]::-webkit-slider-thumb,
.ok2wf-filter-slider .ok2wf-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: #0066cc;
    border-radius: 50%;
    cursor: pointer;
    pointer-events: auto;
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.ok2wf-slider-track input[type="range"]::-moz-range-thumb,
.ok2wf-filter-slider .ok2wf-range::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: #0066cc;
    border-radius: 50%;
    cursor: pointer;
    pointer-events: auto;
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.ok2wf-slider-range {
    position: absolute;
    height: 5px;
    top: 8px;
    left: 0;
    right: 0;
    background: #ddd;
    border-radius: 3px;
}

.ok2wf-slider-range::after {
    content: '';
    position: absolute;
    height: 100%;
    background: #0066cc;
    border-radius: 3px;
    left: var(--slider-left, 0%);
    right: var(--slider-right, 0%);
}

.ok2wf-slider-hidden-inputs {
    display: none;
}

.ok2wf-filter-title {
    padding: 5px 15px;
    margin: 1px -20px 5px !important;border-bottom: 1px solid #eee;
    border-top: 1px solid #eee;
}
.ok2wf-collapsible-title {
    padding: 5px 15px;
    margin: 1px -20px 5px !important;border-bottom: 1px solid #eee;
    border-top: 1px solid #eee;
}