:root {
    --main-nav-width: 64px;
    --top-alerts-height: 0px;
}

    :root:has(.main-nav.open) {
        --main-nav-width: 200px;
    }

    :root:has(.change-prompt) {
        --top-alerts-height: 36px;
    }

html {
    height: 100%;

    /* pull to refresh vermeiden */
    overflow: hidden;
    overscroll-behavior: none;
}

body {
    height: 100%;
    font-family: expo-brand-demi,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";
}

html, body {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: #D7D7D7;
    border: 5.75px solid transparent;
    background-clip: padding-box;
    border-radius: 8px;
}

::-webkit-scrollbar-thumb {
    background: #2e50a8;
    border: 4px solid transparent;
    background-clip: padding-box;
    border-radius: 8px;
    transition: background 250ms;
}

    ::-webkit-scrollbar-thumb:hover {
        background: #3b67d9;
        border: 4px solid transparent;
        background-clip: padding-box;
        border-radius: 8px;
    }

#app {
    height: 100%;
    display: flex;
    flex-direction: column;
}

valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

.fullscreen-popup {
    max-width: 600px;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA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2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.loading-panal {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    font-family: Arial, sans-serif;
}

.loading-logo {
    width: 300px;
    height: auto;
    margin-bottom: 1rem;
}

.loading-progress-container {
    width: 80%;
    max-width: 400px;
    height: 1.5rem;
    background-color: #e0e0e0;
    border-radius: 0.75rem;
    overflow: hidden;
    margin-bottom: 1rem;
    position: relative;
}

.loading-progress-bar {
    height: 100%;
    background-color: #1b6ec2;
    width: var(--blazor-load-percentage, 0%);
/*    transition: width 1s ease-in-out;*/
    border-radius: 0.75rem;
}

.loading-progress-text {
    font-size: 1rem;
    font-weight: bold;
    color: #333;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading...");
    }

code {
    color: #c02d76;
}

.infobox {
    border: 0;
    min-height: 70px;
    margin: 0px;
    padding: 10px;
    padding-left: 80px;
    border-radius: 7px;
    background-color: #ebffef;
    background-image: url(/images/Icons/info-circle.svg);
    background-repeat: no-repeat;
    background-size: 48px;
    background-position: center;
    background-position-x: 16px;
    background-position-y: 50%;
    display: flex;
    justify-content: center;
    flex-direction: column;
}

.infobox-warning {
    background-color: #f9edc6;
    background-image: url(/images/Icons/exclamation-circle.svg);
}

.infobox-error {
    background-color: #ff948c;
    background-image: url(/images/Icons/exclamation-circle.svg);
}

.infobox p {
    margin-bottom: 5px;
}

    .infobox p:last-child {
        margin-bottom: 0;
    }

.login-container {
    display: flex;
    height: 100%;
    justify-content: center;
    align-items: center;
}

.login-container > div {
    max-width: 500px;
    padding-bottom: 150px;
}

.main-container {
    flex: 1 auto;
    display: flex;
    height: calc(100vh - 60px);
    overflow: hidden;
    background-color: #2e50a8;
}

.main-content {
    background-color: white;
    border-radius: 10px 10px 0px 10px;
    overflow-y: auto;
    position: relative;
    flex: 1;
    padding: 20px;
}

.change-prompt {
    font-size: 11px;
    background-color: #ff5757;
    color: white;
    padding: 10px;
    display: flex;
    align-content: center;
    gap: 10px;
}

    .change-prompt.upload {
        background-color: green;
    }

.subpage-overlay {
    position: fixed;
    top: calc(60px + var(--top-alerts-height));
    right: 0;
    left: var(--main-nav-width);
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2;
    background-color: white;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: left 0.15s;
}

.subpage-title {
    padding: 12px;
    border-width: 0 0 1px 0;
    border-style: solid;
    border-color: #C2CDD6;
    background-color: #fafafa;
}

.subpage-content {
    padding: 20px;
    overflow: auto;
    position: relative;
    flex: 1 1 auto;
}

.subpage-footer {
    padding: 12px;
    display: flex;
    gap: 7px;
    justify-content: flex-end;
}


.topbar {
    background-color: #2e50a8;
    height: 60px;
    display: flex;
    align-items: center;
}

.topbar-content {
    box-sizing: border-box;
    flex-grow: 1;
    padding: 8px;
    overflow: hidden;
}

/* Shared Styles for Navigation */
.main-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #2e50a8;
    padding: 20px 10px;
}

    .main-nav > hr {
        width: 100%;
        border: none;
        height: 1px;
        background-color: rgba(255, 255, 255, 0.3);
        margin: 0px 5px;
    }

.hamburger {
    flex-direction: column;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 10px;
    transition: margin-right 0.15s;
}

.nav-button {
    display: flex;
    align-items: center;
    /*justify-content: center;*/
    margin: 10px 0;
    padding: 10px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    text-align: center;
    width: 100%;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.3s, transform 0.2s;
}

    .nav-button:hover {
        background-color: #1e3b85;
        color: white;
    }

    .nav-button:active {
        transform: scale(0.95);
    }

    .nav-button img {
        width: 24px;
        height: 24px;
        margin-right: 0;
    }

    .nav-button span {
        display: none;
    }

    .nav-button.selected {
        background-color: white;
    }

        .nav-button.selected img {
            filter: none;
        }

.nav-footer {
    height: 60px;
    width: 100%;
    margin-top: auto;
}

    .nav-footer img {
        height: 40px;
        width: 100%;
    }

.home-container {
    text-align: center;
    max-width: 700px;
    margin: auto;
}

    .home-container > h1 {
        font-size: 1.5em;
        color: #244a9a;
        font-family: Open Sans, sans-serif;
    }

    .home-container > hr {
        margin-top: 40px;
        margin-bottom: 40px;
    }

.home-logo {
    height: 75px;
    width: 100%;
    object-fit: contain;
}

.selected-zaehlergruppe-row {
    background-color: #6da2f7 !important;
}

.createzaehler-mainform .k-form-legend {
    margin-bottom: 5px !important;
}

.createzaehler-mainform .k-form-field {
    margin-top: 5px !important;
}

.createzaehler-mainform .k-form-fieldset {
    background: #f3f2f2;
    padding: 10px !important;
    border-radius: 5px;
    margin: 1em 0 0 !important;
}

/* Layout for Mobile View */
@media (max-width: 767px) {
    .topbar {
        display: block;
        padding: 0 10px;
    }

    .main-nav {
        box-sizing: border-box;
        flex-direction: row;
        width: 100%;
        height: 60px;
        border-right: none;
        position: fixed;
        bottom: 0;
        left: 0;
        padding: 0px 20px;
        transition: none;
    }

    .nav-button {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        width: 33%;
        margin: 0px 10px;
    }

    .main-content {
        background-color: white;
        border-radius: 10px 10px 10px 10px;
        margin-bottom: 60px;
    }

    .nav-footer,
    .hamburger,
    .main-nav > hr {
        display: none;
    }

    .subpage-overlay {
        bottom: 60px;
    }

    :root {
        --main-nav-width: 0px;
    }
}

/* Layout for Desktop View */
@media (min-width: 768px) {
    .main-nav {
        flex-direction: column;
        transition: width 0.15s;
        width: 64px;
    }

        .main-nav.open {
            width: 200px;
        }

            .main-nav.open .nav-button {
                justify-content: start;
            }

                .main-nav.open .nav-button span {
                    display: inline; /* Show text */
                    margin-left: 10px;
                    color: white;
                }

                .main-nav.open .nav-button.selected span {
                    color: black;
                }

    .topbar.open .hamburger {
        margin-right: 135px;
    }

    .main-nav.open .logo-sm,
    .main-nav .logo-lg {
        display: none;
    }

    .main-nav.open .logo-lg,
    .main-nav .logo-sm {
        display: block;
    }

    .subpage-overlay {
        bottom: 0px;
    }
}

.nav-button img {
    filter: invert(1);
}

input.k-input-inner:read-only {
    background-color: #f0f0f0;
    color: #999;
    cursor: default;
}

button.html5-qrcode-element,
select.html5-qrcode-element {
    appearance: none;
    background-color: #FAFBFC;
    border: 1px solid rgba(27, 31, 35, 0.15);
    border-radius: 6px;
    box-shadow: rgba(27, 31, 35, 0.04) 0 1px 0, rgba(255, 255, 255, 0.25) 0 1px 0 inset;
    box-sizing: border-box;
    color: #24292E;
    cursor: pointer;
    display: inline-block;
    font-family: -apple-system, system-ui, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    list-style: none;
    padding: 6px 16px;
    position: relative;
    transition: background-color 0.2s cubic-bezier(0.3, 0, 0.5, 1);
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
    vertical-align: middle;
    white-space: nowrap;
    word-wrap: break-word;
    margin-bottom: 5px;
}

    button.html5-qrcode-element:hover,
    select.html5-qrcode-element:hover {
        background-color: #F3F4F6;
        text-decoration: none;
        transition-duration: 0.1s;
    }

    button.html5-qrcode-element:disabled,
    select.html5-qrcode-element:disabled {
        background-color: #FAFBFC;
        border-color: rgba(27, 31, 35, 0.15);
        color: #959DA5;
        cursor: default;
    }

    button.html5-qrcode-element:active,
    select.html5-qrcode-element:active {
        background-color: #EDEFF2;
        box-shadow: rgba(225, 228, 232, 0.2) 0 1px 0 inset;
        transition: none 0s;
    }

    button.html5-qrcode-element:focus,
    select.html5-qrcode-element:focus {
        outline: 1px transparent;
    }

    button.html5-qrcode-element:before,
    select.html5-qrcode-element:before {
        display: none;
    }

    button.html5-qrcode-element:-webkit-details-marker,
    select.html5-qrcode-element:-webkit-details-marker {
        display: none;
    }

/* Torch button. */
button#html5-qrcode-button-torch.html5-qrcode-button-torch-on {
    background-color: #fff000;
    color: #000;
    cursor: pointer;
    font-weight: bold;
    transition: 200ms;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
}

    button#html5-qrcode-button-torch.html5-qrcode-button-torch-on:not(:disabled):hover,
    button#html5-qrcode-button-torch.html5-qrcode-button-torch-on:not(:disabled):focus {
        outline: 0;
        background: #f4e603;
    }

    button#html5-qrcode-button-torch.html5-qrcode-button-torch-on:disabled {
        filter: saturate(0.2) opacity(0.5);
        -webkit-filter: saturate(0.2) opacity(0.5);
        cursor: not-allowed;
    }

.current-zaehler {
    background-color: #6da2f7 !important;
}

.slimm-tabstrip .k-tabstrip-content {
    padding: 0;
    padding-top: 20px;
    border: none;
}

.slimm-tabstrip .k-link {
    padding: 7px 10px !important;
}

