/* ============================================
   VTNM Smart Filter — Styles
   Glassmorphism design matching vattunhamay-hallmark theme
   ============================================ */

/* Filter container */
.vtnm-filter-sidebar {
    position: sticky;
    top: 5rem;
}

/* Filter group */
.vtnm-filter-group {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(226, 232, 240, 0.6);
    border-radius: 1rem;
    padding: 1.25rem;
    margin-bottom: 1rem;
    transition: all 0.2s ease;
}

.vtnm-filter-group:hover {
    border-color: rgba(147, 197, 253, 0.5);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.04);
}

/* Group header */
.vtnm-filter-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #334155;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(226, 232, 240, 0.5);
    margin-bottom: 0.75rem;
    user-select: none;
}

.vtnm-filter-group-header svg {
    width: 1rem;
    height: 1rem;
    color: #94a3b8;
    transition: transform 0.2s ease;
}

.vtnm-filter-group-header[aria-expanded="false"] svg {
    transform: rotate(-90deg);
}

/* Checkbox list */
.vtnm-filter-list {
    max-height: 220px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.vtnm-filter-list::-webkit-scrollbar {
    width: 4px;
}

.vtnm-filter-list::-webkit-scrollbar-track {
    background: transparent;
}

.vtnm-filter-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 100px;
}

/* Checkbox item */
.vtnm-filter-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0;
    cursor: pointer;
    transition: opacity 0.15s ease;
}

.vtnm-filter-item:hover {
    opacity: 0.85;
}

.vtnm-filter-item input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 1rem;
    height: 1rem;
    border: 1.5px solid #cbd5e1;
    border-radius: 0.25rem;
    background: white;
    cursor: pointer;
    flex-shrink: 0;
    position: relative;
    transition: all 0.15s ease;
}

.vtnm-filter-item input[type="checkbox"]:checked {
    background: #2563eb;
    border-color: #2563eb;
}

.vtnm-filter-item input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 3px;
    top: 1px;
    width: 5px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.vtnm-filter-item .vtnm-label {
    font-size: 0.8125rem;
    color: #475569;
    flex: 1;
    line-height: 1.4;
}

.vtnm-filter-item .vtnm-count {
    font-size: 0.625rem;
    color: #94a3b8;
    font-weight: 600;
    background: rgba(241, 245, 249, 0.8);
    padding: 0.125rem 0.375rem;
    border-radius: 100px;
    min-width: 1.5rem;
    text-align: center;
}

/* Price filter */
.vtnm-price-inputs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.vtnm-price-inputs input {
    width: 100%;
    padding: 0.5rem 0.625rem;
    font-size: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    background: white;
    color: #334155;
    outline: none;
    transition: border-color 0.15s ease;
}

.vtnm-price-inputs input:focus {
    border-color: #93c5fd;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.vtnm-price-inputs .vtnm-separator {
    color: #94a3b8;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.vtnm-price-apply {
    margin-top: 0.5rem;
    width: 100%;
    padding: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #2563eb, #4f46e5);
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.vtnm-price-apply:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.vtnm-price-presets {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.375rem;
    margin-top: 0.5rem;
}

.vtnm-price-preset {
    padding: 0.375rem 0.5rem;
    font-size: 0.625rem;
    font-weight: 600;
    color: #475569;
    background: rgba(241, 245, 249, 0.8);
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    cursor: pointer;
    text-align: center;
    transition: all 0.15s ease;
}

.vtnm-price-preset:hover {
    background: rgba(219, 234, 254, 0.6);
    border-color: #93c5fd;
    color: #2563eb;
}

/* Active filter tags */
.vtnm-active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-bottom: 1rem;
}

.vtnm-filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.6875rem;
    font-weight: 600;
    color: #2563eb;
    background: rgba(219, 234, 254, 0.5);
    border: 1px solid rgba(147, 197, 253, 0.5);
    border-radius: 100px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.vtnm-filter-tag:hover {
    background: rgba(219, 234, 254, 0.8);
    border-color: #93c5fd;
}

.vtnm-filter-tag svg {
    width: 0.75rem;
    height: 0.75rem;
}

.vtnm-reset-all {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.6875rem;
    font-weight: 600;
    color: #ef4444;
    background: rgba(254, 226, 226, 0.5);
    border: 1px solid rgba(252, 165, 165, 0.5);
    border-radius: 100px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.vtnm-reset-all:hover {
    background: rgba(254, 226, 226, 0.8);
}

/* Loading overlay */
.vtnm-loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    border-radius: 1rem;
}

.vtnm-spinner {
    width: 2rem;
    height: 2rem;
    border: 3px solid #e2e8f0;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: vtnm-spin 0.6s linear infinite;
}

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

/* Result count bar */
.vtnm-result-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(226, 232, 240, 0.6);
    border-radius: 0.75rem;
    margin-bottom: 1rem;
}

.vtnm-result-count {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #334155;
}

/* Sort dropdown */
.vtnm-sort-select {
    padding: 0.375rem 0.625rem;
    font-size: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    background: white;
    color: #475569;
    outline: none;
    cursor: pointer;
}

.vtnm-sort-select:focus {
    border-color: #93c5fd;
}

/* Mobile filter button */
.vtnm-mobile-filter-btn {
    display: none;
    position: fixed;
    bottom: 4.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 35;
    padding: 0.75rem 1.25rem;
    font-size: 0.8125rem;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, #2563eb, #4f46e5);
    border: none;
    border-radius: 100px;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.3);
    transition: all 0.2s ease;
}

.vtnm-mobile-filter-btn:hover {
    transform: translateX(-50%) translateY(-2px);
    box-shadow: 0 12px 32px rgba(37, 99, 235, 0.4);
}

.vtnm-mobile-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    font-size: 0.625rem;
    font-weight: 800;
    color: #2563eb;
    background: white;
    border-radius: 50%;
    margin-left: 0.5rem;
}

/* Mobile drawer */
.vtnm-mobile-drawer {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: none;
}

.vtnm-mobile-drawer.open {
    display: block;
}

.vtnm-drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
}

.vtnm-drawer-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-height: 85vh;
    background: white;
    border-top-left-radius: 1.5rem;
    border-top-right-radius: 1.5rem;
    overflow-y: auto;
    padding: 1.5rem;
    transform: translateY(0);
    transition: transform 0.3s ease;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.15);
}

.vtnm-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 1rem;
}

.vtnm-drawer-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
}

.vtnm-drawer-close {
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f1f5f9;
    border: none;
    cursor: pointer;
    color: #64748b;
}

.vtnm-drawer-footer {
    display: flex;
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
    margin-top: 1rem;
}

.vtnm-drawer-reset {
    flex: 1;
    padding: 0.75rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #64748b;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    cursor: pointer;
}

.vtnm-drawer-apply {
    flex: 2;
    padding: 0.75rem;
    font-size: 0.8125rem;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, #2563eb, #4f46e5);
    border: none;
    border-radius: 0.75rem;
    cursor: pointer;
}

/* No results */
.vtnm-no-results {
    text-align: center;
    padding: 4rem 2rem;
}

/* Responsive */
@media (max-width: 768px) {
    .vtnm-filter-sidebar {
        display: none;
    }

    .vtnm-mobile-filter-btn {
        display: flex;
        align-items: center;
    }
}
