/**
 * 语言切换器样式
 * 国旗图标 + 下拉菜单
 */

.lang-switcher {
  position: relative;
  display: inline-block;
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: white;
  border: 1.5px solid rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
}

.lang-btn:hover {
  border-color: rgba(0, 0, 0, 0.2);
  background: #FAFAF9;
  transform: translateY(-1px);
}

.lang-current-flag {
  font-size: 18px;
  line-height: 1;
}

.lang-arrow {
  font-size: 10px;
  color: #6B6B6B;
  transition: transform 0.2s ease;
}

/* 箭头旋转效果 - 通过 JS 添加 .open 类实现，兼容更多浏览器 */
.lang-switcher.open .lang-arrow {
  transform: rotate(180deg);
}

.lang-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 150px;
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  z-index: 1001;
  overflow: hidden;
}

.lang-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.lang-option:hover {
  background: linear-gradient(135deg, rgba(233, 122, 91, 0.08) 0%, rgba(214, 90, 61, 0.08) 100%);
}

.lang-option.active {
  background: linear-gradient(135deg, rgba(233, 122, 91, 0.12) 0%, rgba(214, 90, 61, 0.12) 100%);
}

.lang-option.active .lang-name {
  color: #D65A3D;
  font-weight: 600;
}

.lang-flag {
  font-size: 20px;
  line-height: 1;
}

.lang-name {
  font-size: 14px;
  color: #1F1F1F;
  font-weight: 500;
}

/* 响应式适配 */
@media (max-width: 768px) {
  .lang-btn {
    padding: 6px 10px;
  }
  
  .lang-current-flag {
    font-size: 16px;
  }
  
  .lang-dropdown {
    min-width: 140px;
  }
  
  .lang-option {
    padding: 10px 14px;
  }
}

/* Dashboard 页面特殊样式 - 与其他按钮保持一致 */
.header-right .lang-switcher .lang-btn {
  padding: 10px 16px;
  border-radius: 10px;
}

/* Landing 页面导航栏特殊样式 */
.navbar-nav .lang-switcher .lang-btn {
  padding: 8px 14px;
}
