/**
 * ZQM Bearings — Lightweight Switcher + Smart-Lang + Toast CSS for EN/ZH WordPress Pages (v1.0.0)
 * Extracted 1:1 from zqm-i18n-layout.v2.css (saves ~75 KB render-blocking CSS on every non-frozen EN/ZH page).
 * Full zqm-i18n-layout.v2.css remains intact on disk for /es/, /ru/, and any previously cached pages.
 */
:root {
  --zqm-navy: #0f1d30;
  --zqm-navy-2: #162a44;
  --zqm-gold: #ffbc28;
  --zqm-gold-deep: #e5a000;
  --zqm-slate: #f6f8fb;
  --zqm-white: #ffffff;
  --zqm-border: #dce3ec;
}
.zqm-lang-switcher {
  position: relative;
  flex-shrink: 0;
}
.zqm-lang-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 72px;
  height: 34px;
  padding: 0 8px;
  border-radius: 4px;
  border: 1px solid var(--zqm-border);
  background: var(--zqm-slate);
  color: var(--zqm-navy);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}
.zqm-lang-trigger:hover,
.zqm-lang-trigger[aria-expanded="true"] {
  background: var(--zqm-white);
  border-color: var(--zqm-navy);
  box-shadow: 0 2px 8px rgba(15, 29, 48, 0.08);
}
.zqm-lang-trigger .zqm-globe-ico { color: var(--zqm-gold-deep); flex-shrink: 0; }
.zqm-lang-trigger .zqm-caret-ico { transition: transform 0.18s ease; flex-shrink: 0; }
.zqm-lang-trigger[aria-expanded="true"] .zqm-caret-ico { transform: rotate(180deg); }
.zqm-lang-popover {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 344px;
  max-width: calc(100vw - 24px);
  padding: 10px;
  border-radius: 6px;
  background: var(--zqm-white);
  border: 1px solid var(--zqm-border);
  box-shadow: 0 14px 32px rgba(15, 29, 48, 0.14);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  z-index: 120;
}
.zqm-lang-popover.is-single-col {
  width: 196px;
  grid-template-columns: 1fr;
  padding: 8px;
  gap: 5px;
}
.zqm-lang-popover[hidden] { display: none; }
.zqm-lang-opt {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  border-radius: 4px;
  border: 1px solid transparent;
  background: var(--zqm-slate);
  color: var(--zqm-navy);
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 600;
  min-width: 0;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.zqm-lang-opt:hover {
  background: var(--zqm-white);
  border-color: var(--zqm-navy);
}
.zqm-lang-opt.is-current {
  background: var(--zqm-navy);
  color: var(--zqm-white);
}
.zqm-lang-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--zqm-gold-deep);
  flex-shrink: 0;
}
.zqm-lang-opt.is-current .zqm-lang-dot { background: var(--zqm-gold); }
.zqm-lang-native {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.zqm-lang-badge { font-size: 10.5px; font-weight: 800; opacity: 0.65; flex-shrink: 0; }
.zqm-i18n-toast {
  position: fixed; bottom: 22px; right: 20px; z-index: 99998; max-width: 390px;
  background: #0f1d30; color: #ffffff; border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 10px 14px; border-radius: 7px; font-size: 12.5px; font-weight: 700;
  box-shadow: 0 10px 26px rgba(15, 29, 48, 0.28); opacity: 0; transform: translateY(8px);
  transition: all 0.18s ease; pointer-events: none; white-space: pre-line;
}
.zqm-i18n-toast.is-show { opacity: 1; transform: translateY(0); }
.zqm-i18n-smart-lang {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 99960;
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  box-sizing: border-box;
  max-width: min(520px, calc(100vw - 32px));
  padding: 6px 12px;
  background: #0f1d30;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(15, 29, 48, 0.28);
  font-size: 12.8px;
  line-height: 1.35;
  transition: right 0.22s ease, bottom 0.18s ease, opacity 0.24s ease, transform 0.24s ease;
}
.zqm-i18n-smart-lang.is-left { right: auto; left: 20px; }
.zqm-i18n-smart-lang.is-hiding { opacity: 0; transform: translateY(6px); pointer-events: none; }
.zqm-sl-dot { width: 7px; height: 7px; border-radius: 50%; background: #ffbc28; flex-shrink: 0; }
.zqm-sl-ring { position: relative; width: 22px; height: 22px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; }
.zqm-sl-ring svg { width: 22px; height: 22px; display: block; }
.zqm-sl-sec { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 9.5px; font-weight: 800; color: #ffbc28; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -0.03em; }
.zqm-i18n-smart-lang.is-paused .zqm-sl-ring { opacity: 0.78; }
.zqm-sl-msg { flex: 1 1 auto; color: rgba(255, 255, 255, 0.94); font-weight: 500; }
.zqm-sl-go {
  flex-shrink: 0;
  padding: 5px 11px;
  border-radius: 4px;
  background: #ffbc28;
  color: #0f1d30 !important;
  font-weight: 800;
  font-size: 12px;
  text-decoration: none;
  white-space: nowrap;
}
.zqm-sl-go:hover { background: #f3b11b; }
.zqm-sl-x {
  appearance: none;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}
.zqm-sl-x:hover { color: #ffffff; }
@media (max-width: 768px) {
  .zqm-lang-popover { position: fixed; top: 64px; left: 12px; right: 12px; width: auto; min-width: 0; max-width: calc(100vw - 24px); }
  .zqm-i18n-toast { right: 14px; max-width: calc(100vw - 28px); }
}
@media (max-width: 560px) {
  .zqm-i18n-smart-lang { right: 12px; left: 12px; bottom: 20px; max-width: none; gap: 7px; padding: 6px 9px; font-size: 12px; }
  .zqm-i18n-smart-lang .zqm-sl-go { padding: 4px 8px; font-size: 11.5px; }
}
@media print {
  .zqm-i18n-smart-lang, .zqm-i18n-toast { display: none !important; }
}
