:root {
    --loading-text: rgba(0, 0, 0, 0.85);
    --loading-bg: hsl(0, 0%, 100%);
    --loader-line: rgba(42, 52, 67, 0.25);
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
}

[theme='dark'] {
    --loading-text: rgba(255, 255, 255, 0.85);
    --loading-bg: hsl(214, 35%, 21%);
    --loader-line: rgba(236, 239, 244, 0.25);
}

/* @media (prefers-color-scheme: dark) {
    :root {
        --loading-text: rgba(255, 255, 255, 0.85);
        --loading-bg: hsl(214, 35%, 21%);
        --loader-line: rgba(236, 239, 244, 0.25);
    }
} */

html,
body {
    margin: 0;
    padding: 0;
    box-sizing: border-box;

    /* Prevent overscroll/bounce */
    overscroll-behavior-y: none;
}

html * {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    /* font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif; */
    font-family: var(--font-family, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif);
    line-height: 1.5;
}

#preloader,
#preloader > * {
    display: none;
}

#main[unresolved] #preloader,
#main[unresolved] #preloader h1,
#main[unresolved] #preloader .logo,
#main[unresolved] #preloader .preloader-dots {
    display: block;
}

#main[unresolved] #preloader {
    text-align: center;
}

#main[unresolved] {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 1rem;
    height: 100vh;
    line-height: 68px;
    text-align: center;
    font-size: 2rem;
    font-weight: 300;
    color: var(--loading-text);
    background-color: var(--loading-bg);
    overflow: hidden;
}

#main[unresolved] h1,
#main[unresolved] .preloader-title {
    margin: 0 0 1em 0;
    font-weight: 300;
    font-size: 1.25em;
}

#main[unresolved] h1 span {
    display: inline-block;
    font-weight: normal;
}

#main[unresolved] .logo {
    width: auto;
    height: 320px;
    margin: 0 auto;
    fill: var(--logo, rgba(0, 0, 0, 0.75));
}

#main[unresolved] .preloader-dots {
    font-size: 0.75em;
}

@media (orientation: landscape) {
    #main[unresolved] h1 span {
        margin-left: 0.5rem;
        padding-left: 0.5rem;
        border-left: 1px solid var(--loader-line, #fff);
    }
}

@media (orientation: portrait) {
    #main[unresolved] h1 span {
        display: block;
        margin-top: 0.5rem;
        padding-top: 0.5rem;
        border-top: 1px solid var(--loader-line, #fff);
    }
}

@media (max-height: 768px) {
    #main[unresolved] {
        font-size: 2rem;
    }

    #main[unresolved] h1 {
        font-size: 2rem;
    }

    #main[unresolved] .logo {
        height: 260px;
    }
}

@media (max-width: 768px) {
    #main[unresolved] {
        font-size: 2rem;
    }

    #main[unresolved] h1 {
        font-size: 2rem;
    }

    #main[unresolved] .logo {
        height: 260px;
    }
}

vaadin-dialog-overlay, 
vaadin-combo-box-overlay, 
vaadin-select-overlay, 
vaadin-context-menu-overlay { 
    z-index: 10000; 
}
