html, body {
    margin: 0;
    padding: 0;
    overflow-x: hidden; /* Use this if necessary */
}


/* Remove container background and unnecessary padding */
.school-select {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 1000;
}

/* Style the label in a minimal manner */
.school-select label {
    display: block;
    font-size: 0.85rem;
    color: #333;
    margin-bottom: 4px;
}

/* Modern, sleek styling for the select element */
.school-select select {
    width: 30em;
    padding: 10px 14px;
    font-size: 1rem;
    color: #333;
    background: white; /* No background */
    opacity: 0.9; /* Slightly transparent for a modern look */
    border: none;            /* Remove all borders */
    border-bottom: 2px solid #ccc;  /* Add only a bottom border */
    outline: none;
    transition: border-color 0.3s ease;
    
    /* Remove default styling for consistent look across browsers */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    
    /* Add a custom dropdown arrow */
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23999' viewBox='0 0 16 16'%3E%3Cpath d='M4.646 6.646a.5.5 0 0 1 .708 0L8 9.293l2.646-2.647a.5.5 0 0 1 .708.708l-3 3a.5.5 0 0 1-.708 0l-3-3a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
}

/* Change the border color on focus for visual feedback */
.school-select select:focus {
    border-bottom-color: #007BFF;
}

/* Optional: Change border color on hover */
.school-select select:hover {
    border-bottom-color: #999;
}


.note-box {
    position: absolute;      /* Keeps the position relative to the viewport */
    background-color: #fff;  /* Sets the background color to white */
    bottom: 10px;            /* Sets distance from the bottom of the viewport */
    left: 10px;               /* Centers the box horizontally based on its left edge */
    display: flex;           /* Continues to use flexbox for internal alignment */
    font-family: "GT-America", sans-serif; /* Ensures font consistency */
    color: #444;             /* Keeps the text color */
    z-index: 9999;           /* Ensures it stays on top of other content */
    max-width: 30%;              
    border-radius: 6px; /* Ensure rounded corners */
    overflow: hidden; /* Ensures contents respect the border-radius */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15); /* Optional: Adds a soft shadow */
}

.note-box a {
    color: #7000FF;
    text-decoration: underline;
}

#map {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 100%;
    z-index: 1;
}

.button {
    font-family: "GT-America", sans-serif; /* Matching the paragraph font */
    font-size: 1rem; /* Slightly smaller than paragraph text for distinction */
    font-weight: 500; /* Making it bolder than the paragraph for emphasis */
    color: white; /* High contrast text color for readability */
    background-color: #7000FF; /* A vibrant color to make the button stand out */
    border: none; /* No border for a cleaner look */
    border-radius: 1px; /* Slightly rounded corners for a modern appearance */
    padding: 0.4rem .8rem; /* Adequate padding for a comfortable click area */
    text-align: center; /* Centering text inside the button */
    cursor: pointer; /* Cursor changes to pointer to indicate interactivity */
    transition: background-color 0.3s ease; /* Smooth transition for hover effect */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Subtle shadow for 3D effect */
    margin-bottom: 1rem; /* Same bottom margin as paragraphs for consistent spacing */
    display: inline-block; /* Ensures the button doesn't take full width */
    border-radius: 10%;
}

.button:hover {
    background-color: #CDBDEF; /* Darker shade on hover for visual feedback */
}

.button:focus {
    outline: none; /* Removes outline on focus to maintain style */
    /* box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.5); /* Blue glow for accessibility */
}

#geocoder-container {
    width: 100%;
    font-family: "GT-America", sans-serif;
}

#buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start; /* This spreads out the buttons evenly */
    gap: 2px; /* Adds space between buttons */
    padding: 2px 0; /* Optional: Adds some padding inside the buttons container */
    transition: background-color 0.3s ease, outline 0.3s ease; /* Smooth transitions */
    border-radius: 5%;
}


#resetMap {
    position: absolute;
    bottom: 6.5em;
    left: 50%;
    transform: translateX(-50%);
    /* padding: 10px 20px; */
    z-index: 10; /* Ensure it's above the map layers */
    cursor: pointer;
    display: none; /* Start hidden */
}

#year-filter {
    top: 20px;
    left: 20px;
    z-index: 1;
    background: white;
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

#allYearsCheckbox {
    margin-left: 10px;
    margin-right: 10px;
    display: none;
}

#yearSlider {
    width: 100%; /* Adjust the width as needed */
    flex-grow: 1; 
    margin-right: 5px;
}

.slider-container {
    position: relative;
    width: 100%;
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 5px;
}

.slider-labels span {
    position: relative;
    font-size: 12px;
}

/* Adjust the slider thumb to fit the labels if necessary */
input[type="range"] {
    width: 100%;
    -webkit-appearance: none; /* Overrides default appearance */
    appearance: none;
    height: 5px;
    background: #ddd;
    outline: none;
    opacity: 0.7;
    transition: opacity .2s;
}

input[type="range"]:hover {
    opacity: 1;
}

input[type="range"]:hover::-webkit-slider-thumb {
    background: #CDBDEF; /* Color on hover */
}

input[type="range"]:hover::-moz-range-thumb {
    background: #CDBDEF; /* Color on hover */
}

/* Styling for WebKit browsers (Chrome, Safari, etc.) */
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px; /* Adjust size as needed */
    height: 20px; /* Ensure width and height are the same for a perfect circle */
    background: #7000FF; /* Default thumb color */
    cursor: pointer;
    border-radius: 50%; /* Makes it circular */
    transition: background-color 0.3s ease; /* Smooth color transition */
}

/* Styling for Mozilla Firefox */
input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #7000FF; /* Default thumb color */
    cursor: pointer;
    border-radius: 50%; /* Makes it circular */
    transition: background-color 0.3s ease; /* Smooth color transition */
}


input[type="range"]:disabled {
    background: #ccc; /* Gray out the slider track */
    cursor: not-allowed; /* Show that it's not interactive */
    opacity: 0.5; /* Make the slider look faded */
}

input[type="range"]:disabled::-webkit-slider-thumb {
    background: #888; /* Change thumb color to darker gray */
}

input[type="range"]:disabled::-moz-range-thumb {
    background: #888; /* Change thumb color to darker gray for Firefox */
}

.button.disabled, .button:disabled {
    background-color: #ccc;
    color: #666;
    cursor: not-allowed;
}

#sliderValue {
    font-size: 23px;
    margin-top: 5px;
}

.selectedText {
    font-size: .75em;
    color: grey;

}

.small-note-box {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 9999;
}

.info-icon {
    position: relative;
    display: inline-block;
    color: #2c3e50; /* Dark blue-grey for visibility */
    cursor: help;
}

.info-icon svg {
    fill: #2c3e50; /* SVG fill color, can adjust as needed */
}

.tooltip-text {
    visibility: hidden;
    width: 220px; /* Adjust width based on your content */
    background-color: #fff;
    font-family: "GT-America", sans-serif;
    font-size: 0.8em;
    color: #333;
    text-align: left;
    border-radius: 10px; /* Reduced curvature */
    position: absolute;
    z-index: 1;
    top: 125%; /* Position below the icon */
    left: 0; /* Align to the left of the icon */
    transform: translateX(0); /* No centering needed if aligned to the left */
    opacity: 0;
    transition: opacity 0.6s;
    padding: 1em; /* Adjust padding */
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1); /* Optional shadow */
}

.info-icon:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}


#showAllYears {
    font-family: "GT-America", sans-serif;
    font-size: .6em;
    text-align: right;
}

#zoom-text-box {
    position: absolute;    /* Keeps the element positioned relative to the viewport */
    top: 10px;             /* Positions the box 10px from the top of the screen */
    left: 50%;             /* Positions the left edge of the box at the center of the screen */
    transform: translateX(-50%); /* Moves the box to the left by half its width, centering it */
    background-color: #fff; /* Sets the background color to white */
    padding: 10px;         /* Adds some padding inside the box for content spacing */
    border-radius: 8px;    /* Applies rounded corners */
    box-shadow: 0 2px 4px rgba(0,0,0,0.3); /* Adds a subtle shadow for depth */
    z-index: 100;          /* Ensures the box is above other content but below overlays */
    width: auto;           /* Adjust width automatically based on content */
    max-width: 400px;      /* Ensures the box does not exceed 400px width */
    border: 1px solid #ccc; /* Optional: adds a light border */
    font-family: "GT-America", sans-serif; /* Ensures font consistency */
    display: none;
}  
  .info-icon img {
    display: inline-block; /* Ensures the image is aligned correctly */
    vertical-align: middle; /* Aligns the icon vertically with the text */
  }

  .marker {
    background-color: #7000FF;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: block;
}

.legend {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background-color: white;
    padding: 6px 8px; /* Reduced padding */
    border-radius: 4px; /* Slightly less rounded corners */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    font-family: 'GT-America', sans-serif;
    font-size: 12px; /* Reduce font size */
    line-height: 1.2; /* Tighter line spacing */
    max-width: 225px; /* Reduce width */
}

.legend-item {
    margin-bottom: 3px; /* Less space between legend items */
}

.legend-labels {
    font-size: 11px; /* Reduce label size */
    font-weight: 600;
    display: flex;
    justify-content: space-between;
}

.tick-container {
    position: relative;
    display: flex;
    justify-content: space-between;
    font-size: 10px; /* Adjust for smaller size */
    font-weight: 600;
    color: rgba(25, 25, 25, 0.75);
    margin-top: -4px; /* Move ticks slightly closer to gradient */
    width: 100%; /* Ensure it matches gradient width */
}

.tick {
    position: absolute;
    transform: translateX(-50%); /* Center tick labels */
    bottom: -12px; /* Position tick labels slightly lower */
}


.legend h2 {
    font-size: 14px; /* Reduce title size */
    margin-bottom: 4px; /* Less space under title */
}

.legend svg {
    width: 80%; /* Adjust SVG elements to fit */
    height: 12px; /* Reduce height */
}

.legend-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.6em; /* Increased font size for better visibility */
    font-weight: bold; /* Bold text for Democrats and Trump */
    color: rgba(25, 25, 25, 0.75); /* Changed color for better contrast */
    margin-top: 5px;
}

.label-left {
    margin: 0;
    text-align: left;
}

.label-right {
    margin: 0;
    text-align: right;
}

.mapboxgl-popup-content {
    background: transparent !important; /* Removes default background */
    box-shadow: none !important; /* Removes default shadow */
    padding: 0 !important; /* Removes default padding */
}

.tooltip-name {
    font-size: 18 px;
}

.note-box:has(.note-box-content) {
    background: transparent; /* Remove background */
    box-shadow: none; /* Remove shadow if needed */
}


.note-box-content {
    font-family: 'GT America', sans-serif;
    font-size: 14px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.95); 
    border-radius: 12px; /* Ensure rounding */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    color: #333;
    max-width: 250px;
    position: relative;
    box-sizing: border-box;
    overflow: hidden; /* Ensure content follows border-radius */
    display: flex;
    flex-direction: column;
}

@media (max-width: 480px) {
    .school-select select {
      width: 90%;
      max-width: none;
    }
  }
  


/* Media query for devices with a max width of 600px */
@media (max-width: 600px) {

    .school-select {
        left: 5px;
        top: 5px;
        width: auto;
    }
  
    .school-select select {
        width: 95%; /* Adjust width */
        max-width: 250px; /* Set max width */
        font-size: 0.75rem; /* Reduce font size */
        padding: 8px; /* Less padding */
    }

    .legend {
        bottom: 5px; /* Adjust this value based on the height of your search bar */
        right: 5px; /* Align to the right under the search bar on mobile */
        padding: 5px;
        font-size: 12px; /* Smaller font size for mobile devices */
        width: auto; /* Adjust width automatically based on content */
        opacity: 0.9; /* Slightly transparent for a modern look */
        /* make the whole thing smaller */
        max-width: 40%;
    }
    .legend-circle {
        width: 20px; /* Smaller circles for mobile */
        height: 20px;
    }
    .legend-item {
        margin-bottom: 3px; /* Less space between items for mobile */
    }

    /* make maxbox controls disapeer */
    .mapboxgl-ctrl-top-right {
        display: none;
    }

    /*make note-box table disapear */
    .note-box table {
        /* display: none; */
        /* make it half the normal height */
        height: 10%;
        font-size: 6px;

    }

    /*  hide third tr in note-box table */
    .note-box table tr:nth-child(3) {
        display: none;
    }

    .walking {
        display: none;
    }

    .travel-time {
        display: none;
    }

    .note-box {
        width: 50%;
        opacity: 0.9;
        padding: auto;
        margin: auto;
        bottom: 5px;
        left: 5px;
        min-width: 50%;
        font-size: 10px;
    }

    .note-box-content {
        padding: 6px;
    }


    .legend h2{

        font-size: 12px;
    }

    .tooltip-name {
        font-size: 10px;
    }

    .small-name {
        font-size: 8px;
    }

    .interesting-sentence {
        font-size: 10px;
    }
    
    .rail-line {
        display: none;
    }

}