@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.ai-btn--primary:not(.is-disabled):hover {
  color: white;
  border-color: var(--theme-primary-color);
  background: var(--theme-primary-color);
  opacity: 0.8;
}

/* 禁用样式 */
.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);
  }
}

/* 弹窗  */
.ai-dialog {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  margin: auto;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  max-width: 90vw;
  min-width: 320px;
  width: fit-content;
  height: fit-content;
  opacity: 0;
  transform: translateY(-12px) scale(0.98);
  transform-origin: center;
  visibility: hidden;
  pointer-events: none;
  will-change: opacity, transform;
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.2, 0.6, 0.2, 1), visibility 0s linear 0.25s;
}

.ai-dialog.ai-dialog--show {
  opacity: 1;
  transform: translateY(0) scale(1);
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.2, 0.6, 0.2, 1);
}

.ai-dialog-mask {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0s linear 0.25s;
}

.ai-dialog-mask.ai-dialog-mask--show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.25s ease;
}

.ai-dialog__container {
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  max-width: 90vw;
}

/* 头部 */
.ai-dialog__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-bottom: 1px solid #ededed;
  flex-shrink: 0;
  gap: 8px;
}

.ai-dialog__title {
  margin: 0;
  font-size: 16px;
  font-weight: bold;
  color: #333;
  line-height: 20px;
  flex-shrink: 0;
}

.ai-dialog__header-right {
  display: flex;
  align-items: center;
}

.ai-dialog__logo {
  display: inline-flex;
  height: 20px;
  margin-left: auto;
}

.ai-dialog__logo img {
  height: 100%;
}

.ai-dialog__close {
  cursor: pointer;
  font-size: 20px;
  color: #999;
  transition: color 0.2s;
  flex-shrink: 0;
  margin-left: 8px;
}

/* 内容区域 */
.ai-dialog__body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 10px;
}

/* 底部 */
.ai-dialog__footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  padding: 12px 20px;
  border-top: 1px solid #f0f0f0;
  flex-shrink: 0;
}

.ai-dialog__footer .ai-btn {
  min-width: 80px;
  justify-content: center;
}


.ai-dialog__btn--cancel {
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 8px 12px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 14px;
  font-weight: 400;
}

.ai-btn.ai-dialog__btn--confirm {
  color: #fff;
  background: var(--theme-primary-color);
  border-radius: 4px;
  border: 0;
  padding: 8px 12px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 14px;
  font-weight: 400;
}

.ai-btn.ai-dialog__btn--confirm.is-disabled,
.ai-btn.ai-dialog__btn--confirm.is-disabled:hover,
.ai-btn.ai-dialog__btn--confirm.is-disabled:active {
  background: #cacaca;
}

.ai-btn.ai-dialog__btn--cancel:hover {
  color: var(--theme-primary-color);
  border-color: var(--theme-lighter-a-color);
  background: var(--theme-lighter-color);
}

.ai-btn.ai-dialog__btn--confirm:hover {
  color: #fff;
  background: color-mix(in srgb, var(--theme-primary-color) 80%, transparent);
  border-color: color-mix(in srgb, var(--theme-primary-color) 80%, transparent);
}

/* Input 输入框 */
.ai-input {
  position: relative;
  font-size: 14px;
  display: inline-block;
  width: 100%;
}

.ai-input__inner {
  -webkit-appearance: none;
  background-color: #fff;
  background-image: none;
  border-radius: 4px;
  border: 1px solid #dcdfe6;
  box-sizing: border-box;
  color: #606266;
  display: inline-block;
  font-size: inherit;
  height: 32px;
  line-height: 32px;
  outline: none;
  padding: 0 15px;
  transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
  width: 100%;
}

.ai-input__inner::placeholder {
  color: #c0c4cc;
}

.ai-input__inner:hover {
  border-color: #c0c4cc;
}

.ai-input__inner:focus {
  outline: none;
  border-color: var(--theme-primary-color);
}

.ai-input.is-active .ai-input__inner {
  outline: none;
  border-color: var(--theme-primary-color);
}

.ai-input.is-disabled .ai-input__inner {
  background-color: #f5f7fa;
  border-color: #e4e7ed;
  color: #c0c4cc;
  cursor: not-allowed;
}

.ai-input.is-disabled .ai-input__inner::placeholder {
  color: #c0c4cc;
}

.ai-input.is-disabled .ai-input__icon {
  cursor: not-allowed;
}

/* 带图标的输入框 */
.ai-input--suffix .ai-input__inner {
  padding-right: 30px;
}

.ai-input--prefix .ai-input__inner {
  padding-left: 30px;
}

.ai-input__suffix {
  position: absolute;
  height: 100%;
  right: 5px;
  top: 0;
  text-align: center;
  color: #c0c4cc;
  transition: all 0.3s;
}

.ai-input__suffix-inner {
  display: inline-flex;
  align-items: center;
  height: 100%;
}

.ai-input__prefix {
  position: absolute;
  height: 100%;
  left: 4px;
  top: 0;
  width: 25px;
  text-align: center;
  color: #c0c4cc;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
}

.ai-input__icon {
  height: 100%;
  width: 25px;
  text-align: center;
  transition: all 0.3s;
  line-height: 32px;
}

.ai-input__icon:after {
  content: '';
  height: 100%;
  width: 0;
  display: inline-block;
  vertical-align: middle;
}

.ai-input .ai-input__clear {
  color: #c0c4cc;
  font-size: 14px;
  cursor: pointer;
  transition: color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
}

.ai-input .ai-input__clear:hover {
  color: #909399;
}

.ai-input__password-toggle {
  cursor: pointer;
  transition: color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
}

.ai-input__password-toggle:hover {
  color: #909399;
}

.ai-input .ai-input__count {
  height: 100%;
  display: inline-flex;
  align-items: center;
  color: #909399;
  font-size: 12px;
}

.ai-input .ai-input__count .ai-input__count-inner {
  background: #fff;
  line-height: normal;
  display: inline-block;
  padding: 0 5px;
}

/* 尺寸 */
.ai-input--medium {
  font-size: 14px;
}

.ai-input--medium .ai-input__inner {
  height: 36px;
  line-height: 36px;
}

.ai-input--medium .ai-input__icon {
  line-height: 36px;
}

.ai-input--small {
  font-size: 13px;
}

.ai-input--small .ai-input__inner {
  height: 32px;
  line-height: 32px;
}

.ai-input--small .ai-input__icon {
  line-height: 32px;
}

.ai-input--mini {
  font-size: 12px;
}

.ai-input--mini .ai-input__inner {
  height: 28px;
  line-height: 28px;
}

.ai-input--mini .ai-input__icon {
  line-height: 28px;
}

/* 带前后置元素的输入框 */
.ai-input-group {
  line-height: normal;
  display: inline-table;
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.ai-input-group>.ai-input__inner {
  vertical-align: middle;
  display: table-cell;
}

.ai-input-group__append,
.ai-input-group__prepend {
  background-color: #f5f7fa;
  color: #909399;
  vertical-align: middle;
  display: table-cell;
  position: relative;
  border: 1px solid #dcdfe6;
  border-radius: 4px;
  padding: 0 20px;
  width: 1px;
  white-space: nowrap;
}

.ai-input-group__prepend {
  border-right: 0;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.ai-input-group__append {
  border-left: 0;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.ai-input-group--prepend .ai-input__inner {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.ai-input-group--append .ai-input__inner {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.ai-input__prepend,
.ai-input__append {
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  background: #f5f7fa;
  color: #909399;
  white-space: nowrap;
  border-left: 1px solid #dcdfe6;
  border-right: 1px solid #dcdfe6;
}

.ai-input__prepend {
  border-right: none;
  border-radius: 4px 0 0 4px;
  margin-left: -1px;
}

.ai-input__append {
  border-left: none;
  border-radius: 0 4px 4px 0;
  margin-right: -1px;
}

.ai-input__prefix,
.ai-input__suffix {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #c0c4cc;
  padding: 0;
}

.ai-input__icon {
  cursor: pointer;
  font-size: 14px;
  transition: color 0.2s;
}

.ai-input__icon:hover {
  color: #909399;
}

.ai-input__clear,
.ai-input__password-toggle {
  margin-left: 4px;
}

.ai-input__word-limit {
  font-size: 12px;
  color: #909399;
  margin-left: 4px;
}

.ai-input--medium {
  height: 36px;
}

.ai-input--medium .ai-input__inner {
  height: 34px;
  line-height: 34px;
}

.ai-input--small {
  height: 32px;
}

.ai-input--small .ai-input__inner {
  height: 26px;
  line-height: 26px;
  font-size: 13px;
}

.ai-input--mini {
  height: 28px;
}

.ai-input--mini .ai-input__inner {
  height: 22px;
  line-height: 22px;
  font-size: 12px;
}

/* Textarea 文本域 */
.ai-textarea {
  position: relative;
  display: inline-block;
  width: 100%;
  font-size: 14px;
}

.ai-textarea__inner {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #dcdfe6;
  border-radius: 4px;
  background: #fff;
  color: #606266;
  font-size: inherit;
  outline: none;
  resize: vertical;
  transition: border-color 0.2s;
  box-sizing: border-box;
  font-family: inherit;
}

.ai-textarea__inner::placeholder {
  color: #c0c4cc;
}

.ai-textarea__inner:hover {
  border-color: #c0c4cc;
}

.ai-textarea.is-focus .ai-textarea__inner {
  border-color: var(--theme-primary-color);
}

.ai-textarea.is-disabled .ai-textarea__inner {
  background: #f5f7fa;
  border-color: #e4e7ed;
  color: #c0c4cc;
  cursor: not-allowed;
  resize: none;
}

.ai-textarea__word-limit {
  position: absolute;
  right: 12px;
  bottom: 8px;
  font-size: 12px;
  color: #909399;
}

/* Suggestions 建议列表 */
.ai-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 4px;
  background: #fff;
  border: 1px solid #e4e7ed;
  border-radius: 4px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
  max-height: 200px;
  overflow-y: auto;
  z-index: 100;
  display: none;
}

.ai-suggestions.show {
  display: block;
}

.ai-suggestions__item {
  padding: 8px 12px;
  cursor: pointer;
  transition: background 0.2s;
}

.ai-suggestions__item:hover,
.ai-suggestions__item.is-active {
  background: #f5f7fa;
}