#header .kowal-locale-trigger {
    margin-left: 1rem;
    margin-bottom: 0;
}

.kowal-locale-trigger,
.kowal-language-close {
    align-items: center;
    background: #fff;
    border: 1px solid #e1e3e5;
    box-shadow: none;
    color: #28303a !important;
    display: inline-flex;
    height: auto;
    justify-content: center;
    letter-spacing: .025em;
    line-height: 1.3;
    text-transform: none;
}

.kowal-locale-trigger {
    border-radius: 6px;
    flex-shrink: 0;
    font-size: .9rem;
    gap: 8px;
    min-height: 40px;
    padding: 8px 10px;
}

.kowal-locale-trigger[hidden],
.kowal-language-dialog:not([open]) {
    display: none;
}

.kowal-locale-trigger:hover,
.kowal-locale-trigger[aria-expanded="true"],
.kowal-language-close:hover {
    background: #f7f7f6;
    border-color: #c5c8cd;
}

.kowal-locale-trigger img,
.kowal-language-option img {
    border: 1px solid #00000012;
    border-radius: 2px;
    display: block;
    flex-shrink: 0;
    object-fit: cover;
}

.kowal-language-dialog {
    background: #fff;
    border: 0;
    border-radius: 12px;
    box-shadow: 0 30px 100px #0004;
    color: #27313b;
    max-height: 88vh;
    padding: 0;
    width: min(650px, calc(100% - 32px));
}

.kowal-language-dialog::backdrop {
    background: #14202c88;
    backdrop-filter: blur(3px);
}

.kowal-language-dialog-header {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding: 20px 24px;
}

.kowal-language-dialog-header h2 {
    font-size: 1.5rem;
    margin: 0;
}

.kowal-language-close {
    border-radius: 50%;
    flex-shrink: 0;
    font-size: 24px;
    min-height: 40px;
    padding: 0;
    width: 40px;
}

.kowal-language-list {
    background: #fafbfc;
    border-top: 1px solid #e9ebed;
    display: grid;
    gap: 9px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 18px 24px 24px;
}

.kowal-language-option {
    align-items: center;
    background: #fff;
    border: 1px solid #e4e7ea;
    border-radius: 7px;
    box-shadow: none;
    color: #303a44;
    display: flex;
    font: inherit;
    gap: 8px;
    height: auto;
    letter-spacing: normal;
    min-height: 60px;
    min-width: 0;
    padding: 10px;
    text-align: left;
    text-transform: none;
}

.kowal-language-option[href]:hover,
.kowal-language-option.is-current {
    background: #fffafa;
    border-color: #ac3434;
    color: #922020;
}

.kowal-language-option-text {
    flex: 1;
    min-width: 0;
    overflow-wrap: anywhere;
}

.kowal-language-option small {
    color: #687582;
    display: block;
    line-height: 1.3;
    margin-top: 3px;
}

.kowal-language-mark {
    color: #a72b2b;
    flex-shrink: 0;
}

.kowal-language-option.is-unavailable {
    background: #f5f6f7;
    cursor: default;
}

.kowal-locale-trigger:focus-visible,
.kowal-language-close:focus-visible,
.kowal-language-option:focus-visible {
    outline: 2px solid #922020;
    outline-offset: 2px;
}

@media (max-width: 560px) {
    .kowal-language-dialog-header,
    .kowal-language-list {
        padding: 14px;
    }

    .kowal-language-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .kowal-language-option {
        padding: 8px;
    }

    .kowal-language-option img {
        height: 18px;
        width: 24px;
    }
}
