/**
 * Locale Popup Styles
 * 弹窗式语言/地区/货币切换器样式
 * 样式参考：橙金色主题，圆角设计
 */

/* 触发器容器（包含图标和弹窗） */
.locale-popup-trigger {
  position: relative;
}

/* 弹窗容器 */
.locale-popup {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 99999;
  min-width: 280px;
  padding: 24px;
  margin-top: 8px;
  background-color: #fff;
  border-radius: 4px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition:
    opacity 0.2s ease,
    visibility 0.2s ease,
    transform 0.2s ease;
}

/* 悬停时显示弹窗 */
.locale-popup-trigger:hover .locale-popup,
.locale-popup-trigger:focus-within .locale-popup,
.locale-popup.is-active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* 弹窗顶部小三角（可选） */
.locale-popup::before {
  content: "";
  position: absolute;
  top: -6px;
  right: 16px;
  width: 12px;
  height: 12px;
  background-color: #fff;
  transform: rotate(45deg);
  box-shadow: -2px -2px 4px rgba(0, 0, 0, 0.05);
}

/* 弹窗内容 */
.locale-popup__content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* 字段组 */
.locale-popup__field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* 标签 */
.locale-popup__label {
  font-size: 14px;
  font-weight: 600;
  color: #c68635;
}

/* 下拉选择器包装 */
.locale-popup__select-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

/* 下拉选择器 */
.locale-popup__select {
  width: 100%;
  height: 48px;
  padding: 0 40px 0 16px;
  font-size: 14px;
  color: #333;
  background-color: #fff;
  border: 2px solid #c68635;
  border-radius: 12px;
  outline: none;
  cursor: pointer;
  appearance: none;
  transition: border-color 0.2s ease;
}

.locale-popup__select:hover,
.locale-popup__select:focus {
  border-color: #a56b28;
}

/* 下拉箭头 */
.locale-popup__select-arrow {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

.locale-popup__select-arrow svg {
  width: 16px;
  height: 16px;
}

/* 货币显示（只读） */
.locale-popup__currency-display {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 48px;
  padding: 0 16px;
  font-size: 14px;
  color: #333;
  background-color: #fff;
  border: 2px solid #c68635;
  border-radius: 12px;
}

/* 货币国旗图标 */
.locale-popup__currency-flag {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.locale-popup__currency-flag img {
  width: 100%;
  height: auto;
  border-radius: 2px;
}

/* 货币文本 */
.locale-popup__currency-text {
  flex: 1;
}

/* 提交按钮 */
.locale-popup__submit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 48px;
  margin-top: 8px;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  background-color: #c68635;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    transform 0.1s ease;
}

.locale-popup__submit-btn:hover {
  background-color: #a56b28;
}

.locale-popup__submit-btn:active {
  transform: scale(0.98);
}

/* 移动端隐藏（因为 top-bar 的 locale 按钮在移动端隐藏） */
@media (max-width: 959px) {
  .locale-popup {
    display: none;
  }
}
