/* Hide the default GTranslate trigger but keep it measurable */
#gtranslate-container .gt_switcher-popup {
  opacity: 0; /* invisible */
  width: 1px;
  height: 1px; /* tiny but present */
  overflow: hidden;
  display: inline-block; /* keep in layout; no absolute positioning */
}

/* Optional: position the container where you like */
#gtranslate-container {
  display: inline-block;
}

/* —— Style the popup to match your dark menu —— */
.gt_black_overlay {
  background: rgba(0, 0, 0, 0.65) !important;
  backdrop-filter: blur(2px);
}

.et-db #et-boc.et-boc .gt_white_content {
  position: absolute;
  left: auto;
  top: 60px;
  right: 0;
  width: 230px;
  height: auto;
  margin: 0;
}

.gt_white_content.notranslate {
  background: #2c2c2c !important;
  border-radius: 3.5px !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.45) !important;
  padding: 8px 0 !important;
  color: #ddd !important;
  max-width: 420px !important;
}

/* Rows */
.et-db #et-boc.et-boc .gt_white_content .gt_languages {
  max-height: none;
  overflow-x: visible;
}
.et-db #et-boc.et-boc .gt_white_content a {
  display: flex !important;
  align-items: center;
  gap: 16px;
  border-bottom: 0;
  color: var(--white80) !important;
  text-decoration: none !important;
  border-radius: 12px !important;
  margin: 0px 10px !important;
}
.gt_white_content .gt_language_list a:hover {
  background: #3a3a3a !important;
  color: #fff !important;
}
.gt_white_content .gt_language_list img {
  width: 32px !important;
  height: 22px !important;
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.3);
}
.language-button-container {
  position: absolute;
  top: -10px;
  right: -10px;
}
.lang-badge {
  position: relative;
  z-index: 30;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 9999px;
  border: 2px solid #8a8a8a;
  background: transparent;
  color: #fff;
  letter-spacing: 0.5px;
  transition: all 0.18s ease;
  cursor: pointer;
}
.lang-badge.open {
  border-color: #88ff2a;
  box-shadow: 0 0 0 3px rgba(136, 255, 42, 0.2);
  color: #88ff2a;
}

.lang-menu {
  position: absolute;
  margin-top: 12px;
  z-index: 40;
  list-style: none;
  padding: 12px 0;
  width: 380px;
  max-width: 86vw;
  background: #2c2c2c;
  border-radius: 14px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.lang-menu li {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 22px;
  color: #d9d9d9;
  font: 500 24px/1.2 Inter, system-ui;
  transition: background 0.15s ease, color 0.15s ease;
  border-radius: 12px;
  margin: 4px 10px;
}
.lang-menu li img {
  width: 36px;
  height: 24px;
  object-fit: cover;
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.3);
}
.lang-menu li:hover {
  background: #3a3a3a;
  color: #fff;
}
.lang-menu li.selected {
  background: #444;
  color: #fff;
  outline: 2px solid rgba(255, 255, 255, 0.06);
}
