.language-switcher {
  position: relative;
  display: inline-block;
  z-index: 100;
}

/* CURRENT LANGUAGE BUTTON */
.language-button {
  display: inline-flex;
  align-items: center;
  background-color: #4263eb;
  color: white;
  border-radius: 999px;
  padding: 6px 12px;
  font-weight: bold;
  font-family: sans-serif;
  gap: 8px;
  text-decoration: none;
  cursor: pointer;
}

/* FLAG */
.flag {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
}

.flag img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lang-code {
  font-size: 14px;
}

/* DROPDOWN WRAPPER */
.dropdown {
  position: absolute;
  top: calc(100% + 2px); /* slight overlap */
  left: 0;
  display: none;
  flex-direction: column;
  background-color: #fff;
  border: 2px solid #4263eb;
  border-radius: 10px;
  padding: 16px;
  min-width: 120px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  z-index: 101;
}

/* Triangle pointer */
.dropdown::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 20px;
  border-width: 0 8px 8px 8px;
  border-style: solid;
  border-color: transparent transparent #4263eb transparent;
}

/* Dropdown Items */
.dropdown .language-button {
  background-color: transparent;
  color: #333;
  padding: 8px;
  border-radius: 0;
  gap: 8px;
}

.dropdown .language-button:hover {
  background: #f5f5f5;
}

/* Fix the hover gap issue */
.language-switcher:hover .dropdown,
.language-switcher .dropdown:hover {
  display: flex;
}
