@layer legacy {
    .wrapper {
        position: fixed;
        top: 0;
        bottom: 0;
        right: 0;
        left: 0;
        display: grid;

        grid-template-columns: 350px 1fr;
        grid-template-rows: 100%;
        column-gap: 1rem;
        padding: 1rem;

        background-color: var(--background-secondary);
    }

    .sidebar {
        display: grid;
        grid-template-rows: 7rem 1fr auto;
        padding: 2rem;
        box-sizing: border-box;

        border-radius: var(--border-radius-large);
        overflow: hidden;
        background-color: var(--background-main);
    }


    .form-column {
        display: flex;
        flex-direction: column;
    }

    .form-column label {
        margin-top: 1rem;
    }

    .top-auto {
        margin-top: auto;
    }


    .loginPanel {
        flex: 1;
        margin-bottom: 2rem;
    }

    #login-Button-panel {
        display: grid;
        grid-template-columns: 1fr auto;
        align-items: end;
    }

    #login-message {
        color: red;
        margin-bottom: 0.75rem;
    }

    #loginButton {
        justify-self: end;
    }

    .footerPanel {
        display: grid;
        grid-template-columns: 2rem 1fr;
        grid-gap: 1.2rem;

        margin-top: 1rem;
        align-items: center;
    }

    .impressumPanel {
        display: grid;
        grid-template-columns: auto 1fr;
        grid-gap: 1.5rem;
        height: 2rem;
        align-items: center;
    }

    .impressumPanel a {
        max-width: fit-content;
    }


    main {
        position: relative;
        display: block;
        width: auto;
    }


    .textPanel {
        position: relative;
        flex-grow: 1;
        padding-left: .5rem;
        padding-right: .5rem;
        overflow: hidden;
        overflow-y: auto;
        scrollbar-width: 7px;
    }

    .text-panel-content {
        direction: rtl;
    }

    .textPanel::-webkit-scrollbar {
        width: 7px;
    }

    .textPanel::-webkit-scrollbar-track {
        background: rgba(0, 0, 0, 0);
    }

    .textPanel::-webkit-scrollbar-thumb {
        background: #cbcbcb;
        border-radius: 5px;
    }

    .textPanel::-webkit-scrollbar-thumb:hover {
        background: #555;
    }

    .page {
        display: block;
        direction: ltr;
    }

    .headerLine {
        text-align: center;
        margin-bottom: 3rem;
    }


    .backgroundImageContainer {
        position: relative;
        width: 100%;
        height: 100%;
        z-index: 0;
        overflow: hidden;
    }

    .image_preview_container {
        position: relative;
        width: 100%;
        height: 100%;
        /* opacity: 0.5; */
        /* background: var(--background-main); */
        border-radius: var(--border-radius-large);
        margin: 0 auto;
        display: flex;
        justify-content: center;
        align-items: center;
        object-fit: cover;
    }

    .video-credits {
        position: absolute;
        z-index: 1;
        bottom: 1rem;
        right: 3rem;

    }

    @media (max-width: 800px) {
        .wrapper {
            display: grid;
            grid-template-columns: 100%;
            overflow-y: auto;
        }

        main {
            display: none;
        }

        aside {
            padding: 10vmin;
        }

        main {
            padding: 10vmin 10vmin 50vmin;
        }
    }


    @media only screen
    and (min-device-width: 320px)
    and (max-device-width: 480px)
    and (-webkit-min-device-pixel-ratio: 2)
    and (orientation: portrait) {

        main {
            display: none;
        }

        .footerPanel {
            position: absolute;
            bottom: 5%;
            grid-gap: 2rem;
        }

        .image_preview_container {
            display: none;
        }

        .backgroundImageContainer {
            display: none;
        }
    }
}
