:root {
    --white: #fff;
    --gray: #eff5f6;
    --darkgray: #333;
    --primary: #f5a21e;
    /*orange;*/
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    background: black;
    font-family: sans-serif;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

[v-cloak] {
    display: none;
}

[waitloaded] {
    display: none !important;
}

/* disable overflow, again, because mobile browsers ignore the html, body style */
/* https://stackoverflow.com/a/14271049 */
#app {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
}

.loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;

    &::after {
        content: 'loading';
        position: absolute;
        top: -50px;
        font-size: 1.5em;
        left: 50%;
        transform: translateX(-50%);
        color: var(--white);
    }

    .dot {
        width: 10px;
        height: 10px;
        background-color: var(--gray);
        border-radius: 50%;
        animation: loader 1.2s infinite ease-in-out;

        &:nth-child(1) {
            animation-delay: 0.4s;
        }

        &:nth-child(2) {
            animation-delay: 0.8s;
        }
    }
}

.monospace {
    font-family: monospace;
}

.triangle {
    background-color: var(--primary);
    color: var(--white);
    z-index: 1;
    user-select: none;
    position: relative;

    &::after {
        content: '';
        position: absolute;
        top: 0;
        left: 100%;
        width: 30px;
        height: 100%;
        background-image: linear-gradient(110deg, var(--primary) 50%, transparent 50%);
    }
}

.datablock {
    display: flex;
    flex-direction: row;
    gap: 10px;
    padding: 10px;
    align-items: center;

    hr {
        height: 1.5em;
        width: 2px;
        border: none;
        margin: 0 5px;
        background: black;
        ;
    }
}

.title {
    position: absolute;
    top: 0;
    left: 0;
    text-align: center;
    padding: 10px 40px;
    margin: 0;
    font-size: 2.5em;
}

.svg-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;

    .svg {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: left top;
    }
}

.sidebar {
    position: absolute;
    top: 0;
    right: 0;
    overflow: hidden;
    /* padding: 10px; */
    margin: 20px;
    background: var(--white);
    border-radius: 10px;
    width: max(300px, 20vw);
    height: calc(100vh - 40px);
    /* slide-in animation */
    transition: transform 0.2s ease;
    /* NOTE: you can comment this out for debugging */
    transform: translateX(100%);
    opacity: 0;

    &.show {
        opacity: 1;
        transform: translateX(0);
    }

    .image {
        width: 100%;
        height: 300px;

        cursor: pointer;

        background-color: var(--gray);
        position: relative;
        color: var(--darkgray);

        /* override the js size */
        background-size: cover !important;

        i,
        svg {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            height: 40px;
            width: 40px;
        }
    }

    .heading {
        background-color: var(--primary);
        color: var(--white);
        display: inline;
        padding: 10px;
        margin: 0;
        font-size: 1.5em;
    }

    .datablock {
        margin-top: 10px;

        span {
            font-size: 1.5em;
            line-height: 1.5em;
        }
    }

    p.description {
        padding: 0 10px;
        font-size: 1.2em;
        margin: 0;
    }
}

.stats {
    position: fixed;
    bottom: 0;
    left: 0;
    justify-content: center;
    align-items: center;
    background: var(--primary);
    color: var(--white);
    font-size: 1.5em;

    hr {
        background-color: var(--white);
    }
}

.tooltip {
    position: fixed;
    background-color: var(--darkgray);
    color: var(--white);
    padding: 10px;
    border-radius: 5px;
    opacity: 0;
    transition: opacity 0.2s ease;
    position: absolute;
    pointer-events: none;

    &.show {
        opacity: 1;
    }
}

.image-carousel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--darkgray);
    opacity: 0;
    transition: opacity 0.1s ease;
    pointer-events: none;

    &.show {
        opacity: 1;
        pointer-events: auto;
    }

    .images {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);

        width: 80vw;
        height: 80vh;

        /* center the image inside */
        display: flex;
        align-items: center;
        justify-content: center;

        img {
            display: block;
            object-fit: contain;
            max-width: 100%;
            max-height: 100%;
        }
    }

    .arrow,
    .close-btn {
        color: var(--gray);
        cursor: pointer;
        z-index: 2;

        svg {
            height: 40px;
            width: 40px;
            transition: width 0.2s ease, height 0.2s ease;
        }

        &:hover {
            color: var(--white);

            svg {
                width: 45px;
                height: 45px;
            }
        }
    }

    .arrow {
        position: fixed;
        top: 50%;
        transform: translateY(-50%);

        &.left {
            left: 5vw;
        }

        &.right {
            right: 5vw;
        }
    }

    .close-btn {
        position: fixed;
        top: 20px;
        right: 20px;
    }

    .nav-dots {
        position: fixed;
        bottom: 5vh;
        left: 50%;
        transform: translateX(-50%);

        display: flex;
        gap: 10px;

        .dot {
            width: 20px;
            height: 20px;
            border-radius: 50%;
            border: 2px solid var(--gray);
            cursor: pointer;

            display: flex;
            align-items: center;
            justify-content: center;
        }

        .dot.active::before {
            content: "";
            width: 12px;
            height: 12px;
            border-radius: 50%;
            background: var(--gray);
            /* to make flex center it */
            position: static;
        }
    }
}

@keyframes loader {
    0% {
        transform: scale(0.5);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(0.5);
    }
}