.header {
    position: relative;
    z-index: 10;
    white-space: nowrap;
    width: 100%;
    padding: var(--spacer-md) var(--spacer-md) var(--spacer-lg) var(--spacer-md);
    background: linear-gradient(var(--primary-color), rgba(var(--primary-color-rgb), 0));
    pointer-events: none;
}

.header a {
    pointer-events: all;
    display: block;
    width: min-content;
}

.logo {
    padding: var(--spacer-xs);
    width: 170px;
}

.get-location {
    position: absolute;
    display: flex;
    justify-content: center;
    font-size: 0;
    bottom: var(--spacer-lg);
    z-index: 1000;
    width: 100%;
    text-align: center;
    pointer-events: none;
}

.get-location-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--spacer-md);
    pointer-events: all;
    background-color: white;
    padding: var(--spacer-sm) var(--spacer-md);
    font-size: var(--font-size-sm);
    border-radius: 100px;
    border: 1px dashed black;
}

.get-location button {
    all: unset;
    cursor: pointer;
}

#getLocButton {
}

.user-loc-circle {
}

#closeGetLocButton {
    margin-top: 1px;
    display: flex;
    height: calc(var(--font-size-sm) * 0.8);
    width: calc(var(--font-size-sm) * 0.8);
}

#closeGetLocButton img {
    height: 100%;
    width: 100%;
}

.container {
    display: none;
    position: absolute;
    overflow: scroll;
    z-index: 11;
    height: 50dvh;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: white;
    padding: var(--spacer-md);
    border-top: 1px solid black;
    padding-bottom: calc(var(--spacer-lg) * 3);
    scroll-behavior: smooth;
    opacity: 0;
    pointer-events: none;
    transition: opacity 100ms ease-in-out, height 200ms ease-in-out;;
}

.container.active {
    display: block;
}

#intro-container {
    /*display: block;*/
}

#locations-container .container-header {
    margin-bottom: 0;
}

.loc-infos {
    margin-bottom: var(--spacer-sm);
}

.loc-infos small {
    display: block;
    margin-bottom: var(--spacer-sm);
}

#imprint-container {
    height: 50dvh;
}

#imprint-container.active {
    display: block;
    height: 80dvh;
}

#imprint-container .logo-row {
    margin: var(--spacer-lg) 0;
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacer-lg);
}

#imprint-container .logo-row img {
    height: 60px;
    padding: var(--spacer-sm);
}

#routes-container {
    height: 50dvh;
}

#routes-container.active {
    display: block;
    height: 80dvh;
}

.route-selector {
    margin-bottom: var(--spacer-md);
    display: flex;
    align-items: stretch;
    gap: var(--spacer-sm);
}

.route-selector label {
    display: none;
    font-size: var(--font-size-sm);
    margin-bottom: var(--spacer-sm);
}

.route-selector select {
    padding: var(--spacer-xs) var(--spacer-sm);
    border: 1px solid black;
    border-radius: 5px;
    font-size: var(--font-size-lg);
    font-family: "brevia", sans-serif;
    background-color: white;
    color: black;
    min-height: 2rem;
}


.route-selector button {
    padding: var(--spacer-xs) var(--spacer-sm);
    border: 1px dotted black;
    border-radius: 5px;
    background-color: white;
    cursor: pointer;
    font-size: var(--font-size-sm);
    display: none;
    align-items: center;
    justify-content: center;
    color: black;

    svg {
        height: 1.1rem;
        width: 1.1rem;
    }
}

.route-selector button.show {
    display: inline-flex;
}

.route-selector button:hover {
    background-color: var(--primary-color);
}

.route-description {
    display: none;
}

.route-description.active {
    display: block;
}

.route-description h4 {
    margin: 0 0 var(--spacer-xs) 0;
}

.route-description p {
    margin: 0;
}

.route-visual {
    display: none;
    margin-top: var(--spacer-lg);
}

.route-visual.active {
    display: block;
}

.route-timeline {
    position: relative;
}

.route-item {
    position: relative;
    padding-left: var(--spacer-sm);
    margin-left: var(--route-dot-size);
}

.route-item::before {
    content: '';
    position: absolute;
    left: calc(var(--route-dot-size) / 2 * -1);
    top: 0;
    bottom: 0;
    width: 1px;
    background-color: black;
}


.route-item:last-child {
    margin-bottom: 0;

    &::before {
        width: 0;
    }
}

.route-station {
    display: flex;
    align-items: center;
    gap: var(--spacer-sm);
}

.route-station-dot {
    position: absolute;
    left: calc(-1 * var(--route-dot-size));
    top: 0;
    width: var(--route-dot-size);
    height: var(--route-dot-size);
    border-radius: 50%;
    background-color: var(--primary-color);
    border: 1px solid black;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: calc(var(--route-dot-size) / 2);
    line-height: 1;
    font-weight: bold;
    color: black;
    z-index: 1;
    padding-top: 3px;
}

.route-station-info {
    flex: 1;
    padding-bottom: var(--spacer-md);
}

.route-station-name {
    margin-bottom: 0;
    padding-bottom: var(--spacer-xs);
}

.route-station-address {
    margin: 0;
    padding-bottom: var(--spacer-xs);
}

.route-station-description {
    margin: 0;
    padding-bottom: var(--spacer-md);
}

.route-info {
    display: flex;
    align-items: center;
    gap: var(--spacer-sm);
    padding-bottom: var(--spacer-md);
}

.route-info-dot {
    position: absolute;
    top: calc(var(--font-size-sm) / 2);
    left: calc((var(--route-dot-size) / 2) - (var(--route-info-dot-size) / 2) - var(--route-dot-size));
    width: var(--route-info-dot-size);
    height: var(--route-info-dot-size);
    border-radius: 100%;
    background-color: black;
    z-index: 1;
}

.route-info-text {
    margin: 0;
    padding-bottom: var(--spacer-sm);
}

.loc-circle.route-marker {
    background: var(--primary-color);
}

.loc-circle.route-marker .station-number {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 14px;
    font-weight: bold;
    color: black;
    width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}


.container.active {
    opacity: 1;
    pointer-events: all;
}

.container-header {
    display: flex;
    gap: var(--spacer-xs);
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: var(--spacer-sm);
}

.fullscreen-button, .imprint-close-button {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: var(--spacer-xs);
    background-color: white;
    border: 1px solid black;
    border-radius: 5px;
    height: 2rem;
    width: 2rem;
    cursor: pointer;

    svg {
        height: calc(var(--font-size-xl) * 1.065);
        width: calc(var(--font-size-xl) * 1.065);
    }
}

.imprint-close-button svg {
    height: 1.1rem;
    width: 1.1rem;
}

.fullscreen-map .fullscreen-button {
    transform: rotate(180deg);
}

.fullscreen-map #map {
    height: calc(100dvh - (4 * var(--spacer-md) + 4 * var(--spacer-xs) + var(--font-size-lg) + 2 * var(--font-size-md) + var(--font-size-sm)));
    @media (min-width: 901px) {
        height: 100%;
    }
}

.fullscreen-map .container {
    transition: all 100ms ease-in-out;
    /*height: 20dvh;*/
    height: calc(4 * var(--spacer-md) + 4 * var(--spacer-xs) + var(--font-size-lg) + 2 * var(--font-size-md) + var(--font-size-sm)) !important;
}

.toggle-desc-wrapper {
    text-align: end;
}

.toggle-desc {
    border: 1px solid black;
    padding: 3px var(--spacer-xs) 1px var(--spacer-xs);
    border-radius: 3px;
    background-color: white;
    cursor: pointer;
}


.toggle-desc.show-less {
    background-color: var(--primary-color);
}

.footer {
    position: fixed;
    display: flex;
    justify-content: space-between;
    z-index: 12;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: white;
    padding: var(--spacer-md);
    border-top: 1px solid black;
}

.footer .menu, .footer .lang-selector {
    font-family: Brevia, sans-serif;
    font-weight: 800;
}

.lang-selector a.active-lang, .lang-selector a:hover, .lang-selector a:focus, .menu a:hover {
    color: var(--primary-color);
    text-shadow: -1px -1px 0 #000,
    0 -1px 0 #000,
    1px -1px 0 #000,
    -1px 0 0 #000,
    1px 0 0 #000,
    -1px 1px 0 #000,
    0 1px 0 #000,
    1px 1px 0 #000;
}

.footer .menu {
    display: flex;
    gap: var(--spacer-md);
}

.move-down {
    transition: all 200ms ease-in-out;
    transform: translateY(100%);
}

.loc-list-item {
    margin-bottom: var(--spacer-md);
}

#locations-container h1 {
    font-size: var(--font-size-lg);
}

.loc-link, .loc-link:hover, .loc-link:active, .loc-link:focus {
    color: black;
    text-decoration: none;
}

.highlight-headline {
    background-color: white;
    border: 1px solid var(--black);
    padding: var(--spacer-xs) var(--spacer-sm);
    width: fit-content;
    min-height: 2rem;
    border-radius: 5px;
    margin-bottom: var(--spacer-md);
}

.highlight-headline-yellow, .highlight-headline-white:hover {
    background-color: var(--primary-color);
}

#map {
    position: fixed;
    inset: 0;
    height: 50dvh;
    width: 100dvw;
}

#map a:has(img), #map .leaflet-control-zoom, #map .leaflet-attribution-flag {
    display: none !important;
}

#map .leaflet-control *, #map .leaflet-control-container {
    color: #505050;
    font-size: .6rem !important;
}

.loc-circle {
    position: relative;;
    background: var(--secondary-color);
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 100%;
    border: 1px solid #000;
}

.loc-image {
    position: relative;
    z-index: 10;
}

.loc-image img, .loc-image .close {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 26px !important;
    height: 26px !important;
    transition: all 200ms ease-in-out;
    top: 0;
    left: 0;
}

.loc-image img {
    background-color: white;
    object-fit: cover;
    border-radius: 100%;
    border: 1px solid #000;
}

.loc-image .close {
    text-align: right;
    padding: 2px;
}

.loc-image .close svg {
    width: var(--font-size-md);
    height: var(--font-size-md);
}

.active .loc-circle, .loc-circle:hover {
    background: var(--primary-color);
    width: 26px;
    height: 26px;
    border-radius: 100%;
    border: 1px solid #000;
}

.active .loc-image img, .active .loc-image .close {
    opacity: 1;
    transition: all 200ms ease-in-out;
    width: 160px !important;
    height: 160px !important;
    top: -67px;
    left: -67px;
    transition-delay: 300ms;
}

.loc-circle.hide img, .loc-circle.hide .close {
    opacity: 0;
    pointer-events: none;
    width: 26px !important;
    height: 26px !important;
    top: 0;
    left: 0;
    transition: all 200ms ease-in-out;
    transition-delay: 0ms;
}

.leaflet-bottom {
    writing-mode: sideways-lr !important;
    text-orientation: mixed !important;
}

.leaflet-control-attribution {
    padding: 6px 3px !important;
}

.intro-curtain {
    position: fixed;
    inset: 0;
    background-color: lightgray;
    z-index: 14;
    display: flex;
    justify-content: center;
    align-items: center;
}

.intro-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    inset: 0;
    z-index: 0;
}

.intro-curtain .intro-logo {
    width: 52dvw;
    max-width: 400px;
    z-index: 5;
    /*animation: logo-zoom-out 1500ms ease-in-out 0s 1 forwards;*/
}

@keyframes logo-zoom-out {
    0% {
        width: 52vw;
        max-width: 420px;
    }

    100% {
        width: 50vw;
        max-width: 400px;
    }
}

.intro-curtain .gradient {
    position: absolute;
    width: 100%;
    bottom: 0;
    right: 0;
}

.g-desk {
    display: none;
}

.intro-curtain.hide {
    transition: opacity 400ms ease-in-out;
    opacity: 0;
    pointer-events: none;
}

.intro-curtain.hide-immediately {
    display: none;
}

.intro-curtain.hide .intro-logo {
    transition: transform 400ms ease-in-out;
    transform: scale(1.2);
}

.intro-curtain.hide .gradient {
    transition: width 400ms ease-in-out;
    width: 180%;
}

@media (max-width: 900px) {
    .menu a:hover {
        color: black;
        text-shadow: none;
    }

    .highlight-headline-white:hover {
        background-color: white;
    }
}


@media (min-width: 901px) {
    .footer, .container {
        width: 500px;
    }

    #map {
        width: calc(100dvw - 500px);
    }

    .container.active {
        height: 100dvh !important;
    }

    .get-location {
        position: fixed;
        z-index: 1000;
        left: var(--spacer-lg);
        bottom: var(--spacer-lg);
        margin-left: 0;
        width: fit-content;
    }

    .logo {
        width: 230px;
    }

    .footer {
        left: auto;
        right: 0;
        border-left: 1px solid black;
    }

    .container {
        position: absolute;
        overflow: scroll;
        height: 100dvh;
        top: 0;
        bottom: 0;
        left: auto;
        right: 0;
        border-top: none;
        border-left: 1px solid black;
        transition: none;
    }

    #map {
        position: fixed;
        inset: 0;
        right: auto;
        height: 100dvh;
    }

    #map .leaflet-control *, #map .leaflet-control-container {
        color: #505050;
        font-size: .75rem !important;
    }

    .leaflet-bottom {
        writing-mode: initial !important;
        text-orientation: initial !important;
    }

    .g-mob {
        display: none;
    }

    .g-desk {
        display: block;
    }

    .fullscreen-button {
        display: none;

    }

    .toggle-desc:hover {
        background-color: var(--primary-color);
    }

    .imprint-close-button:hover {
        background-color: var(--primary-color);
    }
}