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

body {
    margin: 0;
    overflow: hidden;
    background-color: #c0c0c0;
    background-image:
        linear-gradient(45deg, black 25%, transparent 25%, transparent 75%, black 75%, black),
        linear-gradient(45deg, black 25%, transparent 25%, transparent 75%, black 75%, black);
    background-size: 2.5px 2.5px;
    background-position: 0 0, 1px 1px;
    font-family: 'Inter', sans-serif;
}

body::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 600px;
    /* backdrop-filter: blur(5px);
    mask-image: linear-gradient(to top, black, transparent); */
    pointer-events: none;
}

svg {
    width: 100vw;
    height: 100vh;
    position: relative;
    z-index: 1;
}

.graticule {
    fill: none;
    stroke: #777;
    stroke-width: 0.5px;
    stroke-opacity: 0.5;
}

.country-background {
    fill: none;
    stroke: rgb(205, 205, 205);
    stroke-width: 60px;
    stroke-linejoin: round;
    z-index: 10;
}

.country-border {
    fill: none;
    stroke: #000;
    stroke-width: 10px;
    stroke-linejoin: round;
    z-index: 10;
}

.state-border {
    fill: none;
    stroke: #c7c7c7;
    stroke-width: 1px;
    stroke-linejoin: round;
    z-index: 10;
    
}

.country-fill {
    fill: #e4e4e4;
    stroke: none;
    z-index: 10;
}

.country-fill:hover {
    fill: #dcdcdc;
}

#search-container {
    position: fixed;
    bottom: 200px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    transition: bottom 0.1s ease-in-out;
}

#search-container.search-container-up {
    bottom: 350px;
}

#search-bar {
    width: 448px;
    height: 60px;
    padding-left: 25px;
    font-size: 20px;
    border: 1px solid #7e7e7e;
    border-radius: 14px;
    box-shadow: 0 0px 60px rgba(0, 0, 0, 0.232);
    background-color: #e5e5e5; /* Inactive color */
    transition: background-color 0.1s ease-in-out;
}

#search-bar:focus {
    outline: none;
    background-color: #ffffff; /* Active color */
}

#search-bar.search-bar-expanded {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-bottom: 1px solid #cbcbcb;;
}

#results-container {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: white;
    border: 1px solid #7e7e7e;
    border-top: none;
    max-height: 300px;
    overflow-y: auto;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.05s ease-in-out;
}

#results-container.results-container-visible {
    opacity: 1;
    pointer-events: auto;
}

#results-container::-webkit-scrollbar {
    width: 8px;
}

#results-container::-webkit-scrollbar-track {
    background: transparent;
}

#results-container::-webkit-scrollbar-thumb {
    background-color: #888;
    border-radius: 4px;
}

#results-container .result-item {
    padding: 15px 25px;
    cursor: pointer;
    font-size: 16px;
}

.result-name {
    /* Inherits default styles */
}

.result-district {
    font-size: 14px;
    color: #888;
    margin-left: 8px;
}

#results-container .result-item:hover, #results-container .result-item.selected {
    background-color: #f0f0f0;
}



.search-marker {
    animation: pop-in 0.2s ease-out forwards;
    transform-origin: 50% 50%; /* Fallback for older browsers */
    transform-box: fill-box; /* The correct way for SVG */
    position: relative;
    z-index: 20;
}

@keyframes pop-in {
    0% {
        transform: scale(0);
    }
    70% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

#bottom-overlay {
    position: absolute;
    bottom: 0;
    z-index: 2;
    left: 0;
    width: 100%;
    height: 50.33vh;
    background: linear-gradient(to top, rgb(109, 109, 109),  transparent);
    pointer-events: none;
}

#attribution {
    position: absolute;
    bottom: 20px;
    color: #303030;
    font-weight: medium;
    left: 20px;
    z-index: 10;
    display: flex;
    align-items: center;
    font-size: 12px;
}

#attribution img {
    margin-right: 7px;
}

#search-timer {
    position: absolute;
    bottom: 20px;
    right: 20px;
    z-index: 10;
    font-size: 12px;
    color: #464646;
}