body {
    margin: 0;
    padding: 0;
    font-family: system-ui, --apple-system, Roboto, sans-serif;
}

header.track-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 5;
    display: flex;
    gap: 0 0.75rem;
    padding: 0.75rem 1.25rem;
    align-items: center;
    font-size: 1rem;
    box-shadow: 0 2px 8px gray;
    background-color: white;

    & > .track-header-date {
        color: gray;
    }

    & > .track-header-title {
        font-size: 1.5rem;
        font-weight: bold;
    }

    & > .track-header-download {
        margin-left: auto;

        & > a {
            color: black;
            text-decoration: none;
        }
    }
    & > .back > a {
        text-decoration: none;
        color: black;
    }
}

#side-panel-toggle {
    position: absolute;
    left: -9999px;
    opacity: 0;
}

#side-panel-toggle:not(:checked) ~ .side-panel {
    width: 0;
    min-width: 0;
    padding-left: 0;
    padding-right: 0;
    overflow: hidden;
    box-shadow: none;
}

#side-panel-toggle:not(:checked) ~ .side-panel-toggle-label {
    left: 0;
    margin-left: 0;

    &::before {
        content: "►";
    }
}

.side-panel-toggle-label {
    position: absolute;
    z-index: 4;
    top: 50%;
    margin-left: -14px;
    font-size: 1.75rem;
    border-radius: 0 1rem 1rem 0;
    padding-right: 5px;
    left: calc(min(420px, 80vw) + 2.75rem);
    cursor: pointer;
    transition: left 0.25s ease;
    background-color: white;

    &::before {
        content: "◄";
    }
}

aside.side-panel {
    border: 1px solid gray;
    position: fixed;
    left: 0;
    top: 3rem;
    bottom: 0;
    z-index: 3;
    width: min(420px, 80vw);
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-gutter: stable;
    padding: 0.75rem 1rem 1rem;
    background-color: white;
    color: #434343;
    box-shadow: 2px 0 8px gray;
    transition: width 0.25s ease, padding 0.25s ease, box-shadow 0.25s ease;

    & .image {
        & img {
            width: 100%;
        }

        & .image-text {
            padding: 0.25rem 0;
        }
    }
}

section.description {
    font-size: 0.95rem;
}

details.image {
    font-size: 0.95rem;
    padding: 0.25rem 0;

    & > summary {
        list-style: none;
        cursor: pointer;
        font-size: 1rem;
        font-variant-caps: small-caps;

        &:hover {
            color: black;
        }

        &::before {
            content: '▶ ';
        }
    }

    & > img {
        cursor: pointer;
    }
}

details.image:open {
    & summary::before {
        content: '▼ ';
    }
}

#map {
    top: 3rem;
    position: absolute;
    height: calc(100vh - 3rem);
    width: 100%;
}


@media (width <= 650px) {
    header.track-header {
        font-size: 0.5rem;
        & > .track-header-title {
            font-size: 0.75rem;
            font-weight: normal;
        }
    }
    #map {
        top: 2rem;
        height: calc(100vh - 2rem);
    }

    .back > a {
        font-size: 1.25rem;
    }
}

#reset-view:hover {
    color: #222222;
    border-color: #222222;
}

.highlight-image {
    background-color: #222222;
}

.photo-marker {
    background-image: url(../images/camera.png);
    width: 38px;
    height: 28px;
    cursor: pointer;
}

.photo-marker:hover {
    background-image: url(../images/camera_highlight.png);
}

.photo-marker.marker-hover {
    background-image: url(../images/camera_highlight.png);
}

.photo-marker-popup {
    img {
        max-width: 200px;
        cursor: pointer;
    }
}

#image-box {
    display: none;
    position: fixed;
    z-index: 2100;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
}

#image-box-content {
    margin: auto;
    text-align: center;

}

#image-box-image {
    max-width: 90vw;
    max-height: 90vh;
    display: inline-block;
}

#image-box-close {
    color: #000000;
    display: block;
    font-size: 28px;
    font-weight: bold;
}

#image-box-close:hover,
#image-box-close:focus {
    text-decoration: none;
    cursor: pointer;
}
