/* homev3 — nút chọn ngôn ngữ (cụm đa ngôn ngữ, 16/10/2026). Nạp bởi Hv3I18n::renderSwitcher() — chỉ khi cụm bật.
   Ba kiểu: --top (thanh tiện ích desktop), --drawer (menu ≤ 990px), --app (view app điện thoại). CSS riêng, không đụng
   rule dùng chung. Tài liệu: .claude/docs/homev3-da-ngon-ngu.md */
.hv3-lang { position: relative; list-style: none; }
.hv3-lang__flag { width: 21px; height: 14px; flex: none; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0,0,0,.08); display: block; }

/* ── nút + menu xổ (top, app) ── */
.hv3-lang__btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 2px 4px; border: 0; background: none; cursor: pointer;
    font: inherit; font-size: 14px; line-height: 1;
    color: var(--hv3-green-500, #1D8057);
}
.hv3-lang__btn:hover { color: #176A48; }
.hv3-lang__caret { width: 14px; height: 14px; transition: transform .15s ease; }
.hv3-lang.is-open .hv3-lang__caret { transform: rotate(180deg); }
.hv3-lang__menu {
    position: absolute; top: calc(100% + 8px); right: 0; z-index: 1000;
    min-width: 180px; margin: 0; padding: 6px; list-style: none;
    background: #fff; border: 1px solid #E8E8EC; border-radius: 12px;
    box-shadow: 0 10px 30px rgba(17, 24, 39, .12);
}
.hv3-lang__menu[hidden] { display: none; }
.hv3-lang__item {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 10px; border-radius: 8px;
    font-size: 14px; line-height: 1.2; color: var(--hv3-ink-soft, #666); text-decoration: none; white-space: nowrap;
}
.hv3-lang__item:hover { background: #F2F8F5; color: var(--hv3-green-500, #1D8057); }
.hv3-lang__item.is-on { color: var(--hv3-green-500, #1D8057); font-family: 'Arial Web Head', var(--hv3-font, Arial, sans-serif); }
.hv3-lang__check { width: 16px; height: 16px; margin-left: auto; }

/* ── thanh tiện ích desktop: cách nút tài khoản như các mục khác ── */
.hv3-lang--top { display: flex; align-items: center; }

/* ── view app điện thoại: nút tròn như nút tài khoản cạnh bên ── */
.hv3-lang--app .hv3-lang__btn {
    justify-content: center; width: 40px; height: 40px; padding: 0; gap: 0;
    border-radius: 50%; background: rgba(255, 255, 255, .16); color: #fff;
}
.hv3-lang--app .hv3-lang__caret { display: none; }
.hv3-lang--app .hv3-lang__flag { width: 22px; height: 15px; }
.hv3-lang--app .hv3-lang__menu { top: calc(100% + 6px); }

/* ── drawer ≤ 990px: hàng chip ── */
.hv3-lang--drawer { margin: 0 0 18px; }
.hv3-lang__cap {
    margin: 0 0 6px;
    font-family: 'Arial Web Head', var(--hv3-font, Arial, sans-serif); font-size: 13px; font-weight: 700;
    letter-spacing: .3px; text-transform: uppercase; color: #9b9ba3;
}
.hv3-lang__chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.hv3-lang__chip {
    display: inline-flex; align-items: center; gap: 8px;
    min-height: 40px; padding: 6px 12px;
    border: 1px solid #E8E8EC; border-radius: 12px;
    font-size: 13px; line-height: 1.2; color: var(--hv3-ink-soft, #666); text-decoration: none;
}
.hv3-lang__chip:hover { border-color: #9ed6b7; color: var(--hv3-green-500, #1D8057); }
.hv3-lang__chip.is-on { border-color: var(--hv3-green-500, #1D8057); color: var(--hv3-green-500, #1D8057); background: #F2F8F5; }

/* ── nhãn "Translating…" khi đang dịch dần (i18n-dom.js, mục 15 doc) ── */
.hv3-i18n-badge {
    position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 2147483000;
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 14px; border-radius: 999px;
    background: rgba(17, 24, 39, .88); color: #fff;
    font-size: 13px; line-height: 1; box-shadow: 0 6px 20px rgba(0, 0, 0, .18); pointer-events: none;
}
.hv3-i18n-badge[hidden] { display: none; }
.hv3-i18n-badge__dot {
    width: 8px; height: 8px; border-radius: 50%; background: #4ADE80;
    animation: hv3-i18n-pulse 1s ease-in-out infinite;
}
@keyframes hv3-i18n-pulse { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
@media (max-width: 767px) {
    .hv3-i18n-badge { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }   /* trên thanh tab đáy của view app */
}
