/* Switcher ngôn ngữ + chống nháy. Không inline style vì CSP style-src 'self'. */
html[data-hc-i18n="pending"] body { visibility: hidden; }

#hc-lang {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 60;
  display: flex;
  gap: 3px;
  padding: 3px;
  border: 1px solid rgba(15, 23, 42, .16);
  border-radius: 999px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 2px 10px rgba(15, 23, 42, .12);
  font: 600 12px/1 system-ui, -apple-system, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
}

#hc-lang button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 6px 9px;
  background: transparent;
  color: #334155;
  font: inherit;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}

#hc-lang button:hover { background: rgba(15, 23, 42, .08); }
#hc-lang button[aria-pressed="true"] { background: #0f172a; color: #fff; }
#hc-lang button:focus-visible { outline: 2px solid #2563eb; outline-offset: 1px; }

@media (max-width: 560px) {
  #hc-lang { top: auto; bottom: 12px; right: 12px; }
  #hc-lang button { padding: 7px 8px; }
}

@media (prefers-reduced-motion: reduce) {
  #hc-lang button { transition: none; }
}

@media print {
  #hc-lang { display: none !important; }
}
