/* MegaGrain-style custom language UI */

.language-container {
  position: relative;
  display: inline-block;
  z-index: 9999;
  direction: ltr;
  unicode-bidi: isolate;
}
.language-container svg{
    width: 20px;
    fill: #fff;
}
.language-switcher {
  display: flex;
  align-items: center;
  gap: 6px;
  border: none;
  color: #fff;
  background: #ec525e;
  cursor: pointer;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
}

.language-switcher:hover {
  filter: brightness(0.95);
}

.language-switcher i {
  font-size: 14px;
}

.language-menu {
  display: none;
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  left: auto;
  width: 200px;
  max-width: calc(100vw - 20px);
  box-sizing: border-box;
  padding: 8px;
  background: #f7f2e8;
  border: 1px solid #d5c7ad;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.13);
  z-index: 9999;
  direction: ltr;
  unicode-bidi: isolate;
}

.language-menu.active {
  display: block;
}

.language-list button {
  display: block;
  width: 100%;
  padding: 12px;
  border: 0;
  background: transparent;
  color: #29302a;
  text-align: left;
  cursor: pointer;
  font-size: 14px;
}

.language-list button:hover {
  background: #ec525e;
  color: #fff;
}

.language-menu p {
  border-top: 1px solid #d5c7ad;
  padding: 10px 4px 0;
  margin: 6px 0 0;
  font-size: 11px;
  color: #666;
}

/* Hide default GTranslate select */
.gtranslate_wrapper,
.gt_selector,
#google_translate_element,
.goog-te-banner-frame,
.goog-logo-link,
.goog-te-gadget {
  display: none !important;
}

.goog-te-banner-frame.skiptranslate,
iframe.skiptranslate {
  display: none !important;
  visibility: hidden !important;
}

body {
  top: 0 !important;
}

/* Optional: change button color for your brand */
/* .language-switcher { background: #0d6efd; } */
/* .language-list button:hover { background: #0d6efd; } */
