:root {
    --z-container-site: var(--z-container);
}

.z-auth__head {
    flex: 0 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: 100%;
    max-width: var(--z-container-site);
    min-height: calc(var(--z-header) + 1px);
    margin: 0 auto;
    padding: 0 var(--z-gutter);
    border-bottom: 1px solid transparent;
}

.z-auth__brand {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    color: var(--z-text);
}

.z-auth__logo {
    display: var(--z-display-light);
    flex: 0 0 auto;
}

.z-auth__logo--invers {
    display: var(--z-display-dark);
}

.z-auth__logo img {
    display: block;
    height: 30px;
    width: auto;
    margin-left: -5px;
}

.z-auth-footer {
    flex: 0 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--z-s4);
    width: 100%;
    max-width: var(--z-container-site);
    margin: 0 auto;
    padding: clamp(20px, 3vw, 32px) var(--z-gutter);
}

.z-auth-footer__origin {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    font-size: var(--z-label);
    color: var(--z-text-muted);
}

.z-auth-footer__flag {
    display: inline-flex;
    gap: 3px;
    margin-top: calc(var(--z-body-line) * .5em - 1.5px);
    vertical-align: middle;
}

.z-auth-footer__flag i {
    display: block;
    width: 18px;
    height: 3px;
}

.z-auth-footer__flag i:nth-child(1) {
    background: var(--z-flag-black);
}

.z-auth-footer__flag i:nth-child(2) {
    background: var(--z-flag-red);
}

.z-auth-footer__flag i:nth-child(3) {
    background: var(--z-flag-gold);
}

.z-auth-footer__links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 18px;
    row-gap: var(--z-s4);
}

.z-auth-footer__links a {
    font-size: var(--z-label);
    color: var(--z-text-body);
}

.z-auth-footer > .z-auth-footer__links:has(> .z-auth-footer__settings) {
    flex: 1 1 100%;
    padding-top: 22px;
    border-top: 1px solid var(--z-line);
}

.z-auth-footer__settings {
    display: flex;
    flex: 1 1 auto;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--z-s4) var(--z-s6);
}

.z-auth-footer__language {
    display: inline-flex;
    align-items: center;
    gap: var(--z-s2);
}

.z-auth-footer__language-flag {
    display: block;
    flex: 0 0 auto;
    width: 20px;
    height: 12px;
    border-radius: 2px;
    outline: 1px solid var(--z-line);
    outline-offset: -1px;
}

@media (min-width: 641px) {
    .z-auth-footer__language {
        margin-inline-start: auto;
    }
}

@media (max-width: 1100px) {
    .z-auth__head-lead {
        display: none;
    }
}

@media (max-width: 640px) {
    .z-auth-footer > .z-auth-footer__links:has(> .z-auth-footer__settings) {
        min-width: 0;
    }

    .z-auth-footer__settings {
        flex-direction: column;
        align-items: flex-start;
        min-width: 0;
    }

    .z-auth-footer .z-site-footer__setting {
        max-width: 100%;
    }

    .z-auth-footer .z-theme-switch .z-tool-segment__option {
        min-width: 0;
    }
}

@media (hover: hover) {
    .z-auth-footer__links a:hover {
        color: var(--z-accent);
    }
}

@media (pointer: coarse) {
    .z-auth__brand {
        position: relative;
    }

    .z-auth__brand::after {
        content: '';
        position: absolute;
        top: min(0px, calc(50% - 22px));
        right: 0;
        bottom: min(0px, calc(50% - 22px));
        left: 0;
    }

    .z-auth-footer,
    .z-auth-footer__links {
        row-gap: var(--z-s5);
    }

    .z-auth-footer__links a {
        position: relative;
    }

    .z-auth-footer__links a::after {
        content: '';
        position: absolute;
        top: min(0px, calc(50% - 22px));
        right: min(-6px, calc(50% - 22px));
        bottom: min(0px, calc(50% - 22px));
        left: min(-6px, calc(50% - 22px));
    }
}
