/* Primary Elements */ 

:root {
    --light-bg: #F8F9FA;
    --p48-pink: #FF2DAA;
    --p48-blue: #1F2A8A;
    --text-primary: #1A1A1A;
    --text-secondary: #666666;
    --neon: 0 0 15px rgba(255, 45, 170, 0.3); 
}

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

html, body {
    overflow: hidden;
}

body {
    color: var(--text-primary);
    background: var(--light-bg); 
    margin: 0;
    display: grid; 
    grid-template-rows: auto 1fr;
    font-family: 'Montserrat', Arial; 
}

/* Header styling */ 

header { 
    height: 70px;
    padding: 0 40px; 
    display: flex; 
    background-color: #FFFFFF; 
    flex-direction: row; 
    align-items: center;
    justify-content: space-between; 
    border-bottom: 2px solid var(--p48-blue); 
    z-index: 1000; 
    box-shadow: 0 2px 110px rgba(0, 0, 0, 0.2)
}

header img {
    max-height: 50px; 
}

header nav ul {
    display: flex; 
    flex-direction: row; 
    gap: 30px; 
    list-style-type: none; 
}

/* Button Handling */ 
header nav ul li {
    font-size: 1.1em;
    font-weight: 600; 
    text-transform: uppercase; 
    cursor: pointer; 
    padding: 5px; 
    border-radius: 8px; 
}

header nav ul li a, #reset-button, .utility-button { 
    text-decoration: none; 
    color: var(--text-primary);
}

header nav ul li a:hover, #reset-button:hover, .utility-button:hover {
    color: white; 
}

header nav ul li:hover, #reset-button:hover, .utility-button:hover {
    transition: all 0.3s ease-out; 
    transform: scale(1.1);
    background-color: var(--p48-pink);
    color: #FFFFFF;
    border: 2px solid var(--p48-blue);
    box-shadow: var(--neon);
}

header nav ul li:active, #reset-button:active, .utility-button:active {
    transform: scale(0.9); 
}

/* Styling */
main {
    overflow: hidden;
    height: calc(100vh - 70px); 
    display: flex; 
} 

/* Map Styling */ 
#map {
    height: 100%; 
    width: 100%; 
    flex: 1; 
    background: var(--light-bg); 
    overflow: hidden; 
}

/* Aside Styling */ 
aside {
    width: 320px; 
    height: calc(100vh - 70px); 
    z-index: 1000;
    background: #FFFFFF; 
    position: fixed;   
    padding: 40px 15px;
    top: 70px; 
    overflow-y: scroll; 
}

#filter-bar {
    left: -320px;
    border-bottom-right-radius: 10px;
    border-top-right-radius: 10px;
    transition: left 0.5s ease-out; 
    overflow-x: visible; 
}

#active-filters {
    width: 300px;
    height: 300px;
    position: fixed;
    right: -300px;
    top: 70px;
    background: #FFFFFF;
    z-index: 1000;
    padding: 20px 15px;
    transition: right 0.5s ease-out;
    overflow-y: auto;
    border-radius: 10px; 
    box-shadow: 5px 4px 20px 2px rgba(0,0,0,0.3);
    display: flex; 
    flex-direction: column; 
    justify-content: space-between;
    align-items: center;
}

#active-filters.open-right {
    right: 40px;
}

.active-section {
    margin-bottom: 20px;
}

.active-section h2 {
    font-size: 0.75em;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

/* Collapsible Aside */ 

#filter-bar.open {
    left: 0; 
}

#filter-toggle.toggle-button {
    position: fixed;  
    left: 0;          
    top: 90px;        
    width: 40px;  
    height: 50px; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    border: none; 
    color: white; 
    background: var(--p48-blue);
    cursor: pointer; 
    border-radius: 0 12px 12px 0;
    font-size: 1.8em;
    box-shadow: 5px 0 10px rgba(31, 42, 138, 0.2);
    transition: left 0.5s ease-out;  
    z-index: 1001;  
}

#active-filter-toggle.toggle-button {
    position: fixed; 
    right: 0; 
    top: 240px; 
    width: 40px; 
    height: 50px; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    border: none; 
    color: white; 
    background: var(--p48-blue); 
    cursor: pointer; 
    border-radius: 12px 0 0 12px;
    font-size: 1.8em;
    box-shadow: 5px 0 10px rgba(31, 42, 138, 0.2);
    transition: right 0.5s ease-out;  
    z-index: 1001; 
}

#active-filters.open-right ~ #active-filter-toggle { right: 340px; }

#filter-bar.open ~ #filter-toggle.toggle-button {
    left: 320px; 
}

.arrow {
    display: inline-block; 
    transition: transform 0.5s; 
}

#filter-bar.open ~ #filter-toggle .arrow { transform: rotate(180deg); }

#active-filters.open-right ~ #active-filter-toggle .arrow { transform: rotate(180deg); }

/* Collapsible Filters Styling */
.section-reveal {
    display: flex; 
    flex-direction: column; 
}

.reveal {
    padding: 15px 20px; 
    border-radius: 10px; 
    width: 100%; 
    color: var(--p48-blue); 
    background-color: var(--light-bg); 
    border: 1px solid rgba(31, 42, 138, 0.1); 
    cursor: pointer; 
    text-align: center; 
    font-weight: bold; 
    font-size: 1.1em; 
    text-transform: uppercase; 
    letter-spacing: 1px; 
    margin: 8px 0 0 8px; 
    transition: 0.3s ease; 
}

.active, .reveal:hover {
    background-color: #FFFFFF; 
    border-color: var(--p48-pink);
    box-shadow: var(--neon); 
    color: var(--p48-pink); 
    transform: scale(1.05) translateX(-5px); 
}

.content {
    padding: 0 18px; 
    margin: 5px 0 10px; 
    max-height: 0; 
    overflow: hidden; 
    text-align: center; 
    transition: max-height 0.3s ease-out; 
}

/* Filter Sections */ 
.search {
    width: 100%; 
    padding: 8px; 
    margin: 5px; 
    border: 1px solid #E0E0E0;
    background: var(--light-bg); 
    outline: none;  
    border-radius: 8px; 
}

.search:focus {
    border-color: var(--p48-blue); 
}

/* Filter Dropdowns Styling*/ 

.dropdown-list {
    list-style: none;
    max-height: 200px; 
    overflow-y: auto; 
    overflow-x: hidden; 
    overscroll-behavior: contain;
    margin: 10px 0;
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    z-index: 2000; 
    position: absolute; 
    width: 80%; 
}

.dropdown-list li {
    padding: 8px; 
    cursor: pointer; 
    border: 2px solid var(--p48-blue);
    border-radius: 30px; 
    background-color: white;
    margin: 10px;   
    transition: 0.3s ease-out; 
}

.dropdown-list li:hover { 
    transform: scale(1.1);
    background-color: #FFF0F9; 
    color: var(--p48-pink); 
    font-weight: 600; 
}

.hidden {
    display: none; 
}

/* Radio buttons */
fieldset {
    border: 2px solid var(--p48-blue); 
    margin-top: 10px;
}

fieldset legend {
    background: var(--light-bg);
    border: 2px solid var(--p48-blue); 
    color: var(--p48-pink); 
    padding: 3px 6px; 
    border-radius: 5px; 
    text-align: center; 
    margin: auto; 
}

fieldset input {
    margin: .5rem; 
}

#reset-button, .utility-button {
    width: 100%; 
    padding: 8px;
    margin: 10px 0; 
    font-size: 1.1em;
    font-weight: 600; 
    text-transform: uppercase; 
    cursor: pointer;
    border: 1px solid #E0E0E0;
    background: var(--light-bg);
    border-radius: 8px;
}

/* Active Filters Styling */ 
.active-section li {
    list-style-type: none;  
    text-align: center; 
    font-weight: bold;  
}

.active-section button {
    color: var(--text-primary); 
    padding: 3px; 
    font-weight: bold; 
    border: none; 
    border-radius: 5px; 
}

.active-section button:hover {
    cursor: pointer; 
    background-color: var(--p48-pink);
    border: 2px solid var(--p48-blue); 
    box-shadow: var(--neon); 
    color: white; 
    transform: scale(1.1); 
    transition: all 0.3s ease-out; 
}

/* style for checkbox */
.filter-chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.filter-chip-label {
  flex: 1;         
}

.chip-disabled .filter-chip-label {
  opacity: 0.45;      
}

:root {
    --active-filters-width: 250px;
    --toggle-width: 40px;
}

#active-filters {
    width: var(--active-filters-width);
}

#active-filters.open-right ~ #active-filter-toggle {
    right: calc(var(--active-filters-width) + var(--toggle-width));
}