/* ===== Global Styles ===== */
body {
    background-color: rgb(249, 248, 248);
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0;
    padding: 20px;
    font-family: 'Courier New', Courier, monospace;
}

p {
    font-size: 1rem;
    color: black;
    text-align: center;
}

/* ===== Title ===== */
.title {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 0px;
}

#loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #ffffff; /* Dark background */
    z-index: 1002;
    display: flex;
    align-items: center;
    justify-content: center;
}

#content h2 {
    color: #000000; /* White text */
    overflow: hidden; /* Hide text outside the container */
    font-size: 1.3rem;
    font-weight: bold;
    text-transform: uppercase;
    margin: 0 auto;
    white-space: nowrap; /* Ensure text stays on one line */
    text-align: center;
    max-width: 100%;
    box-sizing: border-box;
    border-right: 2px solid #000000; /* Optional: Add a typing cursor effect */
    animation: typing 2s steps(33, end), blink-cursor 0.5s step-end infinite;
}

/* Typing animation */
@keyframes typing {
    from {
        width: 0;
    }
    to {
        width: 100%; /* Adjust this value to fit the entire phrase */
    }
}

/* Remove cursor blinking effect */
@keyframes blink-cursor {
    from {
        border-right-color: black;
    }
    to {
        border-right-color: transparent;
    }
}



/* ===== Map ===== */
#map {
    width: 100%;
    height: 75vh;
    max-width: 1200px;
    border: 1px solid #ccc;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    margin: 20px auto;
}

/* Custom circular icon styling */
.custom-icon .icon-wrapper {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    overflow: hidden;
    border: 2.5px solid white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Popup styling */
.popup-content {
    text-align: left;
    font-size: 14px;
}

.popup-title {
    font-weight: bold;
    font-size: 18px;
    margin-bottom: 5px;
}

.popup-detail {
    margin-bottom: 4px;
}

.popup-message {
    font-size: 12px;
    color: #555;
    background-color: #f0f0f0;
    padding: 5px;
    border-radius: 5px;
    margin-top: 8px;
}

.leaflet-popup-content-wrapper {
    width: 265px; /* Set to the desired fixed width */
}

/* NEGES */
.popup-message {
    margin-top: 12px;
    padding: 12px;
    background-color: #efefef;
    border: 1px solid #ccc;
    border-radius: 10px;
    font-size: 0.8rem;
    color: #333;
    position: relative;
}

/* ===== Event Count ===== */
#event-count-container {
    position: absolute;
    display: flex;
    gap: 9px;
    margin: 10px 0;
    width: auto;
    align-items: center;
    top: 20px;
    left: 20px;
    z-index: 1000;
    background-color: transparent;
    padding: 5px;
}

#event-count-circle {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 30px;
    height: 30px;
    background: linear-gradient(145deg, #f5f5f5, #fefefe);
    border-radius: 15%;
    font-size: 1rem;
    font-weight: bold;
    color: white;
    box-shadow: 0 4px 7px rgba(0, 0, 0, 0.2), 0 1px 3px rgba(0, 0, 0, 0.1);
}

.event-count-text {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.85rem;
    font-weight: normal;
    color: #333;
    margin: 0;
}

#event-count {
    font-weight: bold;
    font-size: 0.85rem;
    color: #545454; /* Optional color */
}

/* ===== Toggle Buttons ===== */
.toggle-container {
    display: flex;
    align-items: center;
}

.toggle-switch input[type="checkbox"] {
    display: none;
}

.toggle-switch label,
.toggle-button {
    display: inline-block;
    padding: 10px 20px;
    font-size: 1rem;
    border-radius: 4px;
    background-color: #f9f9f9;
    border: 2px solid #ccc;
    font-family: 'Courier New', Courier, monospace;
    cursor: pointer;
    text-align: center;
    font-weight: normal;
    max-height: fit-content;
    min-width: 130px;
    user-select: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
    color: #000000;
}

/* Active State */
.toggle-button.active,
.toggle-switch input[type="checkbox"]:checked + label {
    background-color: #ccc;
    border: 2px solid #888;
    color: rgb(90, 90, 90);
    animation: buttonPress 0.05s ease-in-out;
    box-shadow: inset 0 4px 6px rgba(0, 0, 0, 0.2);
}

/* ===== Animations ===== */
@keyframes buttonPress {
    0% {
        transform: scale(1);
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    }
    50% {
        transform: scale(0.95);
        box-shadow: 0 2px 3px rgba(0, 0, 0, 0.3);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Footer styling */
.footer {
    width: 100%; /* Full width */
    box-sizing: border-box; /* Include padding in width calculations */
    display: flex;
    align-items: center; /* Align items vertically */
    justify-content: center; /* Center content horizontally */
    gap: 15px; /* Space between items */
    font-family: 'Courier New', Courier, monospace; /* Consistent font */
    font-size: 1.2rem; /* Larger font size */
    color: black; /* Text color */
    margin-top: 0; /* Remove any top margin */
     padding-top: 0; /* Remove any top padding */

}

.footer p {
    margin: 0; /* Remove default margin */
}

.footer-logo {
    height: 50px; /* Adjust logo height */
    width: auto; /* Maintain aspect ratio */
    border-radius: 5px; /* Optional: Add rounded corners */
}

/* Hover effect for footer logos */
.footer-logo:hover {
    transform: scale(1.1); /* Slightly enlarge on hover */
}

/* Style for the logo link */
.logo-link {
    display: inline-block; /* Ensure the link behaves as an inline-block element */
    text-decoration: none; /* Remove default underline */
    transition: transform 0.3s ease, filter 0.3s ease; /* Add smooth transition */
}

/* Hover effect for the logo link */
.logo-link:hover {
    transform: scale(1.1); /* Slightly enlarge on hover */
    filter: brightness(1.2); /* Brighten the image on hover */
}

/* Event count on its own row for smaller screens */
@media (max-width: 600px) {
    #event-count-container {
        position: static; /* Let it flow in the normal document order */
        margin: 10px auto; /* Center it with margin */
        width: fit-content; /* Adjust the width to its content */
    }

    .title {
        display: flex;
        flex-direction: column;
        align-items: center; /* Center-align the content */
    }
}

/* Ensure the container arranges items in a row */
.toggle-row {
    display: flex;
    align-items: center;    /* Align items vertically */
    gap: 10px;              /* Add spacing between toggles */
    flex-wrap: nowrap;
}

/* Adjust the second row spacing for "Choose Dates" */
.toggle-row + .toggle-row {
    margin-top: 0px; /* Add space between the first and second rows */
    display: flex;
    justify-content: center; /* Center the button horizontally */
}

/* Ensure buttons have consistent styling */
.toggle-button {
    width: auto; /* Ensure button adjusts to content width */
    padding: 10px 20px; /* Add consistent padding */
    font-size: 1rem; /* Match font size with other toggles */
    text-align: center;
    cursor: pointer;
    border-radius: 4px;
    background-color: #f9f9f9;
    border: 2px solid #ccc;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
    max-width: 250px;
}

/* Hover and active states for consistency */
.toggle-button:hover {
    background-color: #e0e0e0;
    border-color: #aaa;
    transform: scale(1.05);
}

.toggle-button.active {
    background-color: #ccc;
    border: 2px solid #888;
    color: rgb(90, 90, 90);
    box-shadow: inset 0 4px 6px rgba(0, 0, 0, 0.2);
}

.clear-dates-button {
    padding: 10px 15px;
    font-size: 1rem;
    border-radius: 4px;
    background-color: #f9f9f9;
    border: 2px solid #ccc;
    cursor: pointer;
    margin-left: 10px;
    margin-top: 0px;
    display: none; /* Initially hidden */
}

.clear-dates-button:hover {
    background-color: #e0e0e0;
    border-color: #aaa;
    transform: scale(1.05);
}

#popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0); /* Transparent */
    z-index: 1000; /* Above the map */
    display: none; /* Initially hidden */
}

/* Style for the custom close button */
.custom-close-button {
    background-color: #bbbbbb; /* Background color */
    color: white; /* Text color */
    border: none; /* Remove border */
    border-radius: 50%; /* Make it circular */
    width: 30px; /* Set width */
    height: 30px; /* Set height */
    font-size: 16px; /* Adjust font size */
    font-weight: bold; /* Bold text */
    text-align: center; /* Center the text */
    line-height: 60px; /* Center text vertically */
    cursor: pointer; /* Change cursor to pointer */
    position: absolute; /* Position within the popup */
    top: -25px; /* Offset from the top of the popup */
    right: -10px; /* Offset from the right of the popup */
    z-index: 1000; /* Ensure it appears above other elements */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); /* Add shadow */
    display: flex; /* Use flexbox for proper centering */
    align-items: center; /* Center text vertically */
    justify-content: center; /* Center text horizontally */
    transition: transform 0.2s ease, background-color 0.2s ease; /* Add hover effect */
}

/* Hover effect for the close button */
.custom-close-button:hover {
    background-color: #525252; /* Darker background on hover */
    transform: scale(1.1); /* Slightly enlarge the button */
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .custom-close-button {
        width: 25px; /* Adjust width for smaller screens */
        height: 25px; /* Adjust height for smaller screens */
        font-size: 14px; /* Adjust font size */
        line-height: 25px; /* Adjust vertical alignment */
    }
}

.footer-extra-text {
    text-align: center;
    font-size: 1rem;
    margin-top: 1rem;
    color: #333; /* Adjust color as needed */
}
