/* Custom Language Dropdown - Matched with Light Theme */
.lang-dropdown {
  position: relative;
  display: inline-block;
  user-select: none;
}

/* Nút trigger góc trên cùng dạng pill matching với nav-link */
.lang-dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1px solid transparent;
  color: #475569;
  padding: 6px 12px;
  border-radius: 9999px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.lang-dropdown-trigger:hover {
  background: #f1f5f9;
  color: #0f172a;
}

/* Trạng thái khi mở dropdown (Đồng bộ với nút Market đang active) */
.lang-dropdown.is-open .lang-dropdown-trigger {
  background: #e0edff;
  color: #1d4ed8;
}

/* Menu Dropdown dạng card trắng bo góc mềm */
.lang-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 170px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  padding: 6px;
  display: none;
  z-index: 1000;
}

.lang-dropdown.is-open .lang-dropdown-menu {
  display: block;
  animation: langFadeIn 0.15s ease-out;
}

@keyframes langFadeIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Item trong menu */
.lang-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  color: #475569;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  width: 100%;
  border: none;
  background: none;
  text-align: left;
  border-radius: 8px;
}

.lang-dropdown-item:hover {
  background: #f8fafc;
  color: #0f172a;
}

/* Item đang chọn: Hiển thị nền xanh nhạt + chữ xanh đậm giống menu "Equal weight index" */
.lang-dropdown-item.is-active {
  color: #1e3a8a;
  font-weight: 600;
  background: #e0edff;
}

.flag-icon {
  width: 20px;
  height: 14px;
  border-radius: 2px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.15);
}

.lang-caret {
  width: 14px;
  height: 14px;
  transition: transform 0.2s ease;
  stroke: currentColor;
}

.lang-dropdown.is-open .lang-caret {
  transform: rotate(180deg);
}