:root {
    --navbar-height: 8dvmax;
}


html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: 'Rubik', sans-serif;
}

a {
    color: inherit
}

body {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
}

.main-container {
    height: 100%;
    display: grid;
    align-content: space-around;
}

.arrow-container {
    display: flex;
    justify-content: center;
    align-content: center;
    height: 25dvh;
}

.grid-box {
    position: relative;
    display: grid;
}

.grid-box-inner {
    align-content: center;
    display: grid;
    width: 100%;
}

.grid-header {
    font-size: 3dvmin;
    position: absolute;
    padding: .25rem !important;
    color: darkgray;
}

.grid-sectionheader {
    font-size: 6dvmin;
    font-weight: bold;
}

.carousel-item img {
    height: 45vmin;
    object-fit: cover;
}

.carousel-caption {
    color: white !important;
    text-shadow: 
        -1px -1px 0 black,  
        1px -1px 0 black,
        -1px 1px 0 black,
        1px 1px 0 black !important; /* Creating a black outline effect with !important */
}

.nav-link {
    font-size: 3.5dvmin
}

.nav-link svg {
    height: 6dvmin;
    width: 6dvmin;
}

.info-result {
    font-size: 6dvmin;
    padding: 3dvmin 2dvmin 2dvmin;
    height: 100%;
    width: 100%;
    overflow: hidden;
}

.logo {
    height: 15dvh;
    width: auto;
    margin: auto;
}

#compass {
    margin: auto;
    height: 85%;
    width: auto;
}

.sash {
    position: absolute;
    top: 20px;
    right: 20px;
    background: red;
    /* Adjust color as needed */
    color: white;
    padding: 5px 10px;
    transform: rotate(45deg);
    font-size: 18px;
    /* Adjust font size as needed */
    font-weight: bold;
    z-index: 1000;
}

#map {
    height: 100%;
    width: 100%;
}

.map-footer-text {
    font-size: smaller;
    text-align: right;
}

.map-clear-button {
    background-color: green;
    color: white;
    border: none;
    padding: 0.5em;
    font-size: clamp(1rem, 2vw, 1.5rem);
    cursor: pointer;
    box-sizing: border-box;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.map-view-button .maplibregl-ctrl-icon {
    padding: 3px;
}

.map-text-control {
    width: 100%;
}

.map-recentre-button {
    color: black;
    width: 100% !important;
}

#map-distance-display {
    position: absolute;
    top: 2vmin;
    left: 2vmin;
    right: 2vmin;
    background-color: green;
    color: white;
    padding: 2vmin;
    border-radius: 2vmin;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 10vmin;
}

#map-distance-text {
    width: 100%;
    text-align: center;
    font-size: 4vmin;
}

.camera-modal {
    padding: 0;
    overflow: hidden;
    touch-action: none;
}

.camera-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: absolute;
}

.camera-canvas {
    width: 100%;
    height: 100%;
}

.camera-circle {
    height: 5dvh;
    width: 5dvh;
    border: solid 1px;
    border-radius: 50%;
    display: inline-block;
}

.camera-close-button {
    position: fixed;
    /* Fix the position of the button relative to the viewport */
    top: 0;
    right: 0;
    z-index: 1050;
    /* Ensure the button is on top of most elements; adjust as needed */
    margin: 16px;
    /* Add some space from the top and right edges of the viewport */
    outline: black 0.3dvw solid
}

.camera-button-container {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 3dvh;
    text-align: center;
}

.camera-take-button {
    padding: 5dvh;
    border: none;
    border-radius: 50%;
    background-color: #fff;
    z-index: 1050;
    transition: transform 0.1s ease, background-color 0.1s ease;
}

.camera-take-button:active {
    transform: scale(0.9);
    /* Scale down when active/pressed */
    background-color: #f0f0f0;
    /* Slightly greyer color when pressed */
}

.camera-text-left {
    text-align: left;
    vertical-align: bottom;
    position: fixed;
    bottom: 15dvh;
    left: 5dvw;
}

.camera-text-right {
    text-align: right;
    vertical-align: bottom;
    position: fixed;
    bottom: 15dvh;
    right: 5dvw;
}

.camera-swap-button {
    position: fixed;
    bottom: 5dvh;
    left: 5dvh;
    padding: 1dvh;
    border: none;
    border-radius: 40%;
    background-color: #fff;
    z-index: 1050;

}

.camera-text-button {
    position: fixed;
    bottom: 5dvh;
    right: 5dvh;
    padding: 1dvh;
    border: none;
    border-radius: 40%;
    background-color: #fff;
    z-index: 1050;

}

.camera-swap-button-icon {
    transition: transform 0.5s ease;
}

.camera-swap-button-icon.rotate {
    transform: rotate(180deg);
    /* Rotate 180 degrees */
}

.flip {
    transform: rotate(180deg);
    display: inline-block;
}


.modal-prerequisites {
    padding: 1dvmax;
}

.modal-prerequisites.strong {
    display: block;
}

.modal-content {
    background-color: black;
}

.aboutModalAuthors {
    font-size: smaller;
}

.aboutModalVersion {
    font-size: small;
}


@media (orientation: portrait) {
    .navbar {
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 1030;
        height: var(--navbar-height);
        margin-top: auto;
        position: fixed;
    }

    .grid-box {
        height: 7dvh;
    }

    body {
        padding-bottom: var(--navbar-height);
    }
}

@media (orientation: landscape) {
    body {
        flex-direction: row;
        padding-right: var(--navbar-height);
    }

    .grid-box {
        height: 20dvh;
    }

    .camera-button-container {
        left: auto;
        right: 3dvw;
        bottom: 0;
        top: 0;
        width: auto;
        text-align: left;
    }

    .camera-take-button {
        position: absolute;
        padding: 5dvw;
        top: 50%;
        right: 0;
        transform: translateY(-50%);
        /* Adjust position to truly center */
    }

    .camera-swap-button {
        right: 5dvw;
        left: unset;
        /* Reset left alignment */
    }

    .camera-text-button {
        right: 5dvw;
        top: 5dvh;
        bottom: unset;
    }

    .camera-close-button {
        right: unset;
        left: 0;
    }

    .navbar {
        top: 0;
        bottom: 0;
        right: 0;
        flex-direction: column;
        z-index: 1030;
        width: var(--navbar-height);
        margin-left: auto;
        position: fixed;
    }

    .navbar>.container-fluid {
        flex-direction: column;
        height: 100%;
    }
}