/* web/css/i18n.css — 언어 선택기 및 다국어 공용 스타일 */

.lang-picker-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.lang-picker-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 38px;
  padding: 0 10px;
  border-radius: 9999px;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.lang-picker-btn:hover {
  background: var(--bg);
  border-color: var(--accent);
}

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

.lang-code {
  font-size: 12px;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.5px;
}

.lang-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 220px;
  max-height: 380px;
  overflow-y: auto;
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.12), 0 8px 10px -6px rgba(0, 0, 0, 0.08);
  padding: 6px;
  z-index: 100;
  display: none;
  flex-direction: column;
  gap: 2px;
  overscroll-behavior: contain;
}

.lang-dropdown.open {
  display: flex;
  animation: langFadeIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.lang-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s ease;
  width: 100%;
}

.lang-item:hover {
  background: #F3F4F6;
}

.lang-item.active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
}

.lang-item-flag {
  font-size: 18px;
  line-height: 1;
}

.lang-item-native {
  flex: 1;
  font-size: 13px;
}

.lang-item-name {
  font-size: 11px;
  color: var(--muted);
}

/* 모바일 화면 대응 */
@media (max-width: 480px) {
  .lang-picker-btn {
    padding: 0 8px;
    height: 36px;
  }
  .lang-code {
    display: none;
  }
}
