/* EMT i18n - Language Selector */

/* ── Dropdown wrapper ── */
.emt-i18n-wrap {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
}

.emt-i18n-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 6px;
  padding: 5px 10px;
  cursor: pointer;
  color: rgba(255,255,255,0.85);
  font-size: 0.8125rem;
  font-family: inherit;
  transition: all 0.2s;
  white-space: nowrap;
}
.emt-i18n-btn:hover {
  border-color: rgba(255,255,255,0.35);
  background: rgba(255,255,255,0.06);
}
.emt-i18n-chevron {
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid currentColor;
  margin-left: 2px;
  transition: transform 0.2s;
}
.emt-i18n-wrap.open .emt-i18n-chevron {
  transform: rotate(180deg);
}

/* ── Dropdown menu ── */
.emt-i18n-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 150px;
  background: rgba(11, 21, 38, 0.97);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  padding: 6px 0;
  box-shadow: 0 12px 32px rgba(0,0,0,0.4);
  backdrop-filter: blur(12px);
}
.emt-i18n-wrap.open .emt-i18n-dropdown {
  display: block;
}
.emt-i18n-dropdown a {
  display: block;
  padding: 8px 16px;
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  font-size: 0.8125rem;
  cursor: pointer;
  transition: all 0.15s;
}
.emt-i18n-dropdown a:hover {
  background: rgba(255,255,255,0.08);
  color: #f0f0f0;
}
.emt-i18n-dropdown a.active {
  color: #4CC9F0;
  font-weight: 600;
}

/* ── Mobile native select (next to hamburger) ── */
.emt-i18n-mobile-select {
  display: none;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 6px;
  padding: 6px 8px;
  height: 36px;
  flex-shrink: 0;
  margin-right: 8px;
  color: rgba(255,255,255,0.85);
  font-size: 0.8125rem;
  font-family: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='rgba(255,255,255,0.6)'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  padding-right: 24px;
}
@media (max-width: 768px) {
  .emt-i18n-mobile-select { display: block; }
  .emt-i18n-wrap { display: none; }
}
.emt-i18n-mobile-select option {
  background: #0B1526;
  color: #e0e0e0;
}

/* ── Mobile grid inside hamburger menu ── */
.emt-i18n-mobile {
  padding: 12px 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
  margin-top: 8px;
}
.emt-i18n-mobile .emt-i18n-mobile-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255,255,255,0.4);
  margin-bottom: 8px;
}
.emt-i18n-mobile .emt-i18n-mobile-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.emt-i18n-mobile .emt-i18n-mobile-grid a {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  cursor: pointer;
  transition: all 0.15s;
}
.emt-i18n-mobile .emt-i18n-mobile-grid a:hover {
  background: rgba(255,255,255,0.1);
}
.emt-i18n-mobile .emt-i18n-mobile-grid a.active {
  background: rgba(76,201,240,0.15);
  border-color: rgba(76,201,240,0.4);
  color: #4CC9F0;
}

/* ── RTL adjustments ── */
html[dir="rtl"] .emt-i18n-dropdown { right: auto; left: 0; }
html[dir="rtl"] .nav-inner { flex-direction: row-reverse; }
html[dir="rtl"] .nav-links { flex-direction: row-reverse; }
