/* ==========================================================================
   Yêu Hạt Global Language Switcher (VI | EN) — Header Placement & Google Translate Clean UI
   ========================================================================== */

:root {
  --yh-gl-primary: #011e46;
  --yh-gl-primary-soft: #1b2f5d;
}

/* --------------------------------------------------------------------------
   1. GẮN CHUẨN VÀO VỊ TRÍ KHUNG ĐỎ TRONG HEADER FLATSOME (#masthead — CHỈ DESKTOP >= 850px)
   -------------------------------------------------------------------------- */
@media (min-width: 850px) {
  #masthead .header-inner > .flex-col.hide-for-medium.flex-right.yh-has-lang-switcher {
    flex: 0 0 auto !important;
    width: auto !important;
    margin-left: 16px !important;
    display: flex !important;
    align-items: center !important;
  }

  #masthead .header-inner > .flex-col.hide-for-medium.flex-right.yh-has-lang-switcher > ul.header-nav-main {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
  }
}

li.yh-header-lang-item {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
}

/* --------------------------------------------------------------------------
   2. KIỂU DÁNG PILL CHUYỂN NGÔN NGỮ VI | EN (SẮC NÉT, CHỐNG XUNG ĐỘT FLATSOME)
   -------------------------------------------------------------------------- */
.yh-global-lang-pill {
  display: inline-flex !important;
  align-items: center !important;
  gap: 3px !important;
  height: 42px !important;
  padding: 4px !important;
  border-radius: 999px !important;
  background: #f1f4f9 !important;
  border: 1px solid #d5dfec !important;
  box-shadow: 0 2px 8px rgba(1, 30, 70, 0.06) !important;
  font-family: "Be Vietnam Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif !important;
  box-sizing: border-box !important;
  flex-shrink: 0 !important;
}

.yh-global-lang-pill *,
.yh-global-lang-pill *::before,
.yh-global-lang-pill *::after {
  box-sizing: border-box !important;
}

.yh-global-lang-pill button.yh-gl-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  height: 32px !important;
  min-height: 0 !important;
  padding: 0 13px !important;
  margin: 0 !important;
  border: none !important;
  border-radius: 999px !important;
  background: transparent !important;
  color: #4b586a !important;
  font-family: inherit !important;
  font-size: 12.5px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  letter-spacing: 0.3px !important;
  text-transform: uppercase !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  box-shadow: none !important;
  transition: background-color 0.18s ease, color 0.18s ease !important;
}

.yh-global-lang-pill button.yh-gl-btn:hover {
  color: var(--yh-gl-primary) !important;
  background: rgba(1, 30, 70, 0.06) !important;
  box-shadow: none !important;
}

.yh-global-lang-pill button.yh-gl-btn.is-active {
  background: var(--yh-gl-primary) !important;
  color: #ffffff !important;
  box-shadow: 0 2px 6px rgba(1, 30, 70, 0.22) !important;
}

.yh-global-lang-pill .yh-flag-svg {
  width: 18px !important;
  height: 12px !important;
  border-radius: 2px !important;
  display: block !important;
  flex-shrink: 0 !important;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}

/* --------------------------------------------------------------------------
   3. PHIÊN BẢN GỌN TRÊN MOBILE (< 850px) — ẨN HẲN NÚT DESKTOP, CHỈ HIỆN 1 NÚT CẠNH GIỎ HÀNG
   -------------------------------------------------------------------------- */
@media (max-width: 849px) {
  #masthead .header-inner > .flex-col.hide-for-medium.flex-right.yh-has-lang-switcher {
    display: none !important;
  }

  #masthead .header-inner {
    gap: 6px !important;
  }

  #masthead .flex-col.show-for-medium.flex-left {
    flex: 0 0 auto !important;
    width: auto !important;
  }

  #masthead #logo.logo {
    flex: 1 1 auto !important;
    max-width: 122px !important;
    margin: 0 auto !important;
  }

  #masthead #logo.logo img {
    max-height: 46px !important;
    width: auto !important;
    margin: 0 auto !important;
  }

  #masthead .flex-col.show-for-medium.flex-right {
    flex: 0 0 auto !important;
    width: auto !important;
    margin-left: 0 !important;
  }

  #masthead .flex-col.show-for-medium.flex-right > ul.mobile-nav {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex-wrap: nowrap !important;
  }

  li.yh-mobile-lang-item {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
  }

  .yh-global-lang-pill.yh-gl-mobile {
    height: 32px !important;
    padding: 2px !important;
    gap: 2px !important;
  }

  .yh-global-lang-pill.yh-gl-mobile button.yh-gl-btn {
    height: 26px !important;
    padding: 0 7px !important;
    font-size: 11px !important;
    gap: 4px !important;
  }

  .yh-global-lang-pill.yh-gl-mobile .yh-flag-svg {
    width: 14px !important;
    height: 10px !important;
  }
}

/* --------------------------------------------------------------------------
   4. ẨN HOÀN TOÀN THANH GOOGLE TRANSLATE XẤU & GIỮ BODY KHÔNG BỊ ĐẨY XUỐNG
   -------------------------------------------------------------------------- */
body {
  top: 0 !important;
  position: static !important;
}

.skiptranslate > iframe.goog-te-banner-frame,
iframe.goog-te-banner-frame,
.goog-te-banner-frame,
#goog-gt-tt,
.goog-te-balloon-frame,
.goog-tooltip,
.goog-tooltip:hover,
div#goog-gt- {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  opacity: 0 !important;
}

.goog-text-highlight {
  background-color: transparent !important;
  box-shadow: none !important;
}
