﻿html, body {
    overflow: hidden;
}

.login {

}

.form {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow-y: auto;

    & header {
        flex-shrink: 0;
    }

    & main  {
        flex-grow: 1;
        max-width: 520px;
        width: 100%;
        margin: 0 auto;
        display: flex;
        align-items: center;
    }

    & footer {
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-shrink: 0;
        color: var(--gray-600);
    }

    & .mail-block {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 12px;
    }
}


.card {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 100%;
    height: 100vh;
    font-family: var(--font-family-base);
    overflow: visible;
    border: none;
    border-radius: var(--radius-md);
    border-end-end-radius: 0;
    border-start-end-radius: 0;
}

.bg__fon-v1 {
    background: image-set(
        url("/images/fonHouse1@x3.webp") type("image/webp") 3x,
        url("/images/fonHouse1@x2.webp") type("image/webp") 2x,
        url("/images/fonHouse1@x1.webp") type("image/webp") 1x
      ) center/cover no-repeat;
}

.bg__fon-v2 {
    background: image-set(
        url("/images/fonHouse2@x3.webp") type("image/webp") 3x,
        url("/images/fonHouse2@x2.webp") type("image/webp") 2x,
        url("/images/fonHouse2@x1.webp") type("image/webp") 1x
      ) center/cover no-repeat;
}

.bg__fon-v3 {
    background: image-set(
        url("/images/fonHouse3@x3.webp") type("image/webp") 3x,
        url("/images/fonHouse3@x2.webp") type("image/webp") 2x,
        url("/images/fonHouse3@x1.webp") type("image/webp") 1x
      ) center/cover no-repeat;
}

.bg__fon-v4 {
    background: image-set(
        url("/images/fonHouse4@x3.webp") type("image/webp") 3x,
        url("/images/fonHouse4@x2.webp") type("image/webp") 2x,
        url("/images/fonHouse4@x1.webp") type("image/webp") 1x
      ) center/cover no-repeat;
}


.bg__fon-v5 {
    background: image-set(
        url("/images/fonHouse5@x3.webp") type("image/webp") 3x,
        url("/images/fonHouse5@x2.webp") type("image/webp") 2x,
        url("/images/fonHouse5@x1.webp") type("image/webp") 1x
      ) center/cover no-repeat;
}

.bg__fon-v6 {
    background: image-set(
        url("/images/fonHouse6@x3.webp") type("image/webp") 3x,
        url("/images/fonHouse6@x2.webp") type("image/webp") 2x,
        url("/images/fonHouse6@x1.webp") type("image/webp") 1x
      ) center/cover no-repeat;
}

.bg__fon-v7 {
    background: image-set(
        url("/images/fonHouse7@x3.webp") type("image/webp") 3x,
        url("/images/fonHouse7@x2.webp") type("image/webp") 2x,
        url("/images/fonHouse7@x1.webp") type("image/webp") 1x
      ) center/cover no-repeat;
}

.card::after {
    content: "";
    position: absolute;
    height: 100vh;
    width: 100vw;
    background: linear-gradient(rgb(1 13 23 / 0%), rgb(0 5 13 / 30%));
    border-radius: var(--radius-md);
    border-end-end-radius: 0;
    border-start-end-radius: 0;
}

.card__header {
    display: flex;
    justify-content: flex-end;
    padding: 32px 32px 0 32px;
    z-index: 1;
}

.card-content {
    display: grid;
    gap: 20px;
    height: 58vh;
    padding: 4rem;
    /*padding-top: 2rem;*/
    /*padding-bottom: 2rem;*/
    color: var(--white);
    z-index: 2;
}

.tile-overlay {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
    /* Vertical fade is now rendered inside the canvas (see eLoginAnimation.js). */
}

.tile-overlay canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.title-arrow-wrapper {
    position: relative;
    overflow: visible;

    & h1 {
        overflow: visible;
    }

    &.black h2 {
        color: var(--gray-900);
    }

    &.black p {
    }
}

.animation__arrow-wrapper {
    position: absolute;
    bottom: -60px;
    left: -280px;
    z-index: 1001;
}

body > :has(~ .show__panel--block-help.open) .animation__arrow-wrapper {
    display: none;
}

.eUI .show__panel--block-help {
    position: fixed;
    inset: 0 0 0 auto;
    max-width: 50%;
    width: auto;
    min-width: 50%;
    height: 100vh;
    overflow: hidden;
    transform: translate(100%);
    transition: transform .4s ease;
    z-index: 11;
}

.eUI .show__panel--block-help.open {
    transform: translateX(0);
}

.help__body {
    height: calc(100svh - 80px);
    overflow: auto;
}

.card-help-inline {
    position: absolute;
    inset: 0;
    overflow-y: auto;
    padding: var(--spacing-3xl, 32px);
    background: var(--base-white, #fff);
    color: var(--gray-900, #101828);
    z-index: 5;
}

.border__step {
    border-radius: 50%;
    background: var(--brand-400);
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: var(--letter-spacing-display);
    font-family: var(--font-family-base);
    font-weight: var(--font-weight-bold);
    color: var(--gray-50);
}

.border__icon-label {
    border-radius: 50%;
    background: var(--brand-100);
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-600);
}

.card-secure {
    --colorBase: var(--success-500);
    --colorSecondary: var(--gray-dark-700);

    border-radius: var(--cardBR, var(--spacing-sm));
    background: var(--cardBG, var(--gray-100));
    width: auto;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-style: solid;
    border-width: var(--cardBW, 1px);
    border-color: var(--cardBC, var(--success-100));
    color: var(--cardC, var(--colorBase));
    padding: var(--cardP, var(--spacing-lg));
    gap: var(--cardG, var(--spacing-xs));

    & h6 {
        color: var(--colorBase);
    }

    & p {
        color: var(--colorSecondary);
    }
}

@media( max-width: 1280px ) {
    .form {
        height: 100vh;
    }

    .card {
        display: none;
    }
}

/* === Old-portal migration banners === */

.migration-banner {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-lg);
    padding: var(--spacing-xl);

    & .migration-banner__icon {
        flex-shrink: 0;
        width: 24px;
        height: 24px;
    }

    & .migration-banner__body {
        flex-grow: 1;
    }

    & .migration-banner__title {
        font-weight: var(--font-weight-semibold);
        margin: 0;
    }

    & .migration-banner__text {
        font-size: var(--font-size-text-sm);
        margin: var(--spacing-xs) 0 0;

        & a {
            color: var(--brand-600);
            text-decoration: underline;
        }
    }

    & .migration-banner__close {
        flex-shrink: 0;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0;
        margin-left: auto;

        & img {
            width: 18px;
            height: 18px;
            display: block;
        }
    }
}

.migration-banner--info {
    width: 100%;
    background: #EFF4FF;
    border-bottom: 1px solid #D1E0FF;

    & .migration-banner__title {
        color: var(--gray-900);
    }

    & .migration-banner__text {
        color: var(--gray-600);

        /* The info banner is intentionally a fixed blue, independent of the per-tenant
           --brand accent, so its link must not inherit the brand color used elsewhere. */
        & a {
            color: #1849A9;
        }
    }
}

.migration-banner--warning {
    border-radius: var(--radius-md);
    background: var(--warning-100);
    border: 1px solid #FEDF89;
    margin-bottom: var(--spacing-2xl);

    & .migration-banner__title {
        color: var(--warning-900);
    }

    & .migration-banner__text {
        color: var(--warning-700);
    }
}

/* Reflow only kicks in when a redirect banner is present; normal login is untouched. */
body.has-migration-banner {
    display: flex;
    flex-direction: column;
    height: 100%;
}

body.has-migration-banner > .migration-banner--info {
    flex: 0 0 auto;
}

body.has-migration-banner > #login {
    flex: 1 1 auto;
    min-height: 0;
}

body.has-migration-banner .form,
body.has-migration-banner .card {
    height: 100%;
}
