/*!
 * 大一CMS - 前台多语言自动翻译组件样式 v1.0
 * 右下角浮动语言切换栏，与原站蓝色调一致
 */
#dayi-lang-widget {
  position: fixed;
  right: 16px;
  bottom: 96px;
  z-index: 99999;
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.4;
  -webkit-user-select: none;
  user-select: none;
}

/* 折叠按钮 */
#dayi-lang-widget .dayi-lang-btn {
  display: -webkit-box;
  display: flex;
  -webkit-box-align: center;
  align-items: center;
  gap: 5px;
  height: 38px;
  padding: 0 14px;
  border: none;
  border-radius: 19px;
  background: -webkit-linear-gradient(135deg, #1e6fff, #0b4fd6);
  background: linear-gradient(135deg, #1e6fff, #0b4fd6);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(30, 111, 255, .35);
  -webkit-transition: -webkit-transform .2s, box-shadow .2s;
  transition: transform .2s, box-shadow .2s;
}
#dayi-lang-widget .dayi-lang-btn:hover {
  -webkit-transform: translateY(-2px);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(30, 111, 255, .45);
}
#dayi-lang-widget .dayi-lang-btn.dayi-lang-busy {
  opacity: .75;
  cursor: wait;
}

/* 展开面板 */
#dayi-lang-widget .dayi-lang-panel {
  display: none;
  position: absolute;
  right: 0;
  bottom: 46px;
  width: 460px;
  max-width: calc(100vw - 32px);
  max-height: 70vh;
  background: #fff;
  border: 1px solid #e3e9f2;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(15, 40, 90, .18);
  overflow: hidden;
}
#dayi-lang-widget .dayi-lang-panel.dayi-lang-open {
  display: block;
  -webkit-animation: dayiLangIn .18s ease-out;
  animation: dayiLangIn .18s ease-out;
}
@-webkit-keyframes dayiLangIn {
  from { opacity: 0; -webkit-transform: translateY(8px); }
  to   { opacity: 1; -webkit-transform: translateY(0); }
}
@keyframes dayiLangIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

#dayi-lang-widget .dayi-lang-head {
  padding: 12px 16px;
  background: -webkit-linear-gradient(135deg, #1e6fff, #0b4fd6);
  background: linear-gradient(135deg, #1e6fff, #0b4fd6);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
}

/* 语言列表 */
#dayi-lang-widget .dayi-lang-list {
  list-style: none;
  margin: 0;
  padding: 8px 12px 12px;
  max-height: calc(70vh - 100px);
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px 6px;
}
#dayi-lang-widget .dayi-lang-list::-webkit-scrollbar {
  width: 6px;
}
#dayi-lang-widget .dayi-lang-list::-webkit-scrollbar-thumb {
  background: #c6d4ea;
  border-radius: 3px;
}
#dayi-lang-widget .dayi-lang-list li {
  display: -webkit-box;
  display: flex;
  -webkit-box-align: center;
  align-items: center;
  -webkit-box-pack: justify;
  justify-content: space-between;
  gap: 4px;
  padding: 7px 8px;
  border-radius: 6px;
  cursor: pointer;
  color: #334;
  -webkit-transition: background .15s, color .15s;
  transition: background .15s, color .15s;
  white-space: nowrap;
  overflow: hidden;
}
#dayi-lang-widget .dayi-lang-list li:hover {
  background: #eef4ff;
  color: #0b4fd6;
}
#dayi-lang-widget .dayi-lang-list li.dayi-lang-active {
  background: #1e6fff;
  color: #fff;
}
#dayi-lang-widget .dayi-lang-name {
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
}
#dayi-lang-widget .dayi-lang-tip {
  font-size: 11px;
  color: #98a2b3;
  flex-shrink: 0;
}
#dayi-lang-widget .dayi-lang-list li.dayi-lang-active .dayi-lang-tip {
  color: rgba(255, 255, 255, .85);
}

/* 状态提示 */
#dayi-lang-widget .dayi-lang-status {
  padding: 6px 16px 12px;
  font-size: 12px;
  color: #666;
  text-align: center;
}

/* 移动端：面板占满宽度 */
@media (max-width: 640px) {
  #dayi-lang-widget {
    right: 10px;
    bottom: 84px;
  }
  #dayi-lang-widget .dayi-lang-list {
    grid-template-columns: repeat(2, 1fr);
  }
  #dayi-lang-widget .dayi-lang-panel {
    width: calc(100vw - 24px);
  }
}
