@charset "utf-8";

/* Disable body scroll when panel open */
body.noscroll {
    overflow: hidden;
    height: 100vh;
}


/* ------------------------------------------------------ */
/*  FILTER BUTTON                                          */
/* ------------------------------------------------------ */
.filter-btn {
    position: fixed;
    top: 55px;
    right: 0;
    width: 60px;
    height: 60px;
    background: #eee;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.8);
    z-index: 2003;
    transition: background 0.2s ease;
}
.filter-btn:hover { background: #ddd; }
.filter-btn.open #filterIcon { transform: rotate(90deg); }

#filterIcon { transition: transform 0.3s ease; }

/* Dark mode */
@media (prefers-color-scheme: dark) {
    .filter-btn { background: #333; color: #fff; }
    .filter-btn:hover { background: #444; }
}

/* ------------------------------------------------------ */
/*  OVERLAY                                                */
/* ------------------------------------------------------ */
.filter-overlay {
    position: fixed;
    inset: 0;
    backdrop-filter: blur(6px);
    background: rgba(0,0,0,0.25);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 2001;
}
.filter-overlay.show { 
    opacity: 1;
    pointer-events: auto;
}

/* ------------------------------------------------------ */
/*  PANEL WRAPPER (fixes scrollbar issues)                 */
/* ------------------------------------------------------ */
.filter-panel-wrapper {
    position: fixed;
    inset: 0;
    overflow: hidden; /* prevents ANY scrollbars */
    pointer-events: none;
    z-index: 2002;
}

/* ------------------------------------------------------ */
/*  PANEL                                                  */
/* ------------------------------------------------------ */
.filter-panel {
    position: absolute;
    top: 55px;
    right: 0;
    width: 300px;
    max-width: 90%;
    height: 100vh;
    background: #fff;
    padding: 20px;
	padding-bottom: 120px;
    box-shadow: -4px 0 15px rgba(0,0,0,0.2);
    transform: translateX(100%); /* hidden */
    transition: transform 0.3s ease;
    pointer-events: auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.filter-panel h6 { font-size:28px; text-shadow: none; color: #fff;
}

.filter-panel button {
	color: #fff;
	background-color: none; border: none;
    box-shadow: none;
}
.filter-panel button:hover {
	background-color: inherit;
}
	

.filter-panel.show {
    transform: translateX(0);
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
    .filter-panel { background: #222; color: #eee; }
    .filter-panel input {
        background: #333;
        color: #fff;
        border: 1px solid #444;
    }
    .filter-group { border-bottom: 1px solid #444; }
}

/* Panel title */
.filter-panel h2 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 22px;
}

/* Drag Handle */
.drag-handle {
    width: 50px;
    height: 5px;
    background: #ccc;
    border-radius: 3px;
    margin: 5px auto 15px;
}
@media (prefers-color-scheme: dark) {
    .drag-handle { background: #555; }
}

/* ------------------------------------------------------ */
/*  ACCORDION GROUPS                                       */
/* ------------------------------------------------------ */
.filter-group {
    border-bottom: 1px solid #ccc;
    padding-bottom: 10px;
    margin-bottom: 15px;
}
.group-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: none;
    border: none;
    padding: 10px 0;
    font-size: 17px;
    cursor: pointer;
}
.group-header .arrow {
    transition: transform 0.25s ease;
	font-size: 30px;
}
.group-header.open .arrow {
    transform: rotate(90deg);
	font-size: 24px;
}

.group-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.group-content input {
    width: 100%;
    margin: 6px 0 12px;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 6px;
}


/* ------------------------------------------------------ */
/*  APPLY BUTTON                                           */
/* ------------------------------------------------------ */
.apply-btn, .filter-panel input[type="submit"] {
    background: #007bff;
    color: white;
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 20px;
}
.apply-btn:hover { opacity: 0.9; }
