button.afnb-lang-switch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    gap: .42rem;
    min-width: 4.15rem;
    width: auto;
    height: 2.25rem;
    margin: 0;
    padding: 0 .72rem 0 .64rem;
    border: 1px solid #2d96df !important;
    border-radius: 0;
    background: rgba(8, 116, 201, .12) !important;
    color: #dff2ff !important;
    cursor: pointer;
    font: inherit;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .08em;
    line-height: 1;
    clip-path: polygon(7px 0, 100% 0, calc(100% - 7px) 100%, 0 100%);
    transition: color .18s ease, background-color .18s ease, border-color .18s ease;
}

button.afnb-lang-switch:hover,
button.afnb-lang-switch:focus-visible {
    border-color: #69bdf4 !important;
    outline: none;
    background: #0874c9 !important;
    color: #fff !important;
}

.afnb-lang-flag {
    position: relative;
    display: inline-block;
    flex: 0 0 1.35rem;
    width: 1.35rem;
    height: .86rem;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .52);
    border-radius: 1px;
    box-shadow: 0 1px 4px rgba(0, 17, 32, .28);
}

.afnb-lang-code {
    display: inline-block;
    min-width: 1.15rem;
    text-align: center;
}

.afnb-lang-switch[data-afnb-language="es"] .afnb-lang-flag {
    background: linear-gradient(
        to bottom,
        #75aadb 0 33.333%,
        #ffffff 33.333% 66.667%,
        #75aadb 66.667% 100%
    );
}

.afnb-lang-switch[data-afnb-language="es"] .afnb-lang-flag::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: .22rem;
    height: .22rem;
    border-radius: 50%;
    background: #f6b40e;
    box-shadow: 0 0 0 1px rgba(139, 91, 0, .18);
    transform: translate(-50%, -50%);
}

.afnb-lang-switch[data-afnb-language="en"] .afnb-lang-flag {
    background: repeating-linear-gradient(
        to bottom,
        #b22234 0 7.692%,
        #ffffff 7.692% 15.384%
    );
}

.afnb-lang-switch[data-afnb-language="en"] .afnb-lang-flag::before {
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    width: 48%;
    height: 54%;
    background: #3c3b6e;
}

.afnb-lang-switch[data-afnb-language="en"] .afnb-lang-flag::after {
    content: "";
    position: absolute;
    inset: .07rem auto auto .07rem;
    width: calc(48% - .14rem);
    height: calc(54% - .14rem);
    background: radial-gradient(circle, #ffffff 0 .035rem, transparent .045rem) 0 0 / .21rem .19rem;
}

button.afnb-lang-switch--header {
    margin-left: .8rem;
    align-self: center;
}

button.afnb-lang-switch--footer {
    width: auto !important;
    max-width: max-content;
    margin-top: .9rem;
    align-self: flex-start;
    justify-self: start;
    color: #fff !important;
}

@media (max-width: 1024px) {
    #masthead .header-inner {
        position: relative;
    }

    button.afnb-lang-switch--header {
        position: absolute;
        top: 50%;
        right: 4.2rem;
        z-index: 20;
        margin: 0;
        transform: translateY(-50%);
    }
}

@media (max-width: 480px) {
    button.afnb-lang-switch {
        min-width: 3.8rem;
        height: 2.1rem;
        padding-inline: .55rem;
    }

    button.afnb-lang-switch--header {
        right: 3.6rem;
    }
}

