:root {
    --backgroundColor: #205579;
    --buttonColor: #1c4d6d;
    --pColor: white;
    --hColor: white;
    --bColor: white;
}

html, body {
    -webkit-tap-highlight-color: rgba(0,0,0,0);
    overflow: hidden;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: 'Bebas Neue', cursive;
    font-weight: 200;
    background-color: var(--backgroundColor);
}

body {
    display: flex;
}

#renderCanvas {
    position: absolute;
    width: 100%;
    height: 100%;
    touch-action: none;
}

* {
    -webkit-tap-highlight-color: rgba(255, 255, 255, 0) !important; 
    -webkit-focus-ring-color: rgba(255, 255, 255, 0) !important; 
    outline: none !important;
}

#overlay {
    z-index: 35;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    pointer-events: none;
}

/* Preview Container */

#previewContainer {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: space-between;
    z-index: 30;
    opacity: 0.0;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    box-sizing: border-box;
    pointer-events: none;
}

#previewContainer.fade-in {
    transition: 0.5s opacity;
    opacity: 1;
}

#videoPreview, #imagePreview {
    display: none;
    max-width: 90vw;
    max-height: calc(88vh - 12vmin);
    border-radius: 10px;
    border: 1vmin solid white;
    background-color: white;
}

.icon-button img, #videoPreview, #imagePreview {
    filter: drop-shadow(0 0 2px #333);
}

.video-preview #videoPreview {
    display: block;
}

.image-preview #imagePreview {
    display: block;
}

/* Top Bar */

.top-bar {
    position: relative;
    flex: 1 0 0;
}

.preview-box {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.icon-button {
    padding: 4vmin;
    user-select: none;
    -webkit-user-select: none;
    cursor: pointer;
}

.icon-button img {
    display: block;
    height: 7.5vmin;
}

#toggleMuteButton, #closePreviewButton {
    position: absolute;
    z-index: 1;
}

#toggleMuteButton {
    left: 0;
    bottom: 0;
    display: none;
}

.video-preview #toggleMuteButton {
    display: block;
}

#closePreviewButton {
    top: 0;
    right: 0;
}

/* Bottom Bar */

.bottom-bar {
    display: flex;
    justify-content: center;
    position: relative;
    margin: 0 5vmin;
}

.style-reset {
    background: none;
    border: none;
    outline: none;
    box-shadow: none !important;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.style-reset:focus { outline:0; }

#actionButton {
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    padding: 0.3em 0.5em 0.3em 0.5em;
    user-select: none;
    -webkit-user-select: none;
    font-family: 'Nunito', sans-serif;
    text-align: right;
    color: white;
    background-color: #AD50FF;
    border-radius: 0.5em;
    font-size: 5vmin;
    min-width: 3.25em;
}

#actionButton img {
    height: 0.8em;
    margin-left: 0.4em;
}

.disabled-download.video-preview #openSafariText {
    display: block;
    font-size: 5vmin;
}

.disabled-download.image-preview #tapAndHoldText {
    display: block;
    font-size: 7.5vmin;
}

#openSafariText, #tapAndHoldText {
    display: none;
    padding: 0.3em 0.5em 0.3em 0.5em;
    user-select: none;
    -webkit-user-select: none;
    font-family: 'Nunito', sans-serif;
    text-align: center;
    color: white;
    filter: drop-shadow(0px 1px 2px #333);
}

#previewContainer:not(.downloaded) .show-after-download {
    display: none;
}

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


.content {
    top: 0px;
    left: 0px;
    width: 100%;
    height: 100%;
    z-index: 0;
    background-color: white;
    background: -webkit-radial-gradient(rgba(1, 1, 1, 0.3), rgba(1, 1, 1, 0.1) 35%, rgba(1, 1, 1, 0.3));
    background: -moz-radial-gradient(rgba(1, 1, 1, 0.3), rgba(1, 1, 1, 0.1) 35%, rgba(1, 1, 1, 0.3));
    background: -ms-radial-gradient(rgba(1, 1, 1, 0.3), rgba(1, 1, 1, 0.1) 35%, rgba(1, 1, 1, 0.3));
    background: radial-gradient(rgba(1, 1, 1, 0.3), rgba(1, 1, 1, 0.1) 35%, rgba(1, 1, 1, 0.3));
} 

.grid {
    display: grid;
    height: 100%;
    grid-template-rows: 35% 27% 30% 8%;
}

.top_logo {
    object-fit: cover;
    margin-top: 10px;
    margin-left: 5px;
    margin-right: 5px;
    margin-bottom: 5px;
    text-align: center;
    color: transparent;
    animation: blurFadeIn 0.5s ease-in backwards;
}
.bottom_logo {
    bottom: 0%;
    margin-top: 5px;
    margin-bottom: 5px;
    text-align: center;
    color: transparent;
    animation: blurFadeIn 0.5s ease-in backwards;
}
 
.top_text {
    bottom: 0%;
    margin-top: 5px;
    margin-bottom: 5px;
    font-size: 60pt;
    text-align: center;
    animation: blurFadeIn 0.5s ease-in backwards;
}

.center_text {
    bottom: 0%;
    margin-top: 5px;
    margin-bottom: 5px;
    color: white;
    font-size: 30pt;
    text-align: center;
    animation: blurFadeIn 0.5s ease-in backwards;
}
   
@keyframes blurFadeIn{
    0%{
        opacity: 0;
        text-shadow: 0px 0px 40px #474344;
        transform: scale(1.3);
    }
    50%{
        opacity: 0.5;
        text-shadow: 0px 0px 10px #474344;
        transform: scale(1.1);
    }
    100%{
        opacity: 1;
        text-shadow: 0px 0px 1px #474344;
        transform: scale(1);
    }
}

#loadImage {
    z-index: -1 !important;
    display: none;
}
#loadBackground {
    background-color: transparent !important;
}
#requestingCameraPermissions {
    visibility: hidden
}
#requestingCameraIcon {
    visibility: hidden
}

#overlayDiv {
    z-index: 35;
    display: flex;
    width: 100%;
    height: 100%;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-family: sans-serif;
    font-weight: bold;
    font-size: 10vmin;
    text-align: center;
    animation: blurFadeIn 0.5s ease-in backwards;
    transition: opacity 1s;
}

#overlayDiv.fadeout {
    opacity: 0;
}

#splash {
    z-index: 40;
    background-color: var(--backgroundColor);
    opacity: 1;
    transition: opacity 1s;
}
  
#splash.fade {
    opacity: 0;
}

#overlayBody {
    color: var(--pColor);
    display: flex;
    padding-left: 5%;
    padding-right: 5%;
    font-size: 20pt;
    align-items: center;
    justify-content: center;
}

#overlayHeader {
    color: var(--hColor);
    top: 5%
}

#overlayHeaderImage {
    max-height: 20%;
    padding-top: 10%;
}

#overlayBodyImage {
    max-width: 70%;
    max-height: 50%;
}

#overlayButton {
    background-color: var(--buttonColor);
    height: 10%;
    max-width: 70%;
    margin-left: 10%;
    margin-right: 10%;
    border: none;
    border-radius: 5px;
    color: var(--bColor);
    font-size: 40px;
    -webkit-tap-highlight-color: transparent;
}

.buttonGrid {
    display: grid;
    grid-template-columns: 50% 50%;
}

.moduleBackground {
    background-color: var(--backgroundColor);
    display: grid;
    height: 100%;
    grid-template-rows: 25% 50% 25%;
}

#overlayDiv #module, #overlayDiv #cameraOverlayModule {
    height: 100%;
    width: 100%;
    animation: blurFadeIn 0.5s ease-in backwards;
    transition: opacity 1s;
}

#overlayDiv #module.fade, #overlayDiv #cameraOverlayModule.fade {
    opacity: 0;
}