/* language-selector.css - 语言选择器样式 */
.language-selector {
  position: relative;
  display: flex;
  align-items: center;
  margin-right: 15px;
  font-family: 'Segoe UI', Arial, sans-serif;
  font-size: 14px;
  z-index: 1100; /* 确保语言选择器显示在最上层 */
}

.current-language {
  display: flex;
  align-items: center;
  background-color: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  padding: 8px 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.current-language:hover {
  background-color: rgba(255, 255, 255, 0.25);
}

.arrow-icon {
  margin-left: 8px;
  font-size: 10px;
  transition: transform 0.2s ease;
  color: rgba(255, 255, 255, 0.9);
}

.language-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 5px;
  background-color: white;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  width: 150px; /* 更宽一些，以容纳泰语文字 */
  z-index: 1100;
}

.language-dropdown.show {
  display: block;
  animation: fadeIn 0.2s ease;
}

.language-option {
  display: flex;
  align-items: center;
  padding: 12px 15px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  color: #333;
}

.language-option:hover {
  background-color: #f5f7fa;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 导航栏滚动后的样式 */
.navbar-scrolled .current-language {
  color: #333;
  background-color: rgba(37, 99, 235, 0.1);
  border-color: rgba(37, 99, 235, 0.3);
}

.navbar-scrolled .arrow-icon {
  color: #666;
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
  .language-dropdown {
    background-color: rgb(40, 44, 52);
    border: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  .language-option {
    color: #f0f0f0;
  }
  
  .language-option:hover {
    background-color: rgb(50, 54, 62);
  }
  
  .navbar-scrolled .current-language {
    color: #f0f0f0;
    background-color: rgba(255, 255, 255, 0.1);
  }
  
  .navbar-scrolled .arrow-icon {
    color: #bbb;
  }
}

/* 移动端样式调整 */
@media (max-width: 768px) {
  .language-selector {
    margin-right: 8px;
    order: -1; /* 在移动设备上将语言选择器放在最前面 */
  }
  
  .current-language {
    padding: 6px 8px;
    font-size: 13px;
  }
  
  .language-dropdown {
    width: 130px;
    right: -5px; /* 调整下拉位置 */
  }
  
  .language-option {
    padding: 10px 12px;
  }
}

/* 确保在小屏幕设备上也能显示 */
@media (max-width: 480px) {
  .navbar-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .language-selector {
    margin: 5px;
    order: -1;
  }
} 