/* Google Translate floating widget — dựng mới (không có CSS ported từ site tham chiếu). Kích
   thước/màu/bo góc/shadow lấy từ getComputedStyle() thật của app currency converter bên thứ 3
   (Bucksense, class .buckscc-*) đang chạy trên site tham chiếu shama-perfumes.com — dùng làm
   mẫu layout cho widget đổi ngôn ngữ này. Icon cờ quốc gia của mẫu là 1 sprite ảnh riêng của
   app đó (cdn-2.helixo.co) — không hotlink/copy asset của bên thứ 3, thay bằng emoji cờ suy từ
   mã ngôn ngữ (xem FLAG_BY_LANG trong component). */

/* Ẩn hẳn widget gốc Google Translate (giữ trong DOM để script vẫn hoạt động được, tự inject
   <select class="goog-te-combo"> mà widget của mình điều khiển qua JS). */
.google-translate-hidden-widget {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Google Translate tự chèn banner/iframe + gạch chân từ điển ở đầu trang khi kích hoạt — ẩn để
   giữ nguyên giao diện site, tránh trang bị đẩy xuống 40px. */
body { top: 0 !important; }
/* Banner/iframe Google Translate tự chèn dùng class ngẫu nhiên đổi theo version script (không
   còn ổn định là ".goog-te-banner-frame") — mọi iframe/tooltip nó chèn đều có sẵn class dùng
   chung "skiptranslate" nên nhắm theo class đó là cách chắc chắn nhất. */
iframe.skiptranslate,
.goog-tooltip,
.goog-tooltip:hover,
.goog-text-highlight {
  display: none !important;
  background: none !important;
  box-shadow: none !important;
}

/* Loading indicator Google chèn thẳng làm con trực tiếp của <body> khi đang áp dụng bản dịch
   (spinner/progress bar, class dạng "VIpgJd-*") — ẩn luôn, tránh nhấp nháy UI lạ khi đổi ngôn
   ngữ. Dùng "^=" (bắt đầu bằng) vì hậu tố class do Google tự sinh, có thể đổi theo version. */
body > [class^="VIpgJd-"],
body > [class*=" VIpgJd-"] {
  display: none !important;
}
.goog-text-highlight { border: none !important; }

.gtw-floating-box {
  position: fixed;
  left: 40px;
  bottom: 40px;
  z-index: 45;
  font-family: Raleway, sans-serif;
}

.gtw-selected {
  display: flex;
  align-items: center;
  height: 38px;
  padding: 8px 4px 8px 8px;
  border: 1px solid rgba(204, 204, 204, 0.36);
  border-radius: 5px;
  background: #fff;
  box-shadow: none;
  cursor: pointer;
  color: rgb(30, 30, 30);
}

.gtw-flag {
  width: 30px;
  height: 19px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 2px;
  overflow: hidden;
  font-size: 25px;
  line-height: 1;
  flex-shrink: 0;
}

.gtw-selected-label {
  margin: 0 4px;
  font-size: 14px;
  font-weight: 400;
  line-height: 22.4px;
  color: rgb(30, 30, 30);
}

/* Mặc định (đóng) mũi tên chỉ xuống — khớp hành vi thật của mẫu (verify qua getComputedStyle()
   khi toggle mở/đóng trên site tham chiếu): đóng = chỉ xuống, mở = quay lại chỉ lên. */
.gtw-chevron {
  flex-shrink: 0;
  color: #b7b7b7;
  transform: rotate(180deg);
  transition: transform 0.2s ease-in-out;
}
.gtw-chevron--open {
  transform: rotate(0deg);
}

.gtw-options {
  position: absolute;
  left: 0;
  bottom: calc(100% + 10px);
  width: 265px;
  max-height: 265px;
  overflow-y: auto;
  background: #fff;
  border-radius: 7px;
  box-shadow: 0 0 17px -5px rgba(0, 0, 0, 0.15);
  padding: 0;
  margin: 0;
  list-style: none;
}

.gtw-option {
  display: flex;
  align-items: center;
  padding: 12px 15px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 400;
  color: rgb(30, 30, 30);
}

.gtw-option:hover {
  background: rgba(30, 30, 30, 0.04);
}

.gtw-option--active {
  background: rgba(30, 30, 30, 0.06);
  font-weight: 600;
}

.gtw-option-label {
  margin: 0 4px;
}

@media only screen and (max-width: 767px) {
  .gtw-floating-box {
    left: 16px;
    bottom: 16px;
  }
}
