/*
 * Perepesa teema – LAHE logo sisselogimislehel
 *
 * See fail on perepesa-theme.css laiendus ja peab olema laaditud pärast
 * põhiteemat. Reeglid on piiratud ainult body.has-lahe-brand lehega.
 */

/* Sisselogimisala ühine paigutus */
body.has-lahe-brand #content > .w3-main > .login-layout {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(48px, 7vw, 108px);
    width: min(1120px, calc(100% - 40px));
    min-height: calc(100vh - 235px);
    margin: 0 auto;
    padding: clamp(42px, 8vh, 92px) 20px 72px !important;
}

/* Olemasoleva Perepesa teema dekoratiivne vasaku veeru pseudo-element
   asendatakse sellel lehel päris LAHE logoga. */
body.has-lahe-brand .login-brand-column::before {
    content: none !important;
    display: none !important;
}

body.has-lahe-brand .login-brand-column {
    display: flex;
    flex: 0 1 420px;
    align-items: center;
    justify-content: flex-end;
    width: auto !important;
    min-height: 0 !important;
    padding: 0;
    float: none;
}

/* LAHE brändiala. Vertikaalne joon seob logo vormiga, kuid hoiab
   mõlemad visuaalselt eraldi ja jätab lehe õhuliseks. */
body.has-lahe-brand .lahe-login-brand {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    width: min(390px, 100%);
    min-height: 300px;
    padding: 26px clamp(42px, 5vw, 76px) 26px 0;
    border-right: 1px solid rgba(0, 163, 213, 0.22);
}

body.has-lahe-brand .lahe-login-brand img {
    display: block;
    width: min(300px, 100%);
    height: auto;
    max-height: 300px;
    object-fit: contain;
}

body.has-lahe-brand .login-form-column {
    flex: 0 0 400px;
    width: 400px !important;
    max-width: 100%;
    padding: 0;
    float: none;
}

/* Väiksematel ekraanidel liigub logo vormi kohale. */
@media (max-width: 820px) {
    body.has-lahe-brand #content > .w3-main > .login-layout {
        flex-direction: column;
        gap: 26px;
        width: min(520px, calc(100% - 28px));
        min-height: auto;
        padding: 38px 14px 86px !important;
    }

    body.has-lahe-brand .login-brand-column,
    body.has-lahe-brand .login-form-column {
        flex: 0 1 auto;
        width: 100% !important;
    }

    body.has-lahe-brand .login-brand-column {
        justify-content: center;
    }

    body.has-lahe-brand .lahe-login-brand {
        width: min(330px, 100%);
        min-height: 0;
        padding: 0 20px 26px;
        border-right: 0;
        border-bottom: 1px solid rgba(0, 163, 213, 0.22);
    }

    body.has-lahe-brand .lahe-login-brand img {
        width: min(220px, 78vw);
        max-height: 220px;
    }
}

@media (max-width: 480px) {
    body.has-lahe-brand #content > .w3-main > .login-layout {
        padding-top: 26px !important;
    }

    body.has-lahe-brand .lahe-login-brand {
        padding-bottom: 20px;
    }

    body.has-lahe-brand .lahe-login-brand img {
        width: min(180px, 70vw);
    }
}
