.ahtr-languages,
.ahtr-languages > summary {
    display: inline-flex;
    align-items: center;
    gap: .45em;
    color: inherit;
}

.ahtr-languages {
    position: relative;
    white-space: nowrap;
}

.ahtr-languages > summary {
    min-block-size: 44px;
    padding-inline: .35em;
    cursor: pointer;
    list-style: none;
    line-height: 1;
}

.ahtr-languages > summary::-webkit-details-marker {
    display: none;
}

.ahtr-languages > summary svg {
    flex: none;
}

.ahtr-languages[open] > summary .ahtr-trigger-arrow { transform: rotate(180deg); }

.ahtr-languages.ahtr-inline {
    align-items: stretch;
    gap: 0;
}

.ahtr-languages.ahtr-inline > a {
    box-sizing: border-box;
    justify-content: center;
    min-block-size: 44px;
    min-inline-size: 44px;
    padding: 7px 10px;
    border-block-end: 3px solid transparent;
    color: inherit;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    opacity: .62;
}

.ahtr-languages.ahtr-inline > a[aria-current="page"] {
    border-block-end-color: currentColor;
    opacity: 1;
}

.ahtr-languages.ahtr-inline > a:hover {
    opacity: 1;
}

.ahtr-languages > .ahtr-options {
    position: absolute;
    inset-inline-start: 0;
    inset-block-start: calc(100% + 4px);
    z-index: 10001;
    box-sizing: border-box;
    inline-size: max-content;
    min-inline-size: min(13rem, calc(100vw - 24px));
    max-inline-size: calc(100vw - 24px);
    max-block-size: min(60vh, 22rem);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 19px 5px;
    background: #fff;
    color: #262321;
    border: 0;
    border-radius: 20px;
    box-shadow: 0 8px 26px rgb(38 35 33 / 12%);
    font: inherit;
    white-space: normal;
    transform: translateX(var(--ahtr-shift, 0px));
}

.ahtr-languages > .ahtr-options:popover-open {
    position: fixed;
    inset: auto;
    left: var(--ahtr-left);
    top: var(--ahtr-top);
    max-block-size: var(--ahtr-height, 60vh);
    margin: 0;
    transform: none;
}

.ahtr-languages .ahtr-options > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    box-sizing: border-box;
    min-block-size: 38px;
    margin: 0;
    padding: 7px 21px;
    background: transparent;
    color: #262321;
    border: 0;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.35;
    letter-spacing: normal;
    text-align: start;
    text-decoration: none;
    text-transform: none;
    opacity: 1;
}

.ahtr-options .shimi-language-name,
.ahtr-options .shimi-language-text {
    min-inline-size: 0;
    overflow-wrap: anywhere;
}

.ahtr-options .ahtr-check {
    flex: none;
}

.ahtr-languages > summary:focus-visible,
.ahtr-languages.ahtr-inline > a:focus-visible,
.ahtr-languages .ahtr-options > a:focus-visible {
    outline: 2px solid #5e5247;
    outline-offset: -2px;
}

@media (pointer: coarse) {
    .ahtr-languages .ahtr-options > a {
        min-block-size: 44px;
        font-size: 16px;
    }
}

.ahtr-languages > a,
.ahtr-languages .shimi-language-name {
    display: inline-flex;
    align-items: center;
    gap: .35em;
}
.ahtr-languages .shimi-flag {
    display: inline-block;
    flex: none;
    inline-size: 20px;
    block-size: 15px;
    object-fit: contain;
}
.ahtr-languages .shimi-language-text {
    display: inline-grid;
    gap: 1px;
}
.ahtr-languages .shimi-language-text small {
    color: #59534d;
    font-size: 12px;
    font-weight: 400;
}
