* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body,
html {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial,
        sans-serif;
}

.filters-container {
    position: absolute;
    top: 20px;
    left: 20px;
    bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    z-index: 1000;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    padding-right: 5px;
}

.filters-container::-webkit-scrollbar {
    width: 8px;
}

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

.filters-container::-webkit-scrollbar-thumb {
    background: #000000;
    border: 2px solid transparent;
}

.filters-container::-webkit-scrollbar-thumb:hover {
    background: #333333;
}

/* Tablet Responsive (768px - 1024px) */
@media (max-width: 1024px) {
    .filters-container {
        top: 15px;
        left: 15px;
        bottom: 15px;
        gap: 15px;
        max-height: calc(100vh - 30px);
    }
}

/* Mobile Landscape and Small Tablets (481px - 768px) */
@media (max-width: 768px) {
    .filters-container {
        top: auto;
        left: 0;
        right: 0;
        bottom: 50px; /* Position above the fixed toggle button */
        max-height: calc(80vh - 50px);
        gap: 0;
        padding: 0;
        background: rgba(255, 255, 255, 0.98);
        box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.15);
        border-top: 3px solid #000000;
        transition: transform 0.3s ease, opacity 0.3s ease;
        overflow-y: auto;
        overflow-x: hidden;
        position: fixed;
    }

    .filters-container.mobile-hidden {
        transform: translateY(100%);
        opacity: 0;
        pointer-events: none;
    }

    /* Hide scrollbar on mobile for cleaner look */
    .filters-container::-webkit-scrollbar {
        display: none;
    }
}

/* Mobile Portrait (320px - 480px) */
@media (max-width: 480px) {
    .filters-container {
        bottom: 45px; /* Smaller button on mobile */
        max-height: calc(80vh - 45px);
    }
}

/* Very small screens */
@media (max-width: 360px) {
    .filters-container {
        bottom: 40px;
        max-height: calc(80vh - 40px);
    }
}