.fn-lang {
    position: relative;
}

.fn-lang > summary {
    list-style: none;
}

.fn-lang > summary::-webkit-details-marker {
    display: none;
}

.fn-lang:not([open]) .fn-lang__menu {
    display: none;
}

.fn-lang__btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    min-height: 1.85rem;
    padding: 0 .55rem;
    border: 1px solid #eceff3;
    border-radius: .45rem;
    background: #fff;
    color: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.fn-lang__btn:hover { border-color: #C8102E; color: #C8102E; }

.fn-lang__flag,
.fn-lang__btn img,
.fn-lang__item img {
    width: 1.1rem;
    height: 1.1rem;
    object-fit: cover;
    border-radius: 2px;
}

.fn-lang__caret { width: .7rem; height: .7rem; opacity: .6; }

.fn-lang__menu {
    position: absolute;
    top: calc(100% + .4rem);
    right: 0;
    z-index: 80;
    min-width: 16rem;
    padding: .45rem;
    border: 1px solid #eceff3;
    border-radius: .7rem;
    background: #fff;
    box-shadow: 0 18px 40px rgba(15, 23, 42, .12);
}

html[dir="rtl"] .fn-lang__menu {
    right: auto;
    left: 0;
}

.fn-lang__label {
    margin: 0;
    padding: .35rem .55rem .45rem;
    color: #94a3b8;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.fn-lang__item {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .5rem .55rem;
    border-radius: .5rem;
    color: inherit;
    text-decoration: none;
}

.fn-lang__item b {
    font-size: 1rem;
    font-weight: 600;
}

.fn-lang__item strong,
.fn-lang__item small { display: block; }

.fn-lang__item small {
    margin-top: .1rem;
    color: #94a3b8;
    font-size: 11px;
    font-weight: 600;
}

.fn-lang__item:hover,
.fn-lang__item.is-on { background: #f6f7f9; }

.fn-lang__item.is-on { color: #C8102E; }

.fn-edition-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .65rem 1rem;
    padding: .55rem 0;
    border-bottom: 1px solid #eceff3;
    background: #fff7ed;
    color: #9a3412;
    font-size: 12px;
    font-weight: 650;
}

.fn-edition-bar b { font-weight: 800; }

.dark .fn-lang__btn,
.dark .fn-lang__menu {
    background: #161618;
    border-color: rgba(255,255,255,.1);
    color: #f3f1ea;
}

.dark .fn-lang__item:hover,
.dark .fn-lang__item.is-on { background: rgba(255,255,255,.06); }

.dark .fn-edition-bar {
    background: #2a1a0e;
    border-bottom-color: rgba(255,255,255,.08);
    color: #fdba74;
}

html[dir="rtl"] body {
    text-align: right;
}
