/* Modern sidebar filter design */
.drseo-filter-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 32px;
    padding: 20px 0;
}

.drseo-filter-group {
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 20px;
    margin-bottom: 0;
}

.drseo-filter-group:last-child {
    border-bottom: none;
}

.drseo-filter-group h4 {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Flexible filter values container */
.drseo-filter-values {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
    max-height: 200px;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.drseo-filter-values.expanded {
    max-height: none;
}

/* Color swatches - flexible inline layout */
.drseo-color-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.drseo-color-label:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.drseo-color-swatch {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #d1d5db;
    transition: all 0.2s;
    flex-shrink: 0;
}

.drseo-color-label input:checked ~ .drseo-color-swatch,
.drseo-color-label input:checked {
    border-color: #111827;
    border-width: 3px;
}

.drseo-color-label input:checked ~ span {
    color: #111827;
    font-weight: 500;
}

.drseo-color-label input:checked {
    background: #111827;
}

.drseo-color-label input:checked:hover {
    background: #374151;
}

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

.drseo-color-label span {
    font-size: 13px;
    color: #6b7280;
}

/* Regular checkbox labels - flexible pill style */
.drseo-label {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    color: #374151;
    transition: all 0.2s;
    white-space: nowrap;
}

.drseo-label:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.drseo-label input[type="checkbox"]:checked ~ span,
.drseo-label input[type="checkbox"]:checked {
	color: #c0a200;
}

.drseo-label input[type="checkbox"]:checked:hover {
    background: #374151;
}

.drseo-label input[type="checkbox"] {
    display: none;
}

.drseo-label span {
    user-select: none;
}

/* Submit button - minimal & modern */
.drseo-btn {
    background: #fed700;
    color: #222;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: background 0.2s, transform 0.1s;
    width: 100%;
}

.drseo-btn:hover {
    background: #eec900;
}

.drseo-btn:active {
    transform: translateY(1px);
}

/* Show More/Less button */
.drseo-show-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    padding: 6px 12px;
    background: transparent;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    color: #6b7280;
    transition: all 0.2s;
}

.drseo-show-more-btn:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.drseo-show-more-btn .icon {
    transition: transform 0.2s;
}

.drseo-show-more-btn.expanded .icon {
    transform: rotate(180deg);
}

/* Mobile Horizontal Filter Bar */
.drseo-mobile-filters-bar {
    display: none;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    padding: 12px 0;
    margin: 0 -15px 20px -15px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.drseo-mobile-filters-bar::-webkit-scrollbar {
    display: none;
}

.drseo-filter-bar-container {
    display: inline-flex;
    gap: 8px;
    padding: 0 15px;
    white-space: nowrap;
}

.drseo-filter-bar-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    transition: all 0.2s;
    white-space: nowrap;
    min-height: 36px;
}

.drseo-filter-bar-item:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.drseo-filter-bar-item.active {
    background: #fc4a00;
    color: #fff;
    border-color: #fc4a00;
}

.drseo-filter-bar-item .badge {
    background: #fc4a00;
    color: #fff;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: 600;
    min-width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Mobile Filter Drawer (Bottom Sheet) */
.drseo-filter-drawer-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
}

.drseo-filter-drawer-overlay.active {
    display: block;
}

.drseo-filter-drawer {
    position: fixed;
    bottom: -100%;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    max-height: 80vh;
    transition: bottom 0.3s ease;
}

.drseo-filter-drawer.active {
    bottom: 0;
}

.drseo-filter-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e5e7eb;
}

.drseo-filter-drawer-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #111827;
}

.drseo-filter-drawer-close {
    background: transparent;
    border: none;
    font-size: 24px;
    color: #6b7280;
    cursor: pointer;
    padding: 4px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s;
}

.drseo-filter-drawer-body {
    padding: 20px;
    max-height: calc(80vh - 80px);
    overflow-y: auto;
}

.drseo-drawer-apply-wrapper {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.drseo-apply-button-wrapper {
	display: flex;
    align-items: start;
    flex-direction: column;
    gap: 5px;
    justify-content: start;
}

.drseo-btn.drseo-btn-clear {
	margin-left: 0 !important;
	text-align: center;
}

/* Mobile Filter Toggle Button Placement */
@media (max-width: 1024px) {
    .drseo-mobile-filters-bar {
        display: block;
    }

    .drseo-filter-form {
        gap: 20px;
        margin-bottom: 24px;
        padding: 0;
    }

    .drseo-filter-group {
        padding-bottom: 24px;
        border-bottom: 1px solid #e5e7eb;
    }

    .drseo-filter-group h4 {
        font-size: 15px;
        margin-bottom: 16px;
    }

    .drseo-filter-values {
        gap: 10px;
    }

    .drseo-color-label {
        padding: 10px 16px;
        min-height: 44px; /* iOS touch target */
    }

    .drseo-label {
        padding: 10px 16px;
        min-height: 44px; /* iOS touch target */
        font-size: 14px;
    }

    .drseo-show-more-btn {
        padding: 10px 16px;
        font-size: 13px;
        min-height: 44px; /* iOS touch target */
    }

    .drseo-btn {
        padding: 16px 24px;
        font-size: 15px;
        min-height: 48px;
    }

    /* Show mobile filters bar */
    .drseo-mobile-filters-bar {
        display: block !important;
    }

    /* Hide sidebar on mobile/tablet but keep in DOM for cloning */
    .drseo-filter-sidebar {
        display: none !important;
    }
}

@media (min-width: 1025px) {
    .drseo-filter-sidebar {
        display: block !important;
    }

    .drseo-mobile-filters-bar,
    .drseo-filter-drawer-overlay,
    .drseo-filter-drawer {
        display: none !important;
    }
}
