:root {
    --main-text-size: 18px;
    --main-h1-size: 36px;
    --rmd-dark-blue: #152231;
    --rmd-dark-green: #029376;
    --rmd-light-green: #45b291;
    --rmd-light-blue: #a6b7c7;
    --rmd-light-grey-white: #f4f4f4;
    --rmd-font-black: #1f1f1f;
    --rmd-font-grey: #515a65;
    --rmd-font-white: #ffffff;
    --rmd-border-radius: 3px;
    /*--rmd-qr-code-size: min(75dvh, 95dvw);*/
    --rmd-qr-code-size: -webkit-fill-available;
    --rmd-font-size-small: min(1.5dvh, 1.5dvw);
    --rmd-font-size-regular: min(1.8dvh, 2dvw);
    --rmd-font-size-large: min(3dvh, 3dvw);
    --rmd-font-size-qr-small: min(1dvh, 1dvw);
    --rmd-font-size-qr-medium: min(1.5dvh, 1.5dvw);
    --rmd-font-size-qr-large: min(2dvh, 2dvw);
    --rmd-font-size-qr-larger: min(2.5dvh, 2.5dvw);
}

@keyframes blinker {

    0%,
    66% {
        opacity: 1;
    }

    /* 0.8s on, calculated as 100% * 0.8 / 1.0 */
    100% {
        opacity: 0;
    }

    /* 0.2s off, calculated as 100% * 0.2 / 1.0 */
}

.green-dot {
    color: rgb(0, 100, 0);
}

.yellow-dot {
    color: rgb(210, 160, 0);
    text-decoration: blink;
    -webkit-animation-name: blinker;
    -webkit-animation-duration: 1s;
    -webkit-animation-iteration-count: infinite;
    -webkit-animation-timing-function: ease-in-out;
    -webkit-animation-direction: alternate;
    animation-name: blinker;
    animation-duration: 1s;
    animation-iteration-count: infinite;
    animation-timing-function: ease-in-out;
    animation-direction: alternate;
}
  
.red-dot {
    color: rgb(130,0,0);
}

/* Basic reset */
body,
h1,
button {
    margin: 0;
    padding: 0;
}

html,
body {
    background-color: var(--rmd-dark-blue);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100dvh;
    width: 100dvw;
    color: var(--rmd-font-white);
    font-family: "Roboto", Verdana;
    touch-action: none;
    -webkit-user-select: none; /* Safari */
    -ms-user-select: none; /* IE 10 and IE 11 */
    -moz-user-select: none; /* Mozilla */
    user-select: none; /* Standard syntax */
}

.login-container {
    background: white;
    padding: 0px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
    border-radius: var(--rmd-border-radius);
}

.login-container img {
    padding-top: 0dvh;
    width: 30dvw;
    margin-bottom: -1dvh;
}

.login-container h1 {
    padding-left: 4dvw;
    padding-right: 4dvw;
    padding-bottom: 2dvh;
    padding-top: 0dvh;
    color: #000000;
    font-size: max(6dvh, 14px);
}

.login-with-button-container {
    padding-bottom: 15px;
    border-style: dashed;
    border-top-width: 0px;
    border-bottom-width: 0px;
    border-left-width: 0px;
    border-right-width: 0px;
    border-color: #000000;
}

.login-with-button-container button {
    background-color: #ffffff;
    color: rgb(0, 0, 0);
    width: 100%;
    /* Makes the button fill the full width of the container */
    height: max(8dvh, 12px);
    border-style: dashed;
    border-top-width: 0px;
    border-bottom-width: 1px;
    border-left-width: 0px;
    border-right-width: 0px;
    border-color: #000000;
    font-size: max(2.5dvh, 10px);
    cursor: pointer;
    transition: background-color 0.1s;
    font-family: "Roboto", Verdana;
}

.login-with-button-container button:hover {
    background-color: var(--rmd-light-grey-white);
} 

.login-with-button-container button:active {
    background-color: var(--rmd-light-blue);
}


#login-meid {
    border-top-width: 1px;
}

#login-ciam {
    border-top-width: 0px;
}

.ldap-login-form {
    display: flex;
    /* Enables Flexbox within the container */
    flex-direction: column;
    /* Stacks children vertically */
    padding-bottom: 20px;
}

.ldap-login-input-container {
    display: flex;
    /* Enables Flexbox within the container */
    flex-direction: column;
    /* Stacks children vertically */
    background-color: #ffffff;
    color: rgb(0, 0, 0);
    width: auto;
    margin: 0px 20px 20px 20px;
}

.ldap-login-input-container input {
    height: 60px;
    padding: 0px 20px 0px 20px;
    margin: 0px;
    border-style: solid;
    border-width: 1px 1px 1px 1px;
    border-color: #959595;
    font-size: var(--main-text-size);
    text-align: left;
    cursor: pointer;
    transition: background-color 0.1s;
}

.ldap-login-input-container input::placeholder {
    opacity: 1;
    color: #959595;
}

.ldap-login-input-container input:hover {
    background-color: #cecece;
}

.ldap-login-input-container input:active {
    background-color: #a1a1a1;
}

.ldap-login-input-container input:focus {
    outline: none;
    background-color: white;
}

#ldap-username {
    border-bottom-width: 1px;
}

#ldap-password {
    border-top-width: 0px;
}

#ldap-login-submit {
    border-top-width: 1px;
}

.qr-master-container {
    display: flex;
    /* Optional: for inner alignment of contents */
    flex-direction: column;
    width: 100dvw;
    /* Full width of the viewport */
    height: 100dvh;
    /* Full height of the viewport */
    max-width: max(100dvw, 100dvh);
    /* Maximum width is the larger of viewport width or height */
    max-height: max(100dvw, 100dvh);
    /* Maximum height is the larger of viewport width or height */

    position: sticky;
    top: 0;
    /* Align top edge with the viewport */
    left: 0;
    /* Align left edge with the viewport */
    overflow: hidden;
    /* Adds scrollbars if content overflows */
    box-sizing: border-box;
    /* Include padding and borders in the element's size */
    justify-content: center;
    /* Optional: horizontally center content */
    align-items: center;
    /* Optional: vertically center content */
    padding: min(2dvh, 2dvw);
}


.qr-info-container {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-around;
    /*background: white;*/
    width: auto;
    /*padding: min(1.5dvw, 1.5dvh) min(1.5dvw, 1.5dvh) min(1.5dvw, 1.5dvh) min(1.5dvw, 1.5dvh);*/
    /*margin: 0 auto;*/
    padding-bottom: 1dvh;
    text-align: center;
    border-radius: var(--rmd-border-radius)
}

.qr-info-container img {
    /*height: 10dvh;*/
    /*max-height: 10dvh;*/
    width: min(12dvh, 12dvw);
    position:relative;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
}

.qr-info-name {
    font-size: var(--rmd-font-size-qr-larger);
    padding-bottom: 0.5dvh;
}

.qr-info-text {
    font-size: var(--rmd-font-size-qr-large);
    padding-bottom: 1dvh;
}

.qr-button-container {
    display: flex;
    /* Enables Flexbox within the container */
    flex-direction: column;
    /* Stacks children vertically */
    align-items: center;
    /* Aligns children (username and button) to the start of the flex container */
    /*margin: 0.5dvh 0dvw 0.5dvh 0dvw;*/
    position: relative;
}

.qr-button-container button {
    color: var(--rmd-font-white);
    background-color: var(--rmd-dark-blue);
    width: min(10dvh, 10dvw);
    height: min(4.5dvh, 4.5dvw);
    margin: 0.5dvh 0dvw 0.5dvh 0dvw;
    border: thin solid var(--rmd-font-white);
    border-radius: var(--rmd-border-radius);
    font-size: var(--rmd-font-size-regular);
    cursor: pointer;
    transition: background-color 0.1s;
}

.qr-button-container button:hover {
    background-color: var(--rmd-light-grey-white);
}

.qr-button-container button:active {
    background-color: var(--rmd-light-blue);
}

.qr-text-container {
    display: flex;
    /* Enables Flexbox within the container */
    flex-direction: column;
    /* Stacks children vertically */
    align-items: center;
    /* Aligns children (username and button) to the start of the flex container */
    font-size: var(--rmd-font-size-regular);
    width: auto;
    /* Adjust if necessary to fit content */
    /*padding: 1dvh 1dvw 1dvh 1dvw;*/
    padding-left: min(2.5dvw, 2.5dvh);
    padding-right: min(2.5dvw, 2.5dvh);
    box-sizing: border-box;
    /* Ensures padding is included in the width */
}

.qr-text-container div {
    width: 100%;
    text-align: center;
    /* Centers the text within each div, adjust as necessary */
    white-space: nowrap;
    /* Prevents text from wrapping */
    overflow: hidden;
    /* Prevents overflow of text outside the div */
    text-overflow: ellipsis;
    /* Adds ellipsis if text overflows */
}

.qr-text-prev-room {
    display: flex;
    /* Enables Flexbox within the container */
    flex-direction: column;
    /* Stacks children vertically */
    align-items: center;
    /* Aligns children (username and button) to the start of the flex container */
    font-size: var(--rmd-font-size-regular);
    width: auto;
    /* Adjust if necessary to fit content */
    padding: 1dvh 1dvw 0dvh 1dvw;
    margin-left: 1dvw;
    margin-right: 2dvw;
    box-sizing: border-box;
    /* Ensures padding is included in the width */
}

.qr-info-table { 
    position: relative;
    /*background-color: var(--rmd-light-grey-white);*/
    border-radius: var(--rmd-border-radius);
    border: solid thin var(--rmd-font-white);
    padding: 0.5dvh;
    font-size: var(--rmd-font-size-qr-medium);
    width: -webkit-fill-available;
}

.qr-info-table a {
    color: var(--rmd-light-blue);
    -webkit-animation-name: blinker;
    -webkit-animation-duration: 1s;
    -webkit-animation-iteration-count: infinite;
    -webkit-animation-timing-function: ease-in-out;
    -webkit-animation-direction: alternate;
    animation-name: blinker;
    animation-duration: 1s;
    animation-iteration-count: infinite;
    animation-timing-function: ease-in-out;
    animation-direction: alternate;
}

.qr-table-titles {
    text-align: end;
    width: auto;
}

.qr-table-info {
    text-align: start;
    font-weight: bold;
    width: auto;
}

.qr-table-info-blinking {
    text-decoration: blink;
    -webkit-animation-name: blinker;
    -webkit-animation-duration: 1s;
    -webkit-animation-iteration-count: infinite;
    -webkit-animation-timing-function: ease-in-out;
    -webkit-animation-direction: alternate;
    animation-name: blinker;
    animation-duration: 1s;
    animation-iteration-count: infinite;
    animation-timing-function: ease-in-out;
    animation-direction: alternate;
}

.qr-code-container {
    display: flex;
    align-items: start;
    /* 'center' Centers the canvas vertically */
    justify-content: center;
    /* Centers the canvas horizontally */
    overflow: hidden;
    position: relative;
    /* Needed to position the canvas absolutely within */
    /*background: white;*/
    text-align: center;
    border-radius: var(--rmd-border-radius);
    /*margin-top: 10px;*/
    /*margin-bottom: 1dvh;*/
    width: var(--rmd-qr-code-size);
    height: var(--rmd-qr-code-size);
    box-sizing: border-box;
}

.qr-code-container canvas {
    display: block;
    /*margin: 0 auto;*/
    margin: 0;
    top: 0;
    left: 0;
}

.logoutConfirm {
    display: none;
    position: fixed;
    z-index: 999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    font-family: "Roboto", Verdana;
}

#logoutConfirmLink {
    width:6.6dvh;
    height:6.6dvh;
    position:absolute;
    left: 1px;
    bottom: 1px;
}

.logoutConfirmContent {
    background-color: black;
    color: var(--rmd-font-white);
    margin: 20dvh auto;
    padding: 2dvh 3dvh 3dvh 3dvh;
    border: 1px solid var(--rmd-font-grey);
    border-radius: var(--rmd-border-radius);
    width: fit-content; /* Could be more or less, depending on screen size */
    text-align: center;
}

.logoutConfirmContent img {
    height: 12dvh;
}

.logoutConfirmContentText {
    padding: 1dvh 1dvh 2dvh 1dvh;
    text-align: center;
    font-size: 3dvh;
}

.logoutConfirmContentButton {
    text-align: center;
}

.logoutConfirmContentButton button {
    padding: 2dvh;
    height: auto;
    font-size: 3dvh;

    text-rendering: auto;
    color: var(--rmd-font-black);
    letter-spacing: normal;
    word-spacing: normal;
    line-height: normal;
    text-transform: none;
    text-indent: 0px;
    text-shadow: none;
    display: inline-block;
    text-align: center;
    align-items: flex-start;
    cursor: default;
    box-sizing: border-box;
    background-color: var(--rmd-light-grey-white);
    margin: 1.5dvh;
    padding-block: 1.5dvh;
    padding-inline: 2dvh;
    border: 1px solid var(--rmd-font-grey)
}


@media (max-width: 600px) or (max-height: 630px){
    :root {
        --rmd-font-size-qr-small: min(2dvh, 2dvw);
        --rmd-font-size-qr-medium: min(2.5dvh, 2.5dvw);
        --rmd-font-size-qr-large: min(3dvh, 3dvw);
        --rmd-font-size-qr-larger: min(3.5dvh, 3.5dvw);
    }

    .qr-master-container {
        justify-content: start;
    }

    .qr-info-container {
        flex-direction: column;
        align-items: center;
        padding: 0px;
        padding-bottom: 0px;
        box-shadow: none;
        padding-bottom: 0px;
    }

    .qr-info-container img {
        margin-top: 1dvh;
        margin-bottom: 1dvh;
    }

    .qr-text-container {
        padding-top: 0px;
        margin: 0px;
        font-size: var(--rmd-font-size-large);
        width: -webkit-fill-available;
    }

    .qr-info-text {
        padding-bottom: 0dvh;
    }

    .qr-info-table {
        font-size: var(--rmd-font-size-qr-large);
        margin-top: 0.5dvh;
    }

    .qr-button-container {
        flex-direction: row;
    }

    .qr-button-container button {
        font-size: var(--rmd-font-size-larger);
        width: auto;
        height: auto;
        padding: 1.5dvh;
        margin: 0.5dvh 0.25dvh 0.5dvh 0.25dvh;
    }

    .qr-code-container {
        width: 98dvw;
        height: 98dvw;
        box-shadow: none;
    }
}