﻿html, body {
    display: flex;
    margin: 0;
    height: 100%;
}

#app {
    flex: 1;
    overflow-x: hidden;
}

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    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;
}

#loading-screen {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: var(--as-color-background-shell);
    transition: opacity 200ms ease;
    opacity: 1;
    pointer-events: all;

    &.loading-screen-hidden {
        opacity: 0;
        pointer-events: none;
    }

    .loading-wrapper {
        height: 100vh;
        width: 100%;
        display: flex;
        flex-direction: row;
        position: relative;

        .content {
            flex: 1;
            position: relative;
            display: flex;
            justify-content: center;
            align-items: center;
        }

        .authorizing {
            display: flex;
            align-items: center;
            flex-direction: row;
            gap: var(--as-content-spacing-medium);

            .loading-indicator {
                display: flex;
                gap: var(--as-content-spacing-smaller);
                align-items: center;

                span {
                    width: 12px;
                    height: 12px;
                    border-radius: 50%;
                    background: var(--as-color-status-green-primary);
                    animation: loading-bounce 1.4s infinite ease-in-out both;

                    &:nth-child(1) {
                        animation-delay: -0.32s;
                    }

                    &:nth-child(2) {
                        animation-delay: -0.16s;
                    }

                    &:nth-child(3) {
                        animation-delay: 0s;
                    }
                }
            }

            .auth-text {
                font-size: 24px;
            }
        }

        .info-block {
            position: absolute;
            bottom: var(--as-content-spacing-small);
            font-size: var(--as-default-font-size);
            left: 50%;
            transform: translateX(-50%);
        }

        .img-wrapper {
            flex: 1;
            position: relative;
            overflow: hidden;

            .aircraft {
                width: 100%;
                height: 100%;
                object-fit: cover;
                object-position: center;
            }

            .as-logo-trademark {
                position: absolute;
                bottom: var(--as-content-spacing-small);
                right: var(--as-content-spacing-small);
            }
        }

        a {
            font-size: var(--as-default-font-size);
            text-decoration: underline;
            color: var(--as-color-text-primary);
        }

        a:hover {
            color: var(--as-color-text-primary);
        }

        @media (max-width: 1024px) {
            .wrapper {
                flex-direction: column-reverse;
            }

            .content {
                flex: 5;
            }

            .info-block span {
                display: none;
            }
        }
    }
}

@keyframes loading-bounce {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.3;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}