:root {
  --primary-color: #040223;
  --loader-size: 3rem;
}

body {
    margin: 0;
    background-color: var(--primary-color);
    overflow-y: hidden;
    overflow-x: hidden;
}

header {
    height: 10rem;
    font-family: 'Courier New', Courier, monospace;
    display: flex;
    justify-content: center;
    color: white;
    padding-top: 1rem;
    padding-bottom: 0.5rem;
}

.header-content {
    display: flex;
    justify-content: space-between;
    flex-direction: column;
}

.sign {
    height: auto;
    width: auto;
    max-height: 5rem;
    max-width: 20rem;
    margin: 0;
}

.header-title {
    width: 100%;
    display: block;
    text-align: right;
    font-size: 1.2rem;
    margin: 0;
}

.header-subtitle-container {
    position: relative;
    padding-left: 1.6rem;
    padding-right: 1.6rem;
    cursor: pointer;
}

.header-subtitle {
    width: 100%;
    display: block;
    text-align: center;
    text-shadow: 0px 0px 16px white;
    font-size: 1.4rem;
    font-weight: bold;
    margin: 0;
    border-bottom: 1px solid white;
}

.info-icon {
    width: 1.4rem;
    height: 1.4rem;
    position: absolute;
    right: 0;
    top: 0;
}

/* https://css-tricks.com/the-trick-to-viewport-units-on-mobile/ */
.main-section {
    position: relative;
    height: calc(100vh - 16rem);
    height: calc((var(--vh, 1vh) * 100) - 16rem);
    width: 100%;
    touch-action: none;
}

.canvas-container {
    height: 100%;
    width: 100%;
    min-height: 10rem;
    margin: 0;
    border: 0;
    overflow: hidden;
    cursor: pointer;
}

footer {
    height: 6rem;
    padding-top: 0.5rem;
    display: flex;
    justify-content: center;
    width: 100%;
}

.open-gallery-button {
    height: 3rem;
    line-height: 3rem;
    font-family: 'Courier New', Courier, monospace;
    color: white;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    background-color: transparent;
    font-weight: bold;
    border-radius: 0.5rem;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: rgba(255, 255, 255, 0.16) 0px 8px 28px, rgba(255, 255, 255, 0.23) 0px 8px 28px;
}

.open-gallery-button:hover {
    box-shadow: rgba(255, 255, 255, 0.2) 0px 8px 28px, rgba(255, 255, 255, 0.32) 0px 8px 28px;
    transform: translateY(-2px);
}

.loader-container {
    position: absolute;
    height: 100%;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    background-color: var(--primary-color);
    opacity: 0.8;
    text-align: center;
    color: white;
    font-weight: bold;
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.2rem;
}

.loader-container > * {
    opacity: 1;
}

.map-loader {
    width: var(--loader-size);
    height: var(--loader-size);
    border: 5px solid white;
    border-bottom-color: transparent;
    border-radius: 50%;
    display: inline-block;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
}

.popup-container {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    display: none;
    justify-content: end;
    align-items: center;
    flex-direction: column;
}

.popup-mask {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background-color: var(--primary-color);
    opacity: 0.6;
}

.popup {
    height: auto;
    width: auto;
    max-height: 80%;
    max-width: 30rem;
    font-family: 'Courier New', Courier, monospace;
    background-color: white;
    position: fixed;
    padding: 1rem;
    overflow-y: scroll;
    border-top-left-radius: 1rem;
    border-top-right-radius: 1rem;
}

.appear-animation {
    animation: appear 800ms linear;
}

@keyframes appear {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

.popup-title {
    font-family: 'Courier New', Courier, monospace;
    font-weight: bold;
    text-align: center;
}

.popup-image-container {
    height: 22rem;
    width: 100%;
    position: relative;
    background-repeat: no-repeat;
    background-position: center center;
    background-size: contain;
}

.popup-image-loader-container {
    background-color: white;
    height: 100%;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes rotation {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.popup-image-loader {
    width: var(--loader-size);
    height: var(--loader-size);
    border: 5px solid var(--primary-color);
    border-bottom-color: transparent;
    border-radius: 50%;
    display: inline-block;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
}

.close-icon {
    width: 2rem;
    height: 2rem;
    position: absolute;
    top: 1rem;
    right: 1rem;
    cursor: pointer;
}

.popup-description {
    padding-top: 1rem;
    font-family: 'Courier New', Courier, monospace;
    display: none;
}

.buttons-container {
    width: 100%;
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
}

.popup-button-link {
    text-decoration: none;
}

.popup-button {
    height: 3rem;
    line-height: 3rem;
    margin-top: 1rem;
    font-family: 'Courier New', Courier, monospace;
    color: var(--primary-color);
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    background-color: transparent;
    font-weight: bold;
    border-radius: 0.5rem;
    cursor: pointer;
    border: 2px solid var(--primary-color);
    box-shadow: var(--primary-color) 0px 4px 8px;
}

@media (width >= 40rem) {
    .popup-container {
        justify-content: center;
    }

    .popup {
        border-bottom-left-radius: 1rem;
        border-bottom-right-radius: 1rem;
    }
}