/* 多语言切换器样式（供所有页面共用） */

/* ---- 次级详情页的「返回」按钮 ----
   ⚠️ 单独放在 i18n.css 里：三个详情页（bill / transfers / team）
      都要用它，而它们的内联 <style> 互不相同，
      放进公共 css 才能保证三处样式完全一致。
*/
.page-back {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 14px;
    padding: 7px 12px 7px 9px;
    border: 0;
    border-radius: 999px;
    background: #1f2937;
    color: #d1d5db;
    font-size: 13px;
    cursor: pointer;
}

.page-back:hover { background: #374151; color: #fff; }
.page-back:focus-visible { outline: 2px solid #eab308; outline-offset: 2px; }
.page-back svg { flex: 0 0 auto; }

.lang-switcher { position: relative; display: inline-block; }

.lang-switcher > summary {
    gap: 5px;
    padding: 4px 8px;
    background: transparent;
    font-size: 12px;
    list-style: none;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.lang-switcher > summary::-webkit-details-marker { display: none; }
.lang-switcher > summary::marker { content: ''; }

.lang-switcher[open] > summary .lang-caret { transform: rotate(180deg); }

.lang-caret { display: inline-block; font-size: 10px; line-height: 1; transition: transform .18s ease; }

.lang-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 20;
    min-width: 148px;
    margin: 0;
    padding: 6px;
    border: 1px solid #2c3645;
    border-radius: 10px;
    background: #1f2937;
    box-shadow: 0 10px 28px rgba(0, 0, 0, .45);
    list-style: none;
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 10px;
    border-radius: 7px;
    color: #d1d5db;
    font-size: 13px;
    white-space: nowrap;
}

.lang-option img { flex: 0 0 18px; width: 18px; height: 18px; border-radius: 50%; object-fit: cover; }
.lang-option:hover, .lang-option:focus-visible { background: #374151; color: #fff; }
.lang-option.active { color: #facc15; }
.lang-check { margin-left: auto; opacity: 0; }
.lang-option.active .lang-check { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
    .lang-caret { transition: none; }
}
