/* =========================================================
   Modern Language Selector – Single Improved CSS
   ========================================================= */

/* Container */
.custom-translate-container {
  display: inline-block;
  vertical-align: middle;
  position: relative;
  margin-left: 10px;
  margin-right: 10px;
  font-family: inherit;
  
}


/* Button */
.custom-translate-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #1f2933;

  max-width: 25px;
  padding: 5px 40px 5px 10px !important;

  font-size: 12.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;

  border-radius: 8px;
  cursor: pointer;
  outline: none;

  transition: all 0.25s ease;
 
  position: relative;
}

/* Globe icon support */
.custom-translate-btn i {
  font-size: 15px;
  color: #6b7280;
}

/* Current language code */
.custom-translate-btn .lang-code {
  margin-left: auto;
  font-weight: 700;
  color: #2563eb;
}

/* Hover */
.custom-translate-btn:hover {
  background: #f8fafc;
  border-color: #2563eb;
  color: #2563eb;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
  transform: translateY(-1px);
}

/* Active (opened) */
.custom-translate-btn.active {
  background: #2563eb;
  color: #ffffff;
  border-color: #1d4ed8;
}

.custom-translate-btn.active i,
.custom-translate-btn.active .lang-code {
  color: #ffffff;
}

/* Focus (keyboard accessibility) */
.custom-translate-btn:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

/* Arrow */
.custom-translate-btn::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid #6b7280;
  transition: 0.25s ease;
}

.custom-translate-btn.active::after {
  border-top-color: #ffffff;
  transform: translateY(-50%) rotate(180deg);
}

/* Dropdown */
.custom-translate-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;

  min-width: 200px;
  max-height: 300px;
  overflow-y: auto;

  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;

  z-index: 10001;
  padding: 6px 0;

  box-shadow:
    0 20px 30px rgba(0, 0, 0, 0.12),
    0 8px 12px rgba(0, 0, 0, 0.06);

  animation: dropdownFadeIn 0.18s ease-out;
  transform-origin: top right;
}

/* Dropdown animation */
@keyframes dropdownFadeIn {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Scrollbar */
.custom-translate-dropdown::-webkit-scrollbar {
  width: 6px;
}

.custom-translate-dropdown::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 6px;
}

.custom-translate-dropdown::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Language option */
.language-option {
  display: flex;
  align-items: center;
  gap: 10px;

  padding: 11px 16px;
  font-size: 13.5px;
  color: #1f2933;
  cursor: pointer;

  transition: all 0.18s ease;
  border-bottom: 1px solid #f1f5f9;
}

.language-option:last-child {
  border-bottom: none;
}

.language-option:hover {
  background: #f1f5f9;
  color: #2563eb;
  padding-left: 20px;
  text-decoration: none;
}

/* Active language */
.language-option.active {
  background: #3398dc;
  color: #ffffff;
  font-weight: 600;
  position: relative;
}

.language-option.active::before {
  content: "✔";
  position: absolute;
  right: 14px;
  font-size: 12px;
}

.language-option.active:hover {
  background: #3398dc;
  color: #ffffff;
}

/* Flags */
.language-flag {
  width: 20px;
  height: 14px;
  border-radius: 3px;
  object-fit: cover;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

/* Navbar alignment wrapper */
.language-selector-wrapper {
  display: flex;
  align-items: center;
  margin-left: 15px;
}

/* Divider before selector (desktop) */
.language-selector-wrapper::before {
  content: "";
  width: 1px;
  height: 20px;
  background: #e5e7eb;
  margin-right: 12px;
}

/* Hide Google Translate UI */
.goog-te-banner-frame,
.goog-te-menu-frame,
.goog-te-gadget,
.goog-te-gadget-simple,
.skiptranslate,
#google_translate_element > div {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  width: 0 !important;
  overflow: hidden !important;
  position: absolute !important;
}

body {
  top: 0 !important;
}

/* ===========================
   Responsive
   =========================== */

/* Mobile – show inside menu */
@media (max-width: 767px) {
  .custom-translate-container {
    display: none !important;
   

  }

  .custom-translate-btn {
    width: 100%;
    justify-content: space-between;
  }

  .language-selector-wrapper::before {
    display: none;
  }
}

/* Tablet */
@media (min-width: 768px) and (max-width: 992px) {
  .custom-translate-btn {
    min-width: 135px;
    font-size: 12px;
  }

  .language-selector-wrapper {
    margin-left: 10px;
  }
}

/* Desktop */
@media (min-width: 993px) {
  .custom-translate-btn {
    min-width: 150px;
  }
}



.custom-translate-btn:focus,
.custom-translate-btn:focus-visible,
.custom-translate-btn:active {
  outline: none;
  border-color: #474a4d;              /* light gray-blue */
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.25); /* soft blue ring */
}