/* Luna SEO language switcher styles */
.luna-lang-switcher {
  position: relative;
  display: inline-block;
  font-family: inherit;
}

.luna-lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: var(--surface, #ffffff);
  color: var(--text, #1a1a2e);
  border: 1px solid var(--border, #e5e5ea);
  border-radius: 12px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.luna-lang-btn:hover {
  background: var(--bg, #fafafa);
  border-color: var(--muted, #636366);
}
.luna-lang-btn:focus-visible {
  outline: 2px solid var(--accent, #e8a0bf);
  outline-offset: 2px;
}

.luna-lang-flag {
  font-size: 16px;
  line-height: 1;
}

.luna-lang-current {
  white-space: nowrap;
}

.luna-lang-caret {
  font-size: 10px;
  color: var(--muted, #636366);
  transition: transform 0.15s ease;
}
.luna-lang-btn[aria-expanded="true"] .luna-lang-caret {
  transform: rotate(180deg);
}

.luna-lang-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 220px;
  max-height: 380px;
  overflow-y: auto;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--surface, #ffffff);
  border: 1px solid var(--border, #e5e5ea);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  z-index: 1000;
}

.luna-lang-menu li {
  list-style: none;
}

.luna-lang-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--text, #1a1a2e);
  text-decoration: none;
  font-size: 14px;
  line-height: 1.3;
  transition: background 0.1s ease;
}
.luna-lang-item:hover {
  background: var(--bg, #fafafa);
}
.luna-lang-item.is-current {
  background: rgba(232, 160, 191, 0.12);
  font-weight: 600;
}

.luna-lang-native {
  flex: 1;
  font-weight: 500;
}
.luna-lang-label {
  color: var(--muted, #636366);
  font-size: 12px;
}

/* Hub footer position */
.luna-hub-lang-switch {
  display: flex;
  justify-content: center;
  padding: 24px 0;
  border-top: 1px solid var(--border, #e5e5ea);
  margin-top: 32px;
}
.luna-hub-lang-switch .luna-lang-menu {
  right: auto;
  left: 50%;
  transform: translateX(-50%);
}

@media (prefers-color-scheme: dark) {
  .luna-lang-btn {
    background: var(--surface, #3a3a3c);
    color: var(--text, #f2f2f7);
    border-color: var(--border, #48484a);
  }
  .luna-lang-menu {
    background: var(--surface, #3a3a3c);
    border-color: var(--border, #48484a);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  }
  .luna-lang-item {
    color: var(--text, #f2f2f7);
  }
  .luna-lang-item:hover {
    background: rgba(255, 255, 255, 0.06);
  }
  .luna-lang-item.is-current {
    background: rgba(240, 184, 208, 0.18);
  }
}
