/* Filter Panel Styles */

/* Main container - merged filter panel */
#filter-panel {
    position: fixed;
    top: 55%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    z-index: 99;
    background: linear-gradient(to bottom, var(--primary-color), #000000);
    color: white;
    padding: 28px 10px 20px;
    margin: 0 auto;
    border-radius: 25px;
    border: 1px solid var(--accent-color);
    max-width: 95%;
    width: 95%;
    display: block;
    overflow: hidden;
    font-family: 'Inter', sans-serif;
    box-shadow: 0 0 20px var(--accent-color);
}

#filter-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('../assets/dithers/dithered_circles.png');
    background-size: auto 100%; /* Fill vertically */
    background-repeat: repeat-x; /* Repeat horizontally */
    opacity: 0.15;
    z-index: 1;
    pointer-events: none;
    mix-blend-mode: overlay;
    border-radius: 0 0 25px 25px; /* Match the border-radius of filter-panel */
}

.filter-steps {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 14px;
    color: white;
    margin-bottom: 26px;
    position: relative;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    padding: 16px 16px;
    text-align: left;
    list-style-type: decimal;
    border: 1px solid white;
    border-left: 4px solid var(--accent-color);
    border-right: 4px solid var(--accent-color);
    border-radius: 16px;
    background-color: rgba(255, 255, 255, 0.1);
}

.filter-steps li {
    margin-bottom: 4px;
    margin-left: 16px;
    padding-left: 8px;
    line-height: 1.1;
}

.filter-steps li:last-child {
    margin-bottom: 0;
}

/* Mobile first approach - start with styles for small screens */
.filter-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.filter-label {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 9px;
    text-transform: uppercase;
    width: 60px; /* Fixed width for all labels */
    min-width: 60px; /* Ensure minimum width */
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.2; /* Spacing between the two lines */
    height: 36px;
    margin: 0 4px;

}

.filter-row .filter-label:first-child {
    text-align: right; /* Right-align first label */
    /* padding-right: 5px; */
}

.filter-row .filter-label:last-child {
    text-align: left; /* Left-align last label */
    /* padding-left: 5px; */
}

/* Slider styles */
.slider-container {
    width: 160px; /* Fixed width instead of flex */
    flex: 0 0 160px; /* Fixed width, not growing or shrinking */
    margin: 0 8px
}

.slider-track {
    display: flex;
    width: 100%;
    height: 26px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid var(--accent-color);
    background-color: var(--purple-blue-color);
}

.slider-segment {
    flex: 1;
    background-color: var(--purple-blue-color);
    border-right: 2px solid var(--accent-color);
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.slider-segment:last-child {
    border-right: none;
}

.slider-segment.active {
    background-color: var(--accent-color);
}

/* Filter logo */
.filter-logo {
    text-align: center;
    margin-bottom: 15px;
    position: relative;
    z-index: 2;
}

.filter-logo img {
    max-width: 150px;
    height: auto;
}

/* Action buttons container - contains reset button and unpack button */
.filter-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    margin-bottom: 15px;
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 90%;
    margin-left: auto;
    margin-right: auto;
    gap: 20px;
}

.filter-actions .reset-btn {
    width: 50px;
    height: 50px;
    min-width: 50px; /* Prevent shrinking */
    padding: 0;
    background-color: var(--primary-color);
    color: white;
    border: 2px solid var(--accent-color);
    border-radius: 15px; 
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 28px; /* Even bigger icon */
    text-transform: uppercase;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 22px; /* Extra large icon */
    line-height: 0;
    padding-bottom: 5px; /* Adjust visual alignment */
    box-shadow: 4px 4px 0px var(--accent-color);
    position: relative;
}
.filter-actions .reset-btn:active {
    box-shadow: 0px 0px 0px var(--accent-color);
    top: 4px;
    left: 4px;
}

@media (min-width: 768px) {
    .filter-actions .reset-btn:hover {
        background-color: var(--secondary-color);
    }

}


/* Keep the unpack button styles but ensure it works inside filter-actions */
.unpack-button {
    font-size: 12px;
    font-weight: 700;
    width: calc(100% - 65px); /* Allow space for reset button */
    padding: 10px 10px;
    height: 50px;
    margin: 0;
    z-index: 2;
}


@media (min-width: 430px) {
    .unpack-button {
        font-size: 14px;
    }
}

@media (min-width: 768px) {
    .unpack-button {
        font-size: 16px;
    }
}



/* Media queries for larger screens - Mobile first approach */
@media (min-width: 481px) {
    .filter-row {
        margin-bottom: 24px;
        max-width: 600px;
    }
    
    .filter-steps {
        max-width: 600px;
        margin-bottom: 24px;
        padding: 18px 18px;
    }
    
    .filter-label {
        width: 100px;
        /* min-width: 100px; */
        font-size: 13px;
        height: 38px;
    }
    
    .slider-container {
        width: 250px;
        flex: 0 0 250px;
    }
    
    .slider-track {
        height: 28px;
    }
    
    .filter-actions .reset-btn {
        width: 45px;
        height: 45px;
        min-width: 45px;
    }
}

@media (min-width: 769px) {
    #filter-panel {
        left: 0;
        width: 480px;
        right: auto;
        padding-top: 20px;
        margin: 50px 16px 20px;
        top: var(--header-height);
        transform: none;
    }

    /* Hidden state for filter panel on desktop */
    #filter-panel.hidden {
        transform: none !important; /* Never hide on desktop */
        visibility: visible !important; /* Always visible on desktop */
    }
    
    .filter-row {
        margin-bottom: 32px;
        max-width: 700px;
    }
    
    .filter-steps {
        max-width: 700px;
        margin-bottom: 32px;
        padding: 18px;
    }
    
    .filter-label {
        width: 120px;
        /* min-width: 120px; */
        font-size: 13px;
        height: 40px;
    }
    
    .slider-container {
        width: 220px;
        flex: 0 0 220px;
    }
    
    .slider-track {
        height: 30px;
    }
    
}

/* For the admin panel slider labels */
.slider-label span {
    display: inline-block;
    line-height: 1.2;
    font-size: 12px;
    min-height: 36px;
    white-space: normal; /* Allow text to wrap naturally */
    word-wrap: break-word; /* Break words that are too long */
    hyphens: auto; /* Enable hyphenation */
    width: 100%; /* Ensure the text has space to wrap */
}

/* Mobile only - hide when panel is hidden */
@media (max-width: 768px) {
    #filter-panel.hidden {
        transform: translateY(-200%); /* Slide up and hide */
        visibility: hidden; /* Hide completely when transformed */
    }

}
