@font-face {
    font-family: Router-Book;
    src: url("../font/Router-Book.woff") format("woff");
}

@font-face {
    font-family: Doko-Bold;
    src: url("../font/Doko-Bold.woff") format("woff");
}

body {
    border-left: 12px solid #ec656a;
    font-family: Router-Book, sans-serif;
}

h1, h2, h5 {
    font-family: Doko-Bold, serif;
}

hr {
    border: none;
    border-top: 2px dotted #ec656a;
    background-color: transparent;
    opacity: 1;
}

a {
    color: #31acf0;
    text-decoration: none;
}

.card {
    isolation: isolate;
}

.card-header, .card {
    border: none;
    background-color: transparent;
}

.card-header {
    padding-bottom: 0;
    padding-left: 0;
}

.card-header-tabs {
    margin-left: 0;
    margin-bottom: 0;
    gap: 15px;
}

.card-body {
    background-color: white;
    box-shadow: 0 0 20px lightgray;
    border-radius: 0 10px 10px 10px;
    /* this needed to display the shadow of the panel over the inactive tabs */
    z-index: 1;
}

.nav-item {
    border-radius: 10px 10px 0 0;
    background-color: #f4f4f4;
    padding: 16px 30px;
    font-family: serif;
    font-weight: bold;
}

.nav-item-shadow {
    border-radius: 10px 10px 0 0;
    box-shadow: 0 0 20px lightgray;
}

.nav-tabs .nav-link {
    border: none;
    color: black;
    padding: 16px 30px;
    font-weight: bold;
    font-family: Doko-Bold, serif;
    position: relative; /* we need this for the z-index */
    z-index: 1; /* this is needed, so the buttons in the tab can cover icon above (effectively part of the icon is clickable) */
}

.nav-tabs .nav-item {
    position: relative;
    padding: 0;
}

.nav-item.active {
    box-shadow: 0 0 20px lightgray;
    background-color: white;
    /* -80px because the shadow is 20px, and the offset of the icon is 60px */
    clip-path: inset(-80px -20px 0px -20px);
    /* this needed to cover the shadow of the panel body */
    z-index: 2;
}

.nav-item.active div {
    isolation: isolate;
    position: relative;
    z-index: 2;
}

.nav-item.active a {
    isolation: auto;
}

.nav-tabs .icon {
    outline: none;
    background-color: transparent;
    border: none;
    height: 70px;
    width: 70px;
    position: absolute;
    margin: 10px auto;
    background-position: center;
    background-repeat: no-repeat;
    left: 0;
    right: 0;
    top: -60px;
}

#login-licencekey .icon {
    cursor:pointer;
}

#lmv-username-password-form .icon {
    background-image: url('../img/login-icon-classic-inactive.png');
}

#lmv-username-password-form.active .icon {
    background-image: url('../img/login-icon-classic-active.png');
}

#qr-code-form .icon {
    background-image: url('../img/login-icon-simplified-inactive.png');
}

#qr-code-form.active .icon {
    background-image: url('../img/login-icon-simplified-active.png');
}

#login-licencekey .icon {
    background-image: url('../img/login-icon-licencekey-inactive.png');
    display: inline-block; /* the icon has a fix size, and that can be only applied on inline-block, or block */
}

#login-licencekey.active .icon {
    background-image: url('../img/login-icon-licencekey-active.png');
}

#sidebar {
    background-image: url('../img/logo.png'), url('../img/primarschule.png');
    background-repeat: no-repeat;
    background-position: 60px 30px, center calc(100% - 30px);
    background-color: #afdff9;
    /* it makes the sidebar enough big for the picture */
    min-height: 870px;
}

#content {
    background-image: url('../img/zukunftslinie.png');
    background-position: -100px 30px;
    background-repeat: no-repeat;
    min-height: calc(100vh - 285px);
}

#login-form-decoration-image img {
    max-width: 95%;
}

#form {
    background-color: #f4f4f4;
}

.form-control {
    border-radius: 20px;
}

button.form-control:focus {
    background-color: #afdff9;
}

.btn {
    background-color: #afdff9;
}

.normal-login-btn {
    width: 250px;
    height: 40px;
}

.horizontal-center {
    display: flex;
    justify-content: center;
}

img.kits {
    height: 30px;
    margin-top: -5px;
    margin-left: -10px;
}

a.kits {
    width: 250px;
    height: 40px;
    display: inline-block;
    line-height: 40px;
    border-radius: 20px;
    padding: 0 20px;
    border: solid 1px #31acf0;
    font-size: min(2.5vw, var(--bs-body-font-size));
    white-space: nowrap;
    color: #31acf0;
}

img.edulog {
    height: 20px;
    margin-top: -5px;
    margin-left: -10px;
}

a.edulog {
    width: 250px;
    height: 40px;
    display: inline-block;
    line-height: 40px;
    border-radius: 20px;
    padding: 0 20px;
    border: solid 1px #32e0a2;
    font-size: min(2.5vw, var(--bs-body-font-size));
    white-space: nowrap;
    color: #32e0a2;
}

img.switch {
  height: 30px;
  margin-top: -5px;
  margin-left: -10px;
}

a.switch {
    width: 250px;
    height: 40px;
    display: inline-block;
    line-height: 40px;
    border-radius: 20px;
    padding: 0 20px;
    border: solid 1px #dc9e4a;
    font-size: min(2.5vw, var(--bs-body-font-size));
    white-space: nowrap;
    color: #060b2e;
}

img.microsoft {
    height: 27px;
    margin-top: -5px;
    margin-left: -10px;
}

a.microsoft {
    width: 250px;
    height: 40px;
    display: inline-block;
    line-height: 40px;
    border-radius: 20px;
    padding: 0 20px;
    border: solid 1px #737373;
    font-size: min(2.5vw, var(--bs-body-font-size));
    white-space: nowrap;
    color: #737373;
}

.btn-secondary {
    border: solid 1px #31acf0;
    color: #31acf0;
    background-color: white;
}

.simplified-login form {
    background: url('../img/corner-bottom-left.png') bottom left, url('../img/corner-bottom-right.png') bottom right, url('../img/corner-top-left.png') top left, url('../img/corner-top-right.png') top right;
    background-repeat: no-repeat;
}

.modal {
    display: block;
}

.modal-dialog {
    max-width: min-content;
}

.modal-content {
    width: auto;
}

.avatar-grid {
    display: grid;
    grid-template-columns: repeat(4, 150px);
    column-gap: 30px;
    row-gap: 30px;
}

.avatar-grid button {
    border: solid 1px #31acf0;
    padding: 0;
    width: 150px;
    height: 150px;
}

.modal-header {
    border-bottom: none;
}

.modal-header .btn-close {
    position: absolute;
    top: -0.5rem;
    right: -0.5rem;
    opacity: 1;
    background: url('../img/close.png') no-repeat;
}

footer .row {
    background-color: #202020;
}

#footer-logo {
    background-image: url('../img/logo-white.png');
    background-repeat: no-repeat;
    background-position: 60px 30px, center calc(100% - 30px);
}

footer .row {
    padding-top: 30px;
}

footer li {
    line-height: 3;
}

footer a {
    color: white;
}

#avatar-refresh {
    width: 32px;
    height: 32px;
    position: absolute;
    top: 10px;
    right: 50px;
}

#avatar-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    padding: 0;
}

.invalid-avatar {
    background-color: #ec656a;
    color: white;

    #avatar-close {
        filter:
                drop-shadow(-1px -1px 0 white)
        drop-shadow(1px -1px 0 white)
        drop-shadow(-1px 1px 0 white)
        drop-shadow(1px 1px 0 white);
    }
}

#selected-avatar {
    box-shadow: 0 0 15px 0 rgba(0, 0, 0, 0.5);
    border: solid 1px #31acf0;
}

#selected-avatar-decoration {
    width: 300px;
    height: 300px;
}

#avatar-popup-decoration {
    width: 150px;
    height: 150px;
}

.error .nav-item.active,
.error .card-body
{
    border: 5px solid #ec656a;
    border-radius: 10px;
}


div.error-message {
    background-color: #ec656a;
    font-family: Doko-Bold, serif;
    color: white;
}

/* phones */
@media (max-width: 767.98px) {
    #text, #login-form-decoration-image {
        width: 50%;
    }

    #form {
        width: 100%;
    }

    .nav-item {
        width: 70px;
        padding: 0 !important;
    }

    .nav-tabs .icon {
        position: static !important;
    }

    .avatar-grid {
        grid-template-columns: repeat(3, 150px) !important;
    }
}

/* tablet */
@media (max-width: 991px) {
    .avatar-grid {
        grid-template-columns: repeat(4, 150px);
    }
}

/* tables and desktop */
@media (min-width: 768px) {
    #text {
        width: 100%;
    }

    #login-form-decoration-image, #form {
        width: 50%;
    }
}
