#map {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 100%;
}

body {
    overflow: hidden;
}

#sidebar {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(86vw, 320px);
    background-color: rgba(8, 10, 18, 0.94);
    z-index: 3;
    color: white;
    padding-bottom: 25px;
    transform: translateX(calc(-100% - 18px));
    transition: transform 0.24s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: 18px 0 36px rgba(0, 0, 0, 0.24);
    padding-top: 10px;
}

body.sidebar-open #sidebar {
    transform: translateX(0);
}

#sidebar-backdrop {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.35);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.24s ease;
    z-index: 2;
}

body.sidebar-open #sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
}

#mobile-menu-toggle {
    position: absolute;
    top: 16px;
    left: 16px;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    background-color: rgba(8, 10, 18, 0.82);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    padding: 0;
}

#mobile-menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background-color: rgba(255, 255, 255, 0.92);
}

#mobile-sidebar-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 999px;
    background-color: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.88);
    font-size: 1.8rem;
    line-height: 1;
    padding: 0;
}

.hide-desktop {
    display: block;
}

.hide-mobile {
    display: block;
}

.cell {
    float: none;
    width: 100%;
    margin-bottom: 10px;
}

.cell .caption {
    color: rgba(255,255,255,0.5);
    font-size: 0.9rem;
    font-variant: small-caps;
}

.cell .number {
    font-size: 1.3rem;
}

.cell--michelin .caption {
    color: rgba(255,255,255,0.7);
}

.cell--michelin .number {
    color: #ffbec8;
}

.line-filters {
    display: block;
    margin-top: 4px;
    margin-bottom: 18px;
}

.line-filters__title {
    color: rgba(255,255,255,0.5);
    font-size: 0.9rem;
    font-variant: small-caps;
    margin-bottom: 10px;
}

.line-filter {
    align-items: center;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    user-select: none;
    position: relative;
}

.line-filter input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    margin: 0;
    pointer-events: none;
}

.line-filter__label {
    color: rgba(255,255,255,0.82);
    font-size: 0.95rem;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.line-filter__switch {
    width: 42px;
    height: 24px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background-color: rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
    transition: background-color 0.2s ease, border-color 0.2s ease,
        opacity 0.2s ease;
    opacity: 0.75;
    position: relative;
}

.line-filter__switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.92);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.28);
    transition: transform 0.2s ease, background-color 0.2s ease;
}

#airport-lines-toggle:checked + .line-filter__switch {
    background-color: rgba(41, 182, 246, 0.2);
    border-color: rgba(41, 182, 246, 0.65);
    opacity: 1;
}

#airport-lines-toggle:checked + .line-filter__switch::after {
    transform: translateX(18px);
    background-color: rgba(41, 182, 246, 0.98);
}

#tesla-lines-toggle:checked + .line-filter__switch {
    background-color: rgba(255, 82, 82, 0.2);
    border-color: rgba(255, 82, 82, 0.65);
    opacity: 1;
}

#tesla-lines-toggle:checked + .line-filter__switch::after {
    transform: translateX(18px);
    background-color: rgba(255, 82, 82, 0.98);
}

.line-filter input:not(:checked) + .line-filter__switch + .line-filter__label {
    color: rgba(255,255,255,0.45);
}

.line-filter input:focus-visible + .line-filter__switch {
    outline: 2px solid rgba(255, 255, 255, 0.6);
    outline-offset: 2px;
}

@media only screen and (min-width: 768px) {
    body {
        overflow: hidden;
    }

    #mobile-menu-toggle,
    #sidebar-backdrop,
    .hide-desktop {
        display: none;
    }

    #michelin-toggle {
        cursor: pointer;
        border-radius: 4px;
        box-sizing: border-box;
        width: 100%;
        padding: 8px 0;
        position: relative;
        transition: opacity 0.2s ease;
    }

    #michelin-toggle::before {
        content: '';
        position: absolute;
        top: 0;
        bottom: 0;
        left: -8px;
        right: -8px;
        border-radius: 4px;
        border: 1px solid transparent;
        background-color: transparent;
        transition: background-color 0.2s ease, border-color 0.2s ease;
        pointer-events: none;
    }

    #michelin-toggle:hover {
    }

    #michelin-toggle:hover::before {
        background-color: rgba(187, 38, 55, 0.12);
    }

    #michelin-toggle.is-active {
    }

    #michelin-toggle.is-active::before {
        background-color: rgba(187, 38, 55, 0.2);
        border-color: rgba(255, 190, 200, 0.35);
    }

    #sidebar {
        top: 50px;
        left: 50px;
        bottom: auto;
        width: 300px;
        border: 1px solid rgba(255, 255, 255, 0.3);
        border-radius: 5px;
        -webkit-backdrop-filter: blur(3px);
        backdrop-filter: blur(3px);
        padding: 0;
        background-color: rgba(0, 0, 0, 0.7);
        transform: none;
        transition: none;
        overflow: visible;
        box-shadow: none;
        padding-top: 0;
    }

    #zoom-button {
        border-top: 1px solid rgba(255, 255, 255, 0.3);
        /*border-bottom: 1px solid rgba(255, 255, 255, 0.3);*/
        text-align: center;
        cursor: pointer;
        padding: 10px 0;
        font-size: 1.3rem;
        /*margin-bottom: 25px;*/
    }
    #zoom-button:hover {
        background-color: rgba(255, 255, 255, 0.3);
    }
    #zoom-button:active {
        background-color: rgba(255, 255, 255, 0.4);
    }

    .hide-mobile {
        display: block;
    }

    .cell {
        float: none;
        width: 100%;
    }

    .about {
        display: block;
        font-size: 0.9rem;
        margin: 25px 30px 30px 30px;
        color: rgba(255,255,255,0.75);
    }
    .about a {
        color: inherit;
        text-decoration: underline;
    }

    select {
        margin-top: 0;
    }
}

h1 {
    font-size: 1.7rem;
    margin-top: 54px;
    margin-right: 72px;
}

h1 a,
h1 a:hover,
h1 a:active {
    color: rgba(255, 255, 255, 0.75);
    font-weight: 200;
}

.stats {
    margin-top: 15px;
    margin-bottom: 15px;
    display: block;
    width: calc(100% - 60px);
    box-sizing: border-box;
}
.pad {
    margin-left: 30px;
    margin-right: 30px;
}

#zoom-button {
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
    text-align: center;
    cursor: pointer;
    padding: 12px 0;
    font-size: 1.2rem;
    margin-top: 6px;
    margin-bottom: 14px;
}

#zoom-button:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

#zoom-button:active {
    background-color: rgba(255, 255, 255, 0.12);
}

.about {
    display: block;
    font-size: 0.95rem;
    line-height: 1.45;
    margin: 22px 30px 30px 30px;
    color: rgba(255,255,255,0.68);
}

.about a {
    color: inherit;
    text-decoration: underline;
}
select {
    width: 100%;
    padding: 5px;
    font-size: 1.3rem;
    background-color: rgba(255, 255, 255, 0.5);
    color: rgba(255,255,255,0.75);
    margin-top: 10px;
}
select option {
    color: black;
}


/* popup */

/* The animation code */
@keyframes pop-in {
    from {
        opacity: 0;
        top: 5px;
    }
    to {
        opacity: 1;
        top: 0;
    }
}

.mapboxgl-popup {
    min-width: 250px;
    max-width: 300px;
    position: relative;
    animation-name: pop-in;
    animation-duration: 0.2s;
}

.place-name {
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 4px;
}

.place-subtitle {
    font-size: 0.8rem;
}

.place-subtitle--michelin {
    color: #ffbec8;
    font-weight: 600;
}

.mapboxgl-popup-content {
    background-color: rgba(0, 0, 0, 0.7);
    padding: 20px;
    color: #eee;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 5px !important;
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    box-shadow: none;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Helvetica Neue", Arial, sans-serif !important;
}

.mapboxgl-popup-tip {
    display: none;
}

#map3d-link {
    display: block;
    margin-bottom: 10px;
    padding: 10px 0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    text-decoration: none;
    font-size: 1.3rem;
}
@media only screen and (min-width: 768px) {
    #map3d-link {
        margin-bottom: 25px;
    }
}

#map3d-link:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

#map3d-link:active {
    background-color: rgba(255, 255, 255, 0.4);
}

.new-pill {
    background-color: #1da1f2;
    color: #fff;
    border-radius: 999px;
    display: inline-block;
    padding: 2px 6px;
    font-size: 0.7rem;
    margin-right: 6px;
    position: relative;
    top: -4px;
}
