/* Vionix Labs language switcher */
.lang-switcher {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-right: 10px;
  z-index: 9999;
}

.lang-selected {
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  padding: 5px 10px 5px 8px;
  border-radius: 6px;
  border: 1px solid rgba(6, 5, 11, 0.15);
  background: transparent;
  transition: all 0.2s;
  font-size: 22px;
  line-height: 1;
  user-select: none;
}

.lang-selected:hover {
  background: rgba(6, 5, 11, 0.06);
  border-color: rgba(6, 5, 11, 0.25);
}

.lang-caret {
  font-size: 9px;
  opacity: 0.45;
  margin-left: 1px;
  font-style: normal;
  line-height: 1;
}

.lang-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.13);
  border: 1px solid rgba(0, 0, 0, 0.07);
  overflow: hidden;
  min-width: 150px;
  z-index: 99999;
}

.lang-dropdown.open {
  display: block;
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: #06050b;
  text-decoration: none;
  transition: background 0.15s;
  white-space: nowrap;
  border: none;
  background: none;
  width: 100%;
}

.lang-option:hover {
  background: rgba(6, 5, 11, 0.05);
  color: #06050b;
}

.lang-option.lang-active {
  background: rgba(6, 5, 11, 0.06);
  font-weight: 700;
}

.lang-option.lang-active::after {
  content: "✓";
  margin-left: auto;
  font-size: 12px;
  opacity: 0.5;
}

/* Mobile drawer placement */
.lang-switcher--drawer {
  display: flex;
  justify-content: flex-start;
  margin: 0;
  padding: 8px 40px 16px;
  width: 100%;
  box-sizing: border-box;
}

.lang-switcher--drawer .lang-dropdown {
  left: 40px;
  right: auto;
}

/* Compact in mobile header bar */
@media (max-width: 1299px) {
  .header-button .lang-switcher:not(.lang-switcher--drawer) {
    display: inline-flex !important;
    margin-right: 6px;
  }

  .header-button .lang-switcher:not(.lang-switcher--drawer) .lang-selected {
    padding: 4px 8px;
  }
}

@media (max-width: 575px) {
  /* On very small screens, use drawer only to avoid crowding the header */
  .header-button .lang-switcher:not(.lang-switcher--drawer) {
    display: none !important;
  }
}
