@charset "UTF-8";

/* 按钮 */
.ai-btn {
  border: 1px solid #cedffa;
  background: #fff;
  border-radius: 10px;
  justify-content: center;
  align-items: center;
  white-space: nowrap;
  height: 32px;
  padding: 0 6px 0 8px;
  display: flex;
  cursor: pointer;
  color: var(--theme-medium-text-color);
  transition: color 0.1s ease-in, border-color 0.15s ease, background 0.2s ease-in-out;
}

.ai-btn+.ai-btn {
  margin-left: 4px;
}

/* 圆形按钮样式 */
.ai-btn.ai-btn--circle {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 50%;
  justify-content: center;
}

/* 圆角按钮样式 */
.ai-btn.ai-btn--round {
  border-radius: 20px;
}

/* 纯图标按钮样式 */
.ai-btn.ai-btn--icon {
  border-color: transparent;
  border-image: initial;
  background: transparent;
  padding-left: 6px;
}

/* 纯图片按钮样式 */
.ai-btn.ai-btn--image .ai-btn__image {
  width: 18px;
  display: flex;
  justify-content: center;
}

.ai-btn.ai-btn--image .ai-btn__image img {
  width: 100%;
  height: 100%;
}

/* 图标+文字按钮样式  */
.ai-btn.ai-btn--icon-text .ai-btn__icon {
  font-size: 14px;
  margin-right: 4px;
}

.ai-btn.ai-btn--icon-text .ai-btn__icon i {
  font-size: inherit;
}

/* 带有switch的按钮样式 */
.ai-btn.ai-btn--switch {
  position: relative;
  font-size: 12px;
}

.ai-btn.ai-btn--switch .switch {
  display: inline-block;
  width: 24px;
  height: 14px;
  background: #ddd;
  border-radius: 9px;
  position: relative;
  margin: 0 4px;
  transition: background 0.3s;
  cursor: pointer;
}

.ai-btn.ai-btn--switch .switch::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  background: #fff;
  border-radius: 50%;
  top: 2px;
  left: 2px;
  transition: left 0.3s;
}

.ai-btn.ai-btn--switch.is-on .switch {
  background: var(--theme-primary-color);
}

.ai-btn.ai-btn--switch.is-on .switch::after {
  left: 12px;
}

/* 主题按钮样式 */
.ai-btn.ai-btn--primary {
  color: rgb(255, 255, 255);
  font-size: 14px;
  cursor: pointer;
  position: relative;
  width: 30px;
  height: 30px;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  border-width: initial;
  border-style: none;
  border-color: initial;
  border-image: initial;
  border-radius: 50%;
  padding: 0 12px;
  background: var(--theme-primary-color);
  transition: 0.2s;
}

/* 禁用样式 */
.ai-btn.is-disabled {
  opacity: 1;
  cursor: not-allowed;
  border-color: #eee;
  color: var(--theme-light-text-color);
}

/* 禁用主题样式 */
.ai-btn.ai-btn--primary.is-disabled {
  color: white;
  background: var(--theme-lighter-a-color);
}

/* 鼠标移入样式 */
.ai-btn:not(.is-disabled):hover {
  color: var(--theme-primary-color);
  border-color: var(--theme-lighter-a-color);
  background: rgb(242, 246, 254);
}

.ai-btn .ai-btn__text {
  font-weight: normal;
  line-height: 1;
  font-size: inherit;
  display: inline-flex;
}

.ai-btn .ai-btn__text em {
  color: var(--theme-primary-color);
  margin-left: 4px
}

.ai-btn .ai-btn__selected-text {
  font-weight: normal;
  line-height: 1.6;
  font-size: 12px;
}

/* 加载中样式 */
.ai-btn.is-loading .icon-loading {
  animation: rotating 2s linear infinite;
}

@keyframes rotating {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* 选中状态样式 */
.ai-btn.is-selected {
  color: var(--theme-primary-color);
  border-color: var(--theme-lighter-a-color);
  background: rgb(242, 246, 254);
}

/* 下拉框 */
.ai-dropdown-menu {
  display: none;
  position: fixed;
  top: 30px;
  z-index: 99;
  box-sizing: border-box;
  box-shadow: rgba(0, 0, 0, 0.2) 0px 0px 1px,
    rgba(0, 0, 0, 0.02) 0px 0px 4px, rgba(0, 0, 0, 0.08) 0px 12px 20px;
  max-width: calc(100% - 10px);
  padding: 8px;
  border-radius: 10px;
  background: rgb(255, 255, 255);
  overflow: hidden;
}

.ai-dropdown-menu.position-above {
  animation: SlideInBottom 0.2s cubic-bezier(0.22, 0.61, 0.36, 1);
  transform-origin: bottom;
}

.ai-dropdown-menu.position-below {
  animation: SlideInTop 0.2s cubic-bezier(0.22, 0.61, 0.36, 1);
  transform-origin: top;
}

@keyframes SlideInTop {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes SlideInBottom {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}