/* Filters button */
.filters-button-div {
    position: relative;
    width: 90%; /* Spanning 90% of the screen width */
    margin: 0 auto; /* Center the box horizontally */
    z-index: 10;
}

.toggle-container {
    display: flex;
    gap: 5px;
    border: 5px solid #f0f0f0; /* Light grey border */
    border-bottom: none; /* No border at the bottom */
    width: fit-content;
    /* margin-left: 18px; */
}

.filter-and-sorting {
    display: flex;
    background: white;
}

.sort-content {
    margin-left: 10px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.sort-options {
    display: flex;
}

.sort-content .filter-title {
    font-size: 1rem;
    font-family: var(--caps-font);
}

.sort-content .filter-label {
    cursor: pointer;
    display: flex; 
    align-items: center; 
    margin-right: 3px; 
    height: 20px;
}

.sort-content input[type="radio"] {
    cursor: pointer;
}

.sort-label-span {
    padding-left: 3px;
    padding-top: 7px;
}

.toggle-icon {
    width: 35px; /* Adjust icon size */
    height: 35px; /* Adjust icon size */
    padding: 7px;
    opacity: 0.75;
    display: flex;
    align-items: center;
}

.toggle-container {
    background-color: #f0f0f0;
}

.filters-toggle {
    cursor: pointer;
    text-align: center;
}

.filters-content:not(.collapsed) {
    padding: 16px; /* Add padding for better spacing */
}

.filters-content.collapsed {
    max-height: 0px; /* Adjust as needed */
    padding: 0px;
    overflow: hidden; /* Hide content when collapsed */
}

/* Filters form */
.filters-content {
    background-color: #f0f0f0; /* Bright grey box */
    border: 4px solid #f0f0f0; /* Light grey border */
}

#filter-form {
    margin: 0; /* Remove default margin */
    display: grid; /* Use grid layout for columns */
    grid-template-columns: 1fr 2fr 1fr; /* Create responsive columns */
    gap: 20px; /* Adjust spacing between columns */
    justify-content: space-between; /* Distribute columns evenly */
    box-sizing: border-box; /* Ensure padding and borders are included in width calculations */
}

.filters-toggle-title {
    margin: 0px;
    padding: 0.5rem;
    font-size: 1rem;
}

.filter-group {
    display: flex;
    flex-direction: column; /* Vertically list the options */
    gap: 10px; /* Add spacing between options */
}

.filter-group label {
    cursor: pointer; /* Change cursor to pointer for better UX */
}

.filter-title {
    font-size: 1.1rem;
    font-weight: bold;
    line-height: 1.1;
}

.filter-label {
    font-size: 0.9rem;
}

/* Countries */
.continent-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }


/* .europe-column {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
} */

/* Months filter */
.months-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.2rem;
    margin-top: 0.5rem;
}

.months-group button {
    padding: 0.3rem 0.2rem;
    border: 1px solid #ccccccc6;
    border-radius: 8px;
    background-color: #f4f4f4;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
    font-size: 0.9rem;
    min-width: 50px;
    text-align: center;
    font-family: var(--caps-font);

}

.months-group button.active {
    background-color: #005820;
    color: white;
}

.months-group button:not(.active) {
    background-color: rgb(83, 83, 83);
    color: rgb(154, 154, 154);
}

#toggle-any.active {
    background-color: rgb(13, 6, 106);
}

#toggle-any:not(.active) {
    background-color: rgb(83, 83, 83);
    color: rgb(154, 154, 154);
}


/* Difficulty filter */
.filter-icons {
    display: inline-flex;
    cursor: pointer;
}

.filter-icon {
    width: 30px;
    height: auto;
    padding: 2px;
}

.star.filter-icon {
    width: 15px;
    height: auto;
    padding: 2px;
    transform: translateY(-20%); 
}

#difficulty {
    margin-top: 2rem;
    line-height: 1;
}

.difficulty-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

#months {
    margin-top: 1.5rem;
}

#accessibility {
    margin-top: 1.5rem;
}

#hiked-by-me {
    margin-top: 1.5rem;
}

.continent-group {
    line-height: 1.8;
}

.sort-arrow {
    margin-left: 7px;
    margin-right: 3px;
    width: 18px; 
    height: 18px; 
    cursor: pointer;
}

.filter-popup {
    position: absolute;
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 4px 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: none;
    max-width: min(400px, 60vw);
    min-width: max(300px, 20vw);
    font-size: 1rem;
    line-height: 1;
    color: #333;
    margin: 50px;
    transform: translate(-15%, 55%);
}

.info-icon {
    cursor: pointer;
    margin-left: 5px;
    font-size: 16px;
    color: #555;
    position: relative;
}

.practical-filters .filter-label {
    display: flex;
    align-items: center;
    margin-top: 10px;
}


@media (max-width: 600px) {
    #filter-form {
        grid-template-columns: 1fr; /* Single column layout */
        gap: 20px; /* Adjust spacing for smaller screens */
    }
    
    .sort-label {
        font-size: 0.6rem; /* Adjust font size for radio buttons */
    }
    
    .sort-options {
        grid-template-columns: repeat(2, 1fr);
        display: grid;
        row-gap: 1px;
    }
}
