* { margin: 0; padding: 0;}

.emscripten {
    display: block;
    position: absolute;
    top: 0px;
    left: 0px;
}
html{
    margin: 0;
    padding: 0;
    height: 100%;
    background-color: black;
}
body {
    margin: 0;
    padding: 0;
    height: 100%;
    max-height: 100%;
    width: 100%;
    float: left;
    background-color: black;
}

html, body {
  overflow: hidden;
}

canvas.emscripten {
    border: 0px none;
    padding: 0px;
    background-color: black;
    min-width: 320px; min-height: 240px;
    width: 100%;
    height: 100%;
    left: 0px;
    top: 0px;
}

.arena_wrapper{
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 2;
}

/* special div inserted by Module code */
div.arena_wrapper > div:first-of-type{
    width: 100%;
    height: 100%;
    position: absolute;
    left: 0px;
    top: 0px;
    padding: 0px;
    margin: 0px;
}


#application-status{
    position: absolute;
    top: -50px;
    left: 0;
}

/* loader */
#application-loader {
    position: fixed;
    width: 100%;
    height: 100%;
    z-index: 3;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: black;
}

#application-loader .rbw-logo{
    width: 240px;
    height: 206px;
    position: fixed;
    top: 50vh;
    left: 50%;
    margin-top: -120px;
    margin-left: -120px;
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
}

#application-loader .progress {
    position: absolute;
    bottom: -19px;
    left: 0;
    width: 240px;
    height: 14px;
    z-index: 3;
    margin-top: 98px;
    background: #ccc;
    overflow: hidden;
}

#application-loader .progress-fill {
    margin: 0 0 0 0;
    height: 14px;
    width: 0%;
    background: #e93c40;
}

.application-system-input-buttons {
    display:flex;
    justify-content:flex-end;
    align-items:center;
    padding: 0px 8px;
    user-select: none;
    -webkit-user-select: none;
}


/* sytem input for chat message */
#ghl-system-input {
    position: relative;
    width: 100%;
    font-size: 18px;
    z-index: 1;
    box-sizing: border-box;
    margin: 4px auto;
    padding: 5px
}

/* The Modal (background) */
.application-popup-fade {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: hidden; 
    background-color: rgb(0,0,0); /* Fallback color */
    background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
    user-select: none;
    -webkit-user-select: none;
}


/* Modal Content/Box */
.application-popup-body {
    background-color: #fefefe;
    border: 1px solid #888;
    width: 60%;
    border-radius: 3px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: Arial, sans-serif;
    user-select: none;
    -webkit-user-select: none;
}

.application-popup-header {
    background-color: #f6f7f9;
    border-bottom: 1px solid #e5e5e5;
    border-radius: 3px 3px 0 0;
    color: #1d2129;
    font-weight: bold;
    line-height: 19px;
    padding: 10px 12px;
    user-select: none;
    -webkit-user-select: none;
}

.application-popup-header-title {
    color: #1d2129;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.application-popup-content {
    padding: 10px;
    background-color: #fff;
    word-wrap: break-word;
    font-size: 14px;
    line-height: 18px;
    user-select: none;
    -webkit-user-select: none;
}

.application-popup-content h1 {
    font-size: 110%;
    color: #333;
    user-select: none;
    -webkit-user-select: none;
}

.application-popup-footer {
    background-color: #fff;
    padding: 12px 0;
    border-top: 1px solid #dddfe2;
    margin: 0 12px;
    text-align: right;
    user-select: none;
    -webkit-user-select: none;
}

.application-popup-button {
    background-color: #4267b2;
    color: white !important;
    margin: 4px 2px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    border: 1px solid #4267b2;
    border-radius: 2px;
    box-sizing: content-box;
    font-size: 12px;
    font-weight: bold;
    justify-content: center;
    padding: 4px 8px;
    text-shadow: none;
    cursor: pointer;
    vertical-align: middle;
    white-space: nowrap;
    user-select: none;
    -webkit-user-select: none;
}

.application-popup-button.secondary {
    background-color: #f6f7f9;
    border-color: #ced0d4;
    color: #4b4f56 !important;
}

a.application-popup-button {
    display: inline-block;
    text-decoration: none;
}

a.application-popup-button:hover {
    text-decoration: none;
}

.fileupload {
    bottom: 0;
    cursor: inherit;
    height: 10px;
    width: 10px;
    margin: 0;
    opacity: 0;
    padding: 0;
    position: absolute;
    right: 0;
}

.input-text {
    border: 1px solid #bdc7d8;
    margin: 0;
    padding: 3px;
}

.input-textarea {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

/* Terms */
.terms-container {
    position: fixed;
    top: 0;
    left: 0;
    margin: 0 auto;
    border: none;
    width: 100%;
    height: 100%;
    font-family: Helvetica, Tahoma, sans-serif;
    font-size: 1.2rem;
    z-index: 2;
    background-color: rgba(0,0,0,0.8);
}
.terms-modal {
    position: absolute;
    top: 50%;
    left: 50%;
    margin: auto auto;
    width: 90%;
    height: 90%;
    max-width: 740px;
    max-height: 550px;
    padding: 0;
    background: #e7e7e7;
    border: 2px solid #cbcbcb;
    border-width: 0 2px 2px 2px;
    -webkit-border-radius: 8px 8px 8px 8px;
    border-radius: 8px 8px 8px 8px;
    transform: translate(-50%, -50%);
}
.terms-text {
    padding: 1rem 1rem 0.7rem 1rem;
    height: 85%;
}
.terms-text iframe {
    width: 100%;
    height: 100%;
}
.terms-button-container {
    text-align: center;
    height: 10%;
}
.terms-button {
    display: inline-block;
    padding: 0.4rem 2rem;
    background: #69a55b;
    color: #ffffff;
    border: 0;
    -webkit-border-radius: 3px;
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}
.terms-button:hover {
    background: #79b56b;
}
.terms-button.disabled {
    background: #b8b8b8;
}

/* GDPR */
.gdpr-container {
    position: fixed;
    top: 0;
    left: 0;
    margin: 0 auto;
    border: none;
    width: 100%;
    height: 100%;
    font-family: Helvetica, Tahoma, sans-serif;
    font-size: 1.2rem;
    z-index: 2;
    background-color: rgba(0,0,0,0.4);
}
.accept-container {
    position: fixed;
    top: 0;
    left: 0;
    margin: 0 auto;
    border: none;
    width: 100%;
    height: 100%;
    font-family: Helvetica, Tahoma, sans-serif;
    font-size: 1.2rem;
    z-index: 2;
    background-color: rgba(0,0,0,0.4);
}
.gdpr-modal {
    position: absolute;
    top: 50%;
    left: 50%;
    margin: auto auto;
    width: 90%;
    height: 90%;
    max-width: 740px;
    max-height: 350px;
    padding: 0;
    transform: translate(-50%, -50%);
}
.accept-modal {
    position: absolute;
    top: 50%;
    left: 50%;
    margin: auto auto;
    width: 90%;
    height: 90%;
    max-width: 740px;
    max-height: 350px;
    padding: 0;
    transform: translate(-50%, -50%);
}
.gdpr-big-font {
    font-size: 1.4rem;
}
.gdpr-container a, a:link, a:hover, a:visited, a:active {
    color: #157cc6;
    text-decoration: underline;
}
.accept-container a, a:link, a:hover, a:visited, a:active {
    color: #157cc6;
    text-decoration: underline;
}
.gdpr-header {
    padding: 0.7rem 0.2rem;
    background: #167cc6;
    color: #ffffff;
    text-align: center;
    -webkit-border-radius: 8px 8px 0 0;
    border-radius: 8px 8px 0 0;
}
.gdpr-container .button-container {
    text-align: center;
}
.accept-container .button-container {
    text-align: center;
}
.gdpr-button {
    display: inline-block;
    padding: 1.6rem 4.1rem;
    background: #69a55b;
    color: #ffffff;
    border: 0;
    -webkit-border-radius: 3px;
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}
.gdpr-button:hover {
    background: #79b56b;
}
.gdpr-button.disabled {
    background: #b8b8b8;
}
.gdpr-text {
    padding: 2.6rem 2.4rem;
    background: #e7e7e7;
    border: 2px solid #cbcbcb;
    border-width: 0 2px 2px 2px;
    -webkit-border-radius: 0 0 8px 8px;
    border-radius: 0 0 8px 8px;
}
.gdpr-text-b {
    display: block;
    margin-bottom: 2rem;
}

/* Payment */
.payment-container {
    position: fixed;
    left: 0;
    top: 0;
    display: none;
    border: none;
    width: 100%; 
    height: 100%;
    margin: 0 auto;
    overflow: auto;
    background-color: rgb(0,0,0); /* Fallback color */
    background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
    z-index: 16;
    
}
.payment-modal {
    display: block;
    position: absolute;
    padding: 0;
    margin: auto auto;
    max-width: 740px;
    max-height: 650px;
    width: 90%;
    height: 97%;
    border: none;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}
.payment-modal iframe {
    background: #e7e7e7;
    position: relative;
    height: 100%;
    border: none;
}

.payment-modal .payment-close-btn {
    position: absolute;
    right: -30px;
    width: 30px;
    height: 30px;
    cursor: pointer;
    border: none;
    background-color: #3498DB;
    vertical-align: middle;
    color: white;
}

.payment-close-btn:hover, .payment-close-btn:focus {
  background-color: #2980B9;
}


@media screen and (max-aspect-ratio: 129/100) {
    canvas.emscripten {
        width: 100%;
        height: calc(100vw / 1.333333);
        margin-top: calc((100vh - 100vw / 1.333333) / 2);
        transform-origin: 0 0;
    }
}

@media screen and (min-aspect-ratio: 25/9) {
    canvas.emscripten {
        height: 100%;
        width: calc(100vh * 2.44);
        margin-left: calc((100vw - 100vh * 2.44) / 2);
        transform-origin: 0 0;
    }
}

@media screen and (max-height: 400px) {
    .application-popup-body {
        overflow-y: auto;
        max-height: 97%;
        width: 75%;
        -webkit-text-size-adjust: none;
    }

    .application-popup-header {
        font-weight: bold;
        line-height: 12px;
        padding: 3px 12px;
    }

    .application-popup-content {
        padding: 3px 10px;
        font-size: 10px;
        line-height: 12px;
    }

    .application-popup-content div {
        margin-top: 0 !important;
    }

    .application-popup-content h1 {
        font-weight: bold;
        line-height: 10px;
        font-size: 10px;
    }

    .application-popup-content textarea {
        font-size: 9px;
    }

    .application-popup-footer {
        padding: 3px 12px;
    }
}

/* safe area support for iphone */
:root {
    --sat: env(safe-area-inset-top);
    --sar: env(safe-area-inset-right);
    --sab: env(safe-area-inset-bottom);
    --sal: env(safe-area-inset-left);
}
