﻿/* 转人工流程（静态 mock / 正式页可复用） */

.ai-human-form {
  position: relative;
  box-sizing: border-box;
  width: min(800px, calc(100% - 40px));
  margin: 0 auto 12px;
  padding: 16px;
  border: 1px solid #0175e8;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 4px 20px rgba(1, 117, 232, 0.12);
  flex-shrink: 0;
}

.ai-human-form__close {
  position: absolute;
  top: 10px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  background: transparent;
  color: #9b9fa8;
  cursor: pointer;
}

.ai-human-form__title {
  margin: 0 28px 12px 0;
  font-size: 18px;
  font-weight: 600;
  line-height: 28px;
  letter-spacing: 0.2px;
  color: #2a2b2e;
}

.ai-human-form__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.ai-human-form__field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.ai-human-form__field--full {
  grid-column: 1 / -1;
}

.ai-human-form__label {
  font-size: 14px;
  line-height: 1.2;
  color: #6a6b6d;
}

.ai-human-form__required {
  margin-left: 2px;
  color: #e60039;
}

.ai-human-form__input,
.ai-human-form__textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 6px 8px;
  border: 1px solid #e3e5e6;
  border-radius: 4px;
  background: #f7f9fa;
  font-size: 14px;
  line-height: 1.5;
  color: #2a2b2e;
}

.ai-human-form__input::placeholder,
.ai-human-form__textarea::placeholder {
  color: #c1c6cf;
}

.ai-human-form__textarea {
  min-height: 90px;
  resize: vertical;
}

.ai-human-form__field.is-error .ai-human-form__input,
.ai-human-form__field.is-error .ai-human-form__textarea {
  border-color: #e60039;
}

.ai-human-form__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}

.ai-human-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 24px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.5;
  cursor: pointer;
}

.ai-human-btn--ghost {
  border: 1px solid #d5d5d5;
  background: transparent;
  color: #2a2b2e;
}

.ai-human-btn--primary {
  border: none;
  background: linear-gradient(90deg, #0175e8 0%, #9436ff 100%);
  color: #fff;
}

.ai-human-btn--ghost-sm {
  height: 28px;
  padding: 0 12px;
  border: 1px solid #d5d5d5;
  border-radius: 8px;
  background: #fff;
  color: #6a6b6d;
  font-size: 13px;
}

.ai-human-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-sizing: border-box;
  width: min(800px, calc(100% - 40px));
  margin: 0 auto 8px;
  padding: 14px 16px;
  border: 1px solid #d5d5d5;
  border-radius: 20px;
  background: #fff;
  flex-shrink: 0;
}

.ai-human-status__left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex-wrap: wrap;
}

.ai-human-status__dot {
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #0175e8;
}

.ai-human-status__dot--queue {
  background: #fa9010;
}

.ai-human-status__title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  background: linear-gradient(90deg, #0175e8 0%, #9436ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.ai-human-status__title--queue {
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
  color: #fa9010;
}

.ai-human-status__desc {
  font-size: 14px;
  line-height: 1.3;
  color: #6a6b6d;
}

/* 设计稿：退出排队（灰底胶囊） */
.ai-human-btn--queue-leave {
  flex-shrink: 0;
  height: 36px;
  padding: 0 16px;
  border: none;
  border-radius: 18px;
  background: #f1f3f5;
  font-size: 14px;
  line-height: 1;
  color: #9b9fa8;
  cursor: pointer;
}

.ai-human-btn--queue-leave:hover {
  background: #e8eaed;
  color: #6a6b6d;
}

.ai-human-conflict {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-sizing: border-box;
  width: min(800px, calc(100% - 40px));
  min-height: 56px;
  margin: 0 auto 8px;
  padding: 16px;
  border: 1px solid #d5d5d5;
  border-radius: 20px;
  background: #fff;
  flex-shrink: 0;
}

.ai-human-conflict__left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.ai-human-conflict__dot {
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fa9010;
}

.ai-human-conflict__text {
  font-size: 18px;
  font-weight: 700;
  line-height: 24px;
  color: #fa9010;
}

.ai-human-conflict__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

.ai-human-conflict__btn {
  appearance: none;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  height: 36px;
  padding: 0 16px;
  border: none;
  border-radius: 18px;
  background: #f1f3f5;
  color: #9b9fa8;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  cursor: pointer;
  white-space: nowrap;
}

.ai-human-conflict__btn:hover {
  opacity: 0.92;
}

.ai-human-conflict__btn--primary {
  color: #fff;
  background: linear-gradient(90deg, #0175e8 0%, #9436ff 100%);
}

.ai-human-conflict__btn--primary:hover {
  opacity: 0.92;
  background: linear-gradient(90deg, #0175e8 0%, #9436ff 100%);
}

.ai-human-conflict__btn--cancel {
  background: #f1f3f5;
  color: #9b9fa8;
}

.ai-human-conflict__btn--cancel:hover {
  opacity: 1;
  background: #e8eaed;
}

.ai-human-divider {
  display: flex;
  justify-content: center;
  margin: 16px 0;
}

.ai-human-divider__text {
  padding: 4px 12px;
  border-radius: 4px;
  background: #fff;
  font-size: 14px;
  line-height: 20px;
  color: #6a6b6d;
}

.ai-human-divider__text a {
  color: #9436ff;
  text-decoration: underline;
}

.ai-human-agent-msg {
  margin-top: 12px;
}

/* 客服气泡按内容收窄，避免短文案也铺满整行 */
.ai-human-agent-msg .ai-chat__turn-body {
  align-items: flex-start;
}

.ai-human-agent-msg .ai-chat__card--plain {
  width: fit-content;
  max-width: min(100%, 720px);
  box-sizing: border-box;
}

.ai-human-agent-msg .ai-chat__text--html {
  font-size: 14px;
  line-height: 1.6;
  color: #2a2b2e;
  word-break: break-word;
}

.ai-human-agent-msg .ai-chat__text--html img {
  max-width: min(360px, 100%);
  height: auto;
  border-radius: 8px;
  display: block;
}

.ai-human-agent-msg .ai-chat__text--html a.ai-human-image-link {
  display: inline-block;
  text-decoration: none;
}

.ai-human-agent-msg .ai-chat__text--html a.ai-human-image-link:hover {
  opacity: 0.92;
}

.ai-human-file-card {
  display: flex;
  align-items: center;
  gap: 10px;
  box-sizing: border-box;
  max-width: min(320px, 100%);
  padding: 10px 12px;
  border: 1px solid #e6e8eb;
  border-radius: 10px;
  background: #f7f9fa;
  color: #2a2b2e !important;
  text-decoration: none !important;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.ai-human-file-card:hover,
.ai-human-file-card:focus,
.ai-human-file-card:visited,
.ai-human-file-card:active {
  background: #eef3f8;
  border-color: #cfd8e3;
  color: #2a2b2e !important;
  text-decoration: none !important;
}

.ai-human-file-card__icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
}

.ai-human-file-card__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1 1 auto;
}

.ai-human-file-card__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  color: #2a2b2e;
}

.ai-human-file-card__action {
  font-size: 12px;
  line-height: 18px;
  color: #0175e8;
}

.ai-human-file-card--disabled {
  opacity: 0.6;
  cursor: default;
}

.ai-human-agent-msg .ai-chat__text--html a {
  color: #0175e8;
  text-decoration: underline;
}

.ai-human-agent-msg .ai-chat__text--html p {
  margin: 0 0 8px;
}

.ai-human-agent-msg .ai-chat__text--html p:last-child {
  margin-bottom: 0;
}

.AI-panel__composer-left:has(.AI-panel__tool-btn--human) > .AI-panel__divider,
.AI-panel__composer-left:has(.AI-panel__tool-btn--exit-human) > .AI-panel__divider,
.ai-chat__composer-left:has(.ai-chat__tool-btn--human) > .ai-chat__divider,
.ai-chat__composer-left:has(.ai-chat__tool-btn--exit-human) > .ai-chat__divider {
  display: block !important;
  visibility: visible;
  opacity: 1;
}

.AI-panel__composer-left .AI-panel__tool-btn.AI-panel__tool-btn--human,
.AI-panel__composer-left .AI-panel__tool-btn.AI-panel__tool-btn--exit-human,
.ai-chat__composer-left .ai-chat__tool-btn.ai-chat__tool-btn--human,
.ai-chat__composer-left .ai-chat__tool-btn.ai-chat__tool-btn--exit-human {
  display: inline-flex !important;
  visibility: visible;
  opacity: 1;
  align-items: center;
}

.AI-panel__tool-btn--human,
.ai-chat__tool-btn--human {
  gap: 4px;
  height: 28px;
  padding: 0 8px;
  border-radius: 8px;
  color: #2a2b2e;
  font-size: 14px;
  line-height: 1;
  background: transparent;
}

.AI-panel__tool-btn--human img,
.ai-chat__tool-btn--human img {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.AI-panel__tool-btn--exit-human,
.ai-chat__tool-btn--exit-human {
  gap: 4px;
  height: 28px;
  padding: 0 8px;
  border-radius: 8px;
  color: #e60039;
  font-size: 14px;
  line-height: 1;
}

.AI-panel__tool-btn--exit-human img,
.ai-chat__tool-btn--exit-human img {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.AI-panel__composer-wrap.is-human-connecting .AI-panel__composer,
.AI-panel__composer-wrap.is-human-queue .AI-panel__composer,
.ai-chat__composer-wrap.is-human-connecting .ai-chat__composer,
.ai-chat__composer-wrap.is-human-queue .ai-chat__composer {
  opacity: 0.5;
  pointer-events: none;
}

.AI-panel__composer-wrap.is-human-active .AI-panel__tool-btn.AI-panel__tool-btn--human,
.ai-chat__composer-wrap.is-human-active .ai-chat__tool-btn.ai-chat__tool-btn--human {
  display: none !important;
}

.ai-human-rating-mask {
  position: fixed;
  inset: 0;
  z-index: 10020;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.35);
}

.ai-human-rating {
  position: relative;
  width: min(500px, 100%);
  padding: 20px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.ai-human-rating__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 24px;
  height: 24px;
  border: none;
  background: transparent;
  color: #9b9fa8;
  cursor: pointer;
}

.ai-human-rating__head {
  text-align: center;
  margin-bottom: 20px;
}

.ai-human-rating__title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #2a2b2e;
}

.ai-human-rating__sub {
  margin: 8px 0 0;
  font-size: 12px;
  color: #9b9fa8;
}

.ai-human-rating__section {
  margin-bottom: 20px;
}

.ai-human-rating__section-title {
  margin: 0 0 12px;
  text-align: center;
  font-size: 14px;
  color: #2a2b2e;
}

.ai-human-rating__choices {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.ai-human-rating__chip {
  height: 38px;
  padding: 0 16px;
  border: 1px solid #e3e5e6;
  border-radius: 8px;
  background: #fff;
  font-size: 14px;
  color: #2a2b2e;
  cursor: pointer;
}

.ai-human-rating__chip.is-active {
  border-color: #0175e8;
  color: #0175e8;
  background: rgba(1, 117, 232, 0.06);
}

.ai-human-rating__stars {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 12px;
}

.ai-human-rating__star-label {
  font-size: 14px;
  color: #6a6b6d;
}

.ai-human-rating__star-list {
  display: flex;
  gap: 8px;
}

.ai-human-rating__star {
  width: 38px;
  height: 38px;
  padding: 0;
  border: none;
  background: transparent;
  color: #d5d5d5;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.ai-human-rating__star.is-on {
  color: #ffb400;
}

.ai-human-rating__tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.ai-human-rating__tag {
  height: 32px;
  padding: 0 16px;
  border: 1px solid #e3e5e6;
  border-radius: 8px;
  background: #fff;
  font-size: 14px;
  color: #2a2b2e;
  cursor: pointer;
}

.ai-human-rating__tag.is-active {
  border-color: #0175e8;
  color: #0175e8;
}

.ai-human-rating__input {
  width: 100%;
  box-sizing: border-box;
  height: 46px;
  margin-bottom: 8px;
  padding: 10px 16px;
  border: 1px solid #e3e5e6;
  border-radius: 8px;
  background: #f7f9fa;
  font-size: 14px;
}

.ai-human-rating__error {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.4;
  color: #e60039;
  text-align: center;
}

.ai-human-rating__submit {
  display: flex;
  width: 200px;
  height: 36px;
  margin: 0 auto;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 18px;
  background: linear-gradient(90deg, #0175e8 0%, #9436ff 100%);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
}

.ai-human-rating__submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

@media (max-width: 768px) {
  .ai-human-form,
  .ai-human-status,
  .ai-human-conflict {
    width: calc(100% - 32px);  
  }  
  .ai-human-form {
    max-height: calc(100dvh - 150px);
    margin-bottom: 8px;
    padding: 14px;
    border-radius: 12px;
    overflow-y: auto;
  }

  .ai-human-form__title {
    margin-right: 24px;
    font-size: 16px;
    font-weight: 600;
  }
  .ai-human-form__field{
    gap: 12px;
  }
  .ai-human-form__field .ai-human-form__label{
    line-height: 1;
  }
  .ai-human-form__input,
  .ai-human-form__textarea {
    font-size: 14px;
    border-radius: 0;
  }
  .ai-human-form__input{
    min-height: 30px;
    height: 30px;
    line-height: 1;
  }

  .ai-human-form__actions {
    flex-direction: column;
    margin-top: 12px;
  }

  .ai-human-form__actions .ai-human-btn--primary {
    order: -1;
  }

  .ai-human-form__grid {
    grid-template-columns: 1fr;
    margin-bottom: 0;
  }

  .ai-human-status,
  .ai-human-conflict {
    flex-direction: column;
    align-items: flex-start;
  }

  .ai-human-conflict {
    width: calc(100% - 32px);
    min-height: 0;
    border-radius: 12px;
    gap: 16px;
  }

  .ai-human-conflict__left {
    width: 100%;
    align-items: flex-start;
  }

  .ai-human-conflict__dot {
    width: 10px;
    height: 10px;
    margin-top: 3px;
  }

  .ai-human-conflict__text {
    font-size: 16px;
    line-height: 1;
  }
  .ai-human-conflict__actions{
    gap: 10px;
  }
  .ai-human-conflict__actions .ai-human-conflict__btn{
    height: 36px;
    min-height: 36px;
    font-size: 14px;
    line-height: 1;
  }

  .ai-human-status {
    width: calc(100% - 16px);
    min-height: 88px;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding: 16px;
    border-radius: 12px;
  }

  .ai-human-status__left {
    display: grid;
    grid-template-columns: 10px minmax(0, 1fr);
    grid-template-rows: auto auto;
    flex: 1 1 auto;
    gap: 8px 12px;
    align-items: center;
  }

  .ai-human-status__dot {
    grid-row: 1;
  }

  .ai-human-status__title {
    grid-column: 2;
    font-size: 16px;
    line-height: 20px;
    white-space: nowrap;
  }

  .ai-human-status__desc {
    grid-column: 1 / -1;
    font-size: 14px;
    line-height: 18px;
    white-space: nowrap;
  }

  .ai-human-conflict__actions {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 12px;
  }

  .ai-human-conflict__btn {
    width: 100%;
    min-height: 56px;
    height: 56px;
    padding: 0 16px;
    border-radius: 28px;
    font-size: 20px;
    line-height: 28px;
  }

  .ai-human-exit-confirm {
    position: fixed;
    inset: 0;
    z-index: 10003;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
  }

  .ai-human-exit-confirm__mask {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
  }

  .ai-human-exit-confirm__dialog {
    position: relative;
    width: 241px;
    padding: 20px;
    border-radius: 4px;
    background: #fff;
  }

  .ai-human-exit-confirm__title {
    margin: 0;
    font-size: 20px;
    line-height: 24px;
    color: #2a2b2e;
    white-space: nowrap;
  }

  .ai-human-exit-confirm__actions {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 24px;
  }

  .ai-human-exit-confirm__btn {
    flex: 1 1 0;
    min-width: 0;
    height: 36px;
    padding: 0 16px;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    transition: opacity 0.2s, box-shadow 0.2s;
  }

  .ai-human-exit-confirm__btn:hover {
    opacity: 0.9;
  }

  .ai-human-exit-confirm__btn--cancel {
    background: #F1F3F5;
    color: #9B9FA8;
    border: none;
  }

  .ai-human-exit-confirm__btn--confirm {
    border: none;
    background: linear-gradient(135deg, #0175e8 0%, #9436ff 100%);
    color: #fff;
    box-shadow: 0 2px 12px rgba(1, 117, 232, 0.25);
  }

  .ai-human-rating{
    min-height: 531px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 16px;
  }
  .ai-human-rating__head{
    margin-bottom: 0;
  }
  .ai-human-rating__title{
    font-size: 20px;
    font-weight: 700;
    height: 24px;
    line-height: 24px;
  }
  .ai-human-rating__close img{
    height: 24px;
    line-height: 24px;
  }
  .ai-human-rating__sub{
    margin: 10px 0 0 0;
    height: 15px;
    line-height: 15px;
  }
  .ai-human-rating__section{
    margin-bottom: 0;
  }
  .ai-human-rating__section-title{
    font-size: 16px;
    margin: 0 0 10px 0;
    height: 20px;
    line-height: 20px;
  }
  .ai-human-rating__stars{
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    grid-template-areas:
      "star-list star-list star-list"
      "left-label . right-label";
    gap: 4px 0;
    width: 100%;
    margin-bottom: 0;
  }
  .ai-human-rating__star-list{
    grid-area: star-list;
    justify-content: center;
    gap: 8px;
  }
  .ai-human-rating__star-label{
    height: 18px;
    line-height: 18px;
    margin-bottom: 24px;
  }
  .ai-human-rating__star-label:first-child{
    grid-area: left-label;
    text-align: left;
    margin-left: 50px;
  }
  .ai-human-rating__star-label:last-child{
    grid-area: right-label;
    text-align: right;
    margin-right: 50px;
  }
  .ai-human-rating__choices .ai-human-rating__chip{
    border-radius: 4px;
    background: #F7F9FA;
    border-color: transparent;
  }
  .ai-human-rating__choices .is-active{
    border: 1px solid transparent;
    border-radius: 4px;
    background:
      linear-gradient(#F7F9FA, #F7F9FA) padding-box,
      linear-gradient(90deg, #0175E8 0%, #9436FF 100%) border-box;
    background-clip: padding-box, border-box;
  }
  .ai-human-rating__choices .is-active span {
    background: linear-gradient(90deg, #0175E8 0%, #9436FF 100%);
    background-clip: text;
    color: transparent;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
  }
  .ai-human-rating__tags {
    padding: 0 20px;
  }
  .ai-human-rating__tags .ai-human-rating__tag{
    border-color: transparent;
    background: #F7F9FA;
    border-radius: 4px;
  }
  .ai-human-rating__tags .is-active{
    border: 1px solid transparent;
    border-radius: 4px;
    background:
      linear-gradient(#F7F9FA, #F7F9FA) padding-box,
      linear-gradient(90deg, #0175E8 0%, #9436FF 100%) border-box;
    background-clip: padding-box, border-box;
  }
  .ai-human-rating__tags .is-active span {
    background: linear-gradient(90deg, #0175E8 0%, #9436FF 100%);
    background-clip: text;
    color: transparent;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
  }
  .ai-human-rating__input{
    height: 64px;
    min-height: 64px;
    margin-bottom: 0;
  }
  .ai-human-rating__submit{
    border-radius: 4px;;
  }
  .ai-human-status{
    box-sizing: border-box;
  }
  .ai-human-btn{
    height: 36px;
    font-size: 14px;
    padding: 0 16px;
    border-radius: 18px;
    background: #F1F3F5;
    color: #9B9FA8;
    border: none;
  }
  .ai-human-btn--ghost{
    color: #2A2B2E;
    border: 1px solid #D5D5D5;
    background: transparent;
  }
  .ai-human-btn--primary{
    color: #fff;
    background: linear-gradient(90deg, #0175E8 0%, #9436FF 100%);
  }
}

/* 天润 Clink 系统表情雪碧图（[微笑] → sprite） */
.ai-clink-emoji {
  display: inline-block;
  width: 34px;
  height: 34px;
  margin: 0 1px;
  vertical-align: -8px;
  background-image: url('https://futurewindow.oss-cn-beijing.aliyuncs.com/chineseResources/UIA/static-page/AI-conversation/img/clink-emoji.svg');
  background-repeat: no-repeat;
  background-size: 374px 238px;
  background-position: 0 0;
}