:root {
    --color-blue: #568093;
    --color-red: #c7766e;
    --color-green: #57a293; /*#6db1a1;*/
    --color-yellow: #ca9f5b; /*#e3c072;*/
    --color-hover: #0d313f;
    --color-gray: #9b9c9c;
    --color-silver: #f2f2f2;
    --color-darkblue: #4d6470;

    --bg-blue: #56809330;
    --bg-red: #c7766e40;
    --bg-green: #57a29330;
    --bg-yellow: #ca9f5b30;
    --bg-gray: #56809320;

    --bg-blue-flat: #dfe7eb;
    --bg-red-flat: #f1dddb;
    --bg-green-flat: #e0ebe9;
    --bg-yellow-flat: #f5ede0;
    --bg-gray-flat: #eaeff1;

    --bg-table-head: #4d6470;
    --bg-table: #56809320;
    --bg-table-hover: #ffffffcc; /*#56809320;*/

    --bg-table-flat: #eaeff1;
    --bg-table-hover-flat: #fbfcfc;

    --bg-header: #568093;

    --border-blue: #56809340;
    --border-red: #c7766e80;
    --border-green: #57a29380;
    --border-yellow: #ca9f5b80;
    --border-gray: #56809340;
    --border-silver: #eeeeee;
    --border-table: #56809320;
    --border-navbar: #ffffff80;
}

html {
    min-height: 100vh;
}

body {
    min-height: 100vh;
    overflow-y: scroll;
    font-size: 20px;
    -webkit-touch-callout: none;
}

/******************************************************************************
 Containers
 */

.innercontainer {
    max-width: 800px;
    margin: auto;
}

.container {
    padding: 0;
}

#outer-container {
    max-width: unset;
}

@media only screen and (max-width: 991px) {
    .innercontainer {
        width: 90%;
        margin: auto;
    }
}

body.role-qr #outer-container {
    padding-bottom: 130px; /* padding to account for the QR timeout message */
}

body.page-checkin {
    padding-bottom: 400px;
}

/******************************************************************************
 Utilities
 */

.hidden {
    display: none;
}
.color-blue {
    color: var(--color-blue);
}
.color-red {
    color: var(--color-red);
}
.color-green {
    color: var(--color-green);
}
.color-yellow {
    color: var(--color-yellow);
}
.color-gray {
    color: var(--color-gray);
}
.opacity-50 {
    opacity: 0.5;
}
.show-mobile {
    display: none;
}
@media only screen and (max-width: 767px) {
    .show-mobile {
        display: revert;
    }
    .hide-mobile {
        display: none;
    }
}

.scrolltarget {
    scroll-margin-top: 30px;
}

/******************************************************************************
 Misc
 */
h1 {
    text-align: center;
    margin-bottom: 1em;
}

h2,
.formheader {
    font-size: 24px;
    font-weight: 500;
    text-align: center;
    margin-top: 10px;
    margin-bottom: 20px;
}

h3 {
    font-size: 18px;
    font-weight: 500;
    text-align: center;
    margin-top: 10px;
    margin-bottom: 20px;
}

.info-message {
    background-color: var(--bg-gray);
    border: 1px solid var(--border-gray);
    padding: 1rem;
    border-radius: 0.25rem;
}


hr {
    background: linear-gradient(90deg, rgba(86,128,147,0.2) 0%, rgba(86,128,147,1) 50%, rgba(86,128,147,0.2) 100%);
}


/******************************************************************************
Extensions and modifications to Bootstrap forms
 */

.input-group-append {
    display: flex;
}

.input-group-append .input-group-text {
    border-bottom-left-radius: 0;
    border-top-left-radius: 0;
}

.input-group-prepend .input-group-text {
    border-bottom-right-radius: 0;
    border-top-right-radius: 0;
}

.form-control:focus {
    box-shadow: inset 0 0 2px .25rem rgba(13, 110, 253, .25);
}

.form-label-ellipsis {
    max-width: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/******************************************************************************
Header and footer
 */

header {
    margin-bottom: 30px;
    height: 150px;
    position: relative;
    background-repeat: no-repeat;
    background-position: center center;
    background-size: 360px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

header.no-header {
    height: auto;
    color: black;
}

footer {
    position: fixed;
    bottom: 0;
    width: 100%;
    padding: 10px;
    margin-top: 50px;
    text-align: center;
}

header a,
header a:focus,
header a:hover {
    color: inherit;
}

#language-switcher {
    text-align: center;
    margin-bottom: 20px;
}

#language-switcher a {
    color: white;
    font-size: 1.1em;
    text-decoration: none;
    padding: 0.2em 1em;
    margin: 0 0.5em;
    border: 1px solid #ffffff33;
    border-radius: 4px;
}

#language-switcher a:hover {
    background-color: #ffffff33;
}

header h1 {
    text-align: center;
}

#logo {
    width: 400px;
    max-width: 90%;
    margin: auto;
    text-align: center;
}

#logo img {
    max-width: 100%;
    max-height: 100%;
}

#version-hidden,
#logout-hidden,
#logout,
#qr-clear {
    position: absolute;
    display: inline-block;
    top: 0;
    right: 0;
    font-size: 12px;
    cursor: pointer;
    vertical-align: top;
    overflow: hidden;
    text-decoration: none;
    padding: 1em 2em;
    user-select: none;
}

#logout-hidden.secret-button {
    opacity: 0;
}

#logout-hidden.secret-button.revealed {
    opacity: 1;
    z-index: 99;
    width: 100px;
    left: 0;
    right: auto;
}



#adminlink {
    position: absolute;
    top: 0;
    left: 0;
    padding: 1em 2em;
    font-size: 12px;
    text-decoration: none;
}

body.role-admin #adminlink:hover,
body.role-root #adminlink:hover,
body.role-user #adminlink:hover {
    background-color: var(--color-green);
}

#logout-hidden:hover,
body.role-admin #logout:hover,
body.role-root #logout:hover,
body.role-user #logout:hover {
    background-color: var(--color-red);
    color: white;
}

#adminlink:hover,
#adminlink:focus {
    color: white;
}

.sneaky {
    opacity: 0;
}

body.role-root .sneaky,
body.role-admin .sneaky,
body.role-user .sneaky,
.sneaky:hover,
.sneaky:focus {
    opacity: 1;
}

#company {
    width: 100%;
    height: 140px;
    line-height: 140px;
    float: left;
    text-align: center;
    font-size: 40px;
    text-decoration: none;
    color: white;
}

#alarm-indicator {
    height: 25px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--color-red);
    color: white;
    text-align: center;
    font-size: 12px;
    padding: 3px;
    border-bottom: 1px solid var(--border-navbar);
}

#alarm-indicator i {
    margin-right: 0.5em;
}

/******************************************************************************
Header for root admin pages
 */


body[class*="page-admin-root"] header {
    background-color: #4d6470; /* #568093; */
    color: white;
}



body[class*="page-admin-root"] header #logo {
    text-decoration: none;
    margin-bottom: 10px;
}

body[class*="page-admin-root"] header #logo::before {
    content: "Daladatorer Besöksregistrering";
    display: block;
    font-size: 1.5em;
}

body[class*="page-admin-root"] header #logo::after {
    content: "\f3ed";
    font-family: 'Font Awesome 5 Pro';
    display: block;
    font-size: 1em;
    padding-left: 5px;
}

body[class*="page-admin-root"] header #logo img{
    display: none;
    /*width: 70px;*/
}

body[class*="page-admin-root"] header #language-switcher a {
    font-size: 0.8em;
    border-radius: 0;
    border: 1px solid #ffffff20;
    padding: 0.2em 1em;
}

/******************************************************************************
Buttons
 */

button {
    /* Disable double-tap to zoom on buttons in iOS */
    /* https://stackoverflow.com/a/47131647/945257 */
    touch-action: manipulation;
}

.btn {
    padding: 10px 30px;
    font-weight: 600;
    font-size: 1.5rem;
    color: white;
}

.btn-sm {
    font-size: 1rem;
}

.btn-fullwidth {
    width: 100%;
}

.btn-red {
    background-color: var(--color-red);
}
.btn-green {
    background-color: var(--color-green);
}
.btn-yellow {
    background-color: var(--color-yellow);
}
.btn-blue {
    background-color: var(--color-blue);
}
.btn-gray {
    background-color: var(--color-gray);
}
.btn-darkblue {
    background-color: var(--color-darkblue);
}

.btn-dummy-visitor {
    padding-left: 2em;
    text-align: left;
}

.btn:disabled {
    background-color: var(--color-gray);
    border-color: #888;
    color: #eee;
}

.btn:hover {
    background-color: var(--color-hover);
    color: white;
}

.btn:focus {
    outline: 0;
    box-shadow: inset 0 0 0 .25rem rgba(255, 255, 255, .25);
}

.btn.btn-dummy,
.btn.btn-dummy:disabled {
    background-color: var(--color-silver);
    border-color: var(--border-silver);
    color: black;
    opacity: 1;
    cursor: default;
}

.btn.btn-dummy:hover {
    background-color: var(--color-silver);
}

.input-group-append .btn {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    padding: 0 10px;
    height: 100%;
}

.input-group-prepend .btn {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    padding: 0 10px;
    height: 100%;
}

#return-button,
#qr-checkin-done,
#qr-checkin-failed {
    display: none;
}

.icon-right>i.fa,
.icon-right>i.far,
.icon-right>i.fal,
.icon-right>i.fas {
    margin-left: 10px;
}

.icon-left>i.fa {
    margin-right: 10px;
}

.icon-actionable {
    cursor: pointer;
}

.mini-button {
    background-color: var(--bg-gray);
    font-size: 0.8rem;
    padding: 0.1em 0.5em 0.2em;
    color: black;
    text-decoration: none;
    border-radius: 4px;
    border: 1px solid var(--border-gray);
    margin-right: 0.5em;
}

.mini-button:hover,
.mini-button:focus {
    background-color: var(--color-hover);
    color: white;
}

.always-icon {
    min-width: 46px;
}

.only-icon {
    width: 46px;
}

body:not(.role-root) .root-button {
    /* Dangerous practice to hide it. Maybe make it stand out instead? */
    /*display: none;*/
}

.root-button {
    position: relative;
}

.root-button::before {
    content: "\f3ed";
    position: absolute;
    top: 2px;
    right: 3px;
    font-family: 'Font Awesome 5 Pro';
    font-size: 10px;
    color: white;
    text-align: center;
}

button#add-printer-button {
    position: relative;
}

/******************************************************************************
Form controls
 */

.form-control::placeholder {
    color: #999;
}

.form-control:focus::placeholder {
    color: #eee;
}

.form-control:disabled, .form-control[readonly] {
    background-color: #f0f4f8;
    color: #999;
}

input.error {
    border: 1px solid var(--color-red);
    box-shadow: 0 0 0 0.25rem #C7766E66;
    outline: 0;
}

#person-combobox {
    position: relative;
}

#person-combobox i {
    font-size: 27px;
}

#show-all {
    position: absolute;
    top: 5px;
    right: 10px;
}

#show-all i{
    color: var(--color-blue);
}

/*.innercontainer*/ .form-label,
/*.innercontainer*/ .form-check label,
.form-control {
    font-weight: 400;
}

.form-group label,
.form-check label {
    /*font-weight: 500;*/
}

/******************************************************************************
Various boxes
 */

.ok-to-save {
    background-color: #edf5f3ee; /*#6db1a120;*/
    border-radius: 5px;
    padding: 1em 2em;
    margin-top: 2em;
    border: 1px solid #6db1a140;
}

.disclosure {
    background-color: #00000010;
    border-radius: 5px;
    padding: 1em 2em;
    border: 1px solid #00000020;
}

.disclosure .content {
    margin-top: 1em;
    border-top: 1px solid #00000020;
    padding-top: 1em;
}

.clickable {
    cursor: pointer;
}

#checkin-message {
    text-align: center;
    margin-bottom: 1em;
}


/******************************************************************************
The banner/alert box
 */

#alert-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 100vw;
    background-color: #ffffffcc;
    z-index: 2;
}

.alert {
    /* Don't hide! It is used for styling boxes. */
    text-align: center;
}

.alert.show {
    display: block;
}

.alert-info {
    color: black;
    background-color: var(--bg-blue-flat);
    border-color: var(--border-blue);
}

.alert-danger {
    background-color: var(--bg-red-flat);
    border-color: var(--border-red);
}

.alert-success {
    background-color: var(--bg-green-flat);
    border-color: var(--border-green);
}

#banner:not(.alert) {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--color-red);
    color: white;
    padding: 1em 2em;
    text-align: center;
}

#banner.error {
    background-color: var(--color-red);
}
#banner.success {
    background-color: var(--color-green);
}
#banner.notice,
#banner.warning {
    background-color: var(--color-yellow);
}
#banner.info,
#banner.message {
    background-color: var(--color-blue);
}

#banner.center {

}

/******************************************************************************
The numeric keypad
 */

table.numpad {
    margin: 0 auto;
}

table.numpad button {
    width: 90px;
    height: 60px;
    margin: 3px;
    padding: 0;
    color: white;
}

body.role-qr table.numpad {
    display: none;
}

/******************************************************************************
The countdown timer on buttons
 */

.countdown-container {
    min-width: 44px;
    display: inline-flex;
    background-color: white;
    border-radius: 12px;
    color: var(--color-blue);
    justify-content: space-between;
    align-items: center;
    padding: 0 6px;
    margin-right: 10px;
}

#countdown {
    font-weight: 600;
}


/******************************************************************************
The indicator showing that code scanning is active
 */

#scanner-on {
    position: fixed;
    bottom: 3px;
    right: 4px;
}

#scanner-on {
    background: linear-gradient(
        to right,
        var(--color-blue) 30%,
        var(--bg-blue) 50%,
        var(--color-blue) 70%
    );
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-fill-color: transparent;
    background-size: 500% auto;
    animation: scannerOnAnimation 5s ease-in-out infinite alternate;
}

@keyframes scannerOnAnimation {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 100% 50%;
    }
}