/* ===== Language switch (custom dropdown) ===== */
/* 우측 상단 고정 + 이 요소를 절대배치 기준으로 사용 */
.lang-switch {
  position: fixed; /* 스크롤해도 오른쪽 상단 유지; 필요시 absolute 로 변경 가능 */
  right: 20px;
  top: 16px;
  z-index: 1000;
  font-family: Nunito, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
}
/* 드롭다운의 직접 부모(form)를 기준 컨테이너로 지정 + 폭을 버튼에 맞춤 */
.lang-switch form {
  position: relative; /* ↓ .lang-menu 의 absolute 기준 */
  display: inline-block; /* 컨텐츠(버튼) 폭만큼만 차지 → 목록도 동일 폭 */
}

/* 버튼 */
.lang-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 36px;
  min-width: 120px;
  padding: 0 10px 0 18px;
  border-radius: 9999px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
  color: #334155;
  font-size: 14px;
  font-weight: 700;
  line-height: 36px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(30, 58, 138, 0.1), 0 2px 6px rgba(15, 23, 42, 0.04);
  outline: none;
  user-select: none;
}
.lang-btn:hover {
  border-color: rgba(78, 115, 223, 0.45);
}
.lang-btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(78, 115, 223, 0.28), 0 8px 24px rgba(30, 58, 138, 0.1), 0 2px 6px rgba(15, 23, 42, 0.04);
}

/* 화살표 */
.caret {
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 7px solid #4e73df;
  transition: transform 0.15s ease;
}
.lang-switch.open .caret {
  transform: rotate(180deg);
}

/* 드롭다운 메뉴: 버튼 바로 아래, 버튼 폭과 동일 */
.lang-menu {
  position: absolute;
  left: 0;
  right: 0; /* ← 버튼 폭과 동일해짐 */
  min-width: 100%; /* 안전장치 */
  margin-top: 8px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 12px;
  box-shadow: 0 18px 40px rgba(2, 8, 23, 0.18), 0 2px 8px rgba(2, 8, 23, 0.06);
  padding: 6px 8px;
  box-sizing: border-box;
  overflow: hidden;
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.lang-switch.open .lang-menu {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* 옵션 아이템 */
.lang-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  margin: 4px 0;
  padding: 0 12px;
  width: 100%;
  color: #0f172a;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  outline: none;
  border-radius: 8px;
  transition: background 0.12s ease, box-shadow 0.12s ease, opacity 0.12s ease;
}

/* 선택된 항목(항상 옅은 표시 + 점) */
.lang-item.is-active {
  background: rgba(15, 23, 42, 0.06);
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.12);
}
/* 점(왼쪽 원) 제거 */
.lang-item.is-active::before {
  display: none;
}

/* Hover/Focus: 선택항목 포함 동일하게 강조 */
.lang-item:hover,
.lang-item:focus {
  background: rgba(15, 23, 42, 0.14);
  box-shadow: inset 0 0 0 1.5px rgba(15, 23, 42, 0.22);
}
.lang-item.is-active:hover::before,
.lang-item.is-active:focus::before {
  background: rgba(15, 23, 42, 0.65);
}
