.whb-header button.duct-language-trigger[type="button"] {
    display: inline-grid;
    place-items: center;
    inline-size: 40px;
    min-inline-size: 40px;
    block-size: 40px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #000;
    box-shadow: none;
}

.whb-header button.duct-language-trigger[type="button"]:is(:hover, :focus, :active) {
    background: transparent;
    color: #000;
    box-shadow: none;
}

.whb-header button.duct-language-trigger[type="button"]:focus-visible {
    outline: 2px solid #000;
    outline-offset: 2px;
}

.duct-language-dialog {
    box-sizing: border-box;
    width: min(1100px, calc(100% - 32px));
    max-width: none;
    max-height: calc(100dvh - 32px);
    padding: 0;
    border: 1px solid #dbe4ef;
    border-radius: 22px;
    background: #f8fafc;
    color: #0f172a;
    box-shadow: 0 30px 85px rgb(15 23 42 / 26%);
    overscroll-behavior: contain;
}

.duct-language-dialog:not([open]) {
    display: none;
}

.duct-language-dialog::backdrop {
    background: rgb(15 23 42 / 64%);
}

.duct-language-panel {
    position: relative;
    padding: clamp(32px, 6vw, 60px) clamp(14px, 4vw, 44px);
    background: radial-gradient(ellipse at 10% 0, #e6f0ff 0, transparent 70%),
        radial-gradient(ellipse at 90% 100%, #ffe9f0 0, transparent 65%), #f8fafc;
}

.duct-language-panel h2 {
    margin: 0 0 clamp(24px, 4vw, 36px);
    color: #0f172a;
    font-size: clamp(23px, 4vw, 40px);
    font-weight: 500;
    line-height: 1.2;
    text-align: center;
}

.duct-language-close-form {
    position: absolute;
    inset-block-start: 10px;
    inset-inline-end: 10px;
}

#duct-language-dialog .duct-language-close {
    display: inline-grid;
    place-items: center;
    box-sizing: border-box;
    width: 40px;
    height: 40px;
    min-height: 40px;
    padding: 0;
    border: 1px solid #dbe4ef;
    border-radius: 50%;
    background: #fff;
    color: #34435a;
    box-shadow: none;
}

#duct-language-dialog .duct-language-close svg {
    display: block;
    width: 19px;
    height: 19px;
}

#duct-language-dialog .duct-language-close:hover {
    background: #eaf2ff;
    color: #174597;
}

#duct-language-dialog .duct-language-close:focus-visible {
    outline: 2px solid #174597;
    outline-offset: 2px;
}

.duct-language-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.duct-language-card {
    position: relative;
    display: flex;
    min-height: 85px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 13px 28px;
    border: 1px solid #dbe4ef;
    border-radius: 14px;
    background: #fff;
    color: #152239;
    font-size: 16px;
    text-align: center;
    text-decoration: none;
    transition: border-color .16s ease, background-color .16s ease;
}

.duct-language-card:hover,
.duct-language-card[aria-current="page"] {
    border-color: #8ab3f8;
    background: #f3f7ff;
    color: #174597;
}

.duct-language-card img {
    flex: 0 0 36px;
    width: 36px;
    height: 25px;
    border-radius: 4px;
    object-fit: cover;
}

.duct-language-code {
    position: absolute;
    inset-block-start: 6px;
    inset-inline-start: 8px;
    color: #526985;
    font-size: 10px;
    font-weight: 700;
}

.duct-language-name {
    overflow-wrap: anywhere;
}

@media (max-width: 640px) {
    .duct-language-panel {
        padding-block-start: 56px;
    }

    .duct-language-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .duct-language-card {
        flex-direction: column;
        min-height: 75px;
        padding: 12px 8px 8px;
        font-size: 13px;
    }

    .duct-language-card img {
        flex: 0 0 22px;
        width: 32px;
        height: 22px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .duct-language-card {
        transition: none;
    }
}
