.ciwi_container {
  width: 200px; /* 窄一些 */
  /* left: 20px; */
  bottom: 60px;
  right: auto;
  top: auto;
  position: fixed; /* 改为相对屏幕的位置 */
  height: auto;
  display: block;
  z-index: 9999;
}

.main_box {
  position: relative;
  background: #fff;
  padding: 10px;
  border-radius: 5px;
  border: 1px solid rgb(217, 217, 217);
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center; /* 垂直居中 */
  gap: 8px;
  height: 40px; /* 明确设置高度 */
}

.main_box_text {
  display: inline-block;
  line-height: 20px; /* 与图片高度一致 */
  vertical-align: middle;
  margin: 0;
  padding: 0;
  font-size: 14px; /* 明确设置字体大小 */
}

.mainarrow_icon {
  position: absolute;
  right: 0; /* 改用右侧固定距离 */
  transition: transform 0.3s ease; /* 平滑过渡 */
  width: 25% !important;
  height: 25% !important;
}

.button_wrapper {
  display: flex; /* 启用 Flexbox 布局 */
  align-items: center; /* 垂直居中按钮 */
  width: 100%; /* 使容器占满父元素的宽度 */
}

.language_title,
.currency_title {
  margin-bottom: 5px;
  font: weight 600px;
}

/* 确认按钮 */
.ciwi_switcher_confirm_button {
  height: 40px;
  width: 100%;
  border-radius: 6px; /* 边框圆角 */
  padding: 12px; /* 按钮内边距 */
  font-size: 14px; /* 字体大小 */
  background-color: #000; /* 按钮背景颜色 */
  color: white; /* 字体颜色 */
  border: none; /* 去掉默认边框 */
  cursor: pointer; /* 鼠标指针样式 */
  transition:
    background-color 0.3s,
    transform 0.2s ease; /* 增加过渡效果 */
}

.ciwi_switcher_confirm_button:hover {
  background-color: #333
}

.ciwi_switcher_confirm_button:active {
  transform: scale(0.98); /* 点击时的反馈效果，按钮缩小 */
}

.select-wrapper {
  display: flex;
  align-items: center;
  position: relative;
  margin-bottom: 10px;
}

.arrow_icon {
  width: 25% !important;
  height: 25% !important;
  border: 0 !important;
  display: flex;
  position: absolute;
  right: 5%; /* 箭头图标右对齐 */
  pointer-events: none; /* 防止图标影响选择框的点击 */
  transition: transform 0.3s ease; /* 平滑过渡 */
}

.ciwi_select {
  height: 50px; /* 设置高度 */
  border-radius: 4px; /* 边框圆角 */
  padding: 4px 15px; /* 内边距 */
  font-size: 14px; /* 字体大小 */
  width: 100%;
  border: 1px solid rgb(217, 217, 217); /* 边框颜色 */
  background-color: #fff; /* 背景颜色 */
  color: #333; /* 字体颜色 */
  appearance: none; /* 去除默认箭头 */
  cursor: pointer; /* 鼠标指针 */
  transition: border-color 0.3s ease; /* 边框颜色过渡效果 */
  -webkit-appearance: none;
  -moz-appearance: none;
}

/* 在 hover 状态下改变边框颜色 */
.ciwi_select:hover {
  border-color: rgb(97, 181, 53); /* 鼠标悬停时的边框颜色 */
}

.ciwi_select:focus {
  outline: none;

  border-color: rgb(97, 181, 53); /* 鼠标悬停时的边框颜色 */
}

.mobile_trans_img {
  display: none;
}

@media (max-width: 768px) {
  .ciwi_container {
    position: fixed;
    bottom: 60px;
    left: 0;
    width: 50px; /* 只显示左边 50px */
    background-color: transparent;
    transition: width 0.3s ease; /* 宽度变化时使用过渡效果 */
    z-index: 9999;
    display: block; /* 默认为显示，可以根据需求修改 */
    height: 50px; /* 设置高度 */
  }

  .ciwi_container.expanded {
    width: 200px; /* 展开后显示完整内容 */
  }

  .arrow_icon,
  .mainarrow_icon,
  .main_box_text,
  .main_box_flag {
    display: none;
  }

  /* 展开时显示选择器框在 ciwi_container 上方 */
  .ciwi_container.expanded #selector-box {
    display: block; /* 选择器框可见 */
    position: absolute;
    top: -182px; /* 将选择器框置于 ciwi_container 之上 */
    width: 100%;
  }

  .main_box {
    padding: 0%;
    border: 0;
    background-color: transparent !important;
  }

  .mobile_trans_img {
    display: block;
  }
}

body > .skiptranslate {
  display: none;
}
.goog-logo-link {
  display: none !important;
}
.goog-te-gadget {
  color: transparent !important;
}
.goog-te-banner-frame.skiptranslate {
  display: none !important;
}
a[href="https://translate.google.com"]
{
  display: none !important;
}
.goog-te-gadget-simple {
  visibility: hidden !important;
}
[class^="VIpgJd-"], /* 匹配所有以 'VIpgJd-' 开头的类名 */
[class*="VIpgJd-"] {
  /* 匹配所有包含 'VIpgJd-' 的类名 */
  display: none !important;
}

.custom-selector {
  position: relative;
  width: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, sans-serif;
}

.selector-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  margin-bottom: 10px;
  height: 40px;
}

.selected-option {
  display: flex;
  align-items: center;
  gap: 8px;
}

.country-flag {
  width: 30px;
  height: 20px;
  object-fit: cover;
  border-radius: 2px;
  border: 1px solid #ddd;
  min-width: 30px; /* 保持最小宽度 */
  opacity: 0; /* 初始状态完全透明 */
  transition: opacity 0.3s ease; /* 平滑过渡效果 */
}

/* 当图片加载完成时显示 */
.country-flag[src]:not([src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"])
{
  opacity: 1;
}

.arrow-icon {
  font-size: 12px;
  transition: transform 0.2s;
}

.custom-selector.open .arrow-icon {
  transform: rotate(180deg);
}

.options-container {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 4px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  display: none;
  z-index: 1000;
}

.custom-selector.open .options-container {
  display: block;
}

.options-list {
  max-height: 135px;
  overflow-y: auto;
}

.option-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.option-item:hover {
  background-color: #f5f5f5;
}

.option-item.selected {
  background-color: #f0f0f0;
}

.currency-code {
  color: #666;
  font-size: 0.9em;
}

/* 滚动条样式 */
.options-list::-webkit-scrollbar {
  width: 6px;
}

.options-list::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.options-list::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 3px;
}

.options-list::-webkit-scrollbar-thumb:hover {
  background: #555;
}
