/**
 * Copyright 2025 Beijing Volcano Engine Technology Co., Ltd. All Rights Reserved.
 * SPDX-license-identifier: BSD-3-Clause
 */

.wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  padding-top: 38px;
  background-color: #F4F6FA;

  .conversation {
    width: 100%;
    position: relative;
    height: 0;
    display: flex;
    flex-direction: column;
    flex:1 1 0;
    overflow: auto;


    .sentence {
      position: relative;
      display: flex;
      flex-direction: row;
      justify-content: flex-start;
      align-items: center;
      width: max-content;
      white-space: normal;
      max-width: 100%;
      line-height: 28px;
      box-sizing: border-box;
 

      .content {
        width: max-content;
        background: #ffffff;
        border-radius: 12px;    
        padding: 10px 12px;
      }
    }

    .user {
      width: max-content;
      border: 0px solid;
      align-self: flex-end;
      padding: 15px;

      .content{
        border-radius: 30px 30px 0 30px;
        background-color: #1580FF;
        color:#fff;   
      }
    }
    .robot {
      font-family: PingFang SC;
      font-size: 14px;
      font-weight: 400;
      letter-spacing: 0.003em;

      border: 0px solid;
      align-self: flex-start;
      padding: 3px 12px;
    }

    .loading-wrapper {
      width: max-content;
      display: inline-block;

      .loading {
        margin-left: 8px;
        width: max-content;
      }

      .dot {
        background-color: rgba(193, 163, 237, 1);
        width: 8px;
        height: 8px;
      }
    }

    .aiReadying {
      font-family: PingFang SC;
      font-size: 16px;
      font-weight: 500;
      color: rgba(27, 30, 61, 0.6);
      text-align: center;
      display: flex;
      flex-direction: row;
      justify-content: center;
      align-items: center;
      line-height: 28px;
      margin-left: 20px;
    }

    .aiReading-spin {
      margin-right: 12px;
    }

    .interruptTag {
      width: max-content;
      height: 22px;
      padding: 0px 6px 0px 6px;
      border-radius: 4px;
      margin-left: 6px;
      font-family: PingFang SC;
      font-size: 12px;
      font-weight: 400;
      line-height: 22px;
      letter-spacing: 0.003em;
      color: var(--text-color-text-3, rgba(115, 122, 135, 1));
      background: var(--security-unknown-tag-unknown-1, rgba(241, 243, 245, 1));
    }
  }

  .conversation::-webkit-scrollbar {
    width: 0px;
    height: 0px;
  }

  .conversation::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0);
    border-radius: 0px;
  }

  .conversation::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0);
    border-radius: 0px;
  }

  .controller {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    background-color: #fff;
    padding: 8px 15px;

    .talkWrapper {
      --h: 16px;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      padding: 8px 16px;
      background-color: #e3efff;
      border-radius: 20px;
      user-select: none;
      gap: 8px;
      min-width: 116px;
      color: #0078ff;
    }

    .listenerDot {
      display: flex;
      align-items: center;
      justify-content: center;
      position: relative;
      height: var(--h);
      width: 36px;

      span {
        display: inline-block;
        width: 4px;
        margin: 0 1px;
        background-color: #4898fc;
        border-radius: 2px;
        height: calc(var(--h) - var(--d) * 4px);
        transition: height 0.2s ease;
        opacity: calc(1 - var(--d) * 0.4);
      }
    }

    .isTalking {
      span {
        animation: soundWave 1s infinite ease-in-out;
      }

      span:nth-child(1) {
        animation-delay: 0s;
      }
      span:nth-child(2) {
        animation-delay: 0.2s;
      }
      span:nth-child(3) {
        animation-delay: 0.4s;
      }
      span:nth-child(4) {
        animation-delay: 0.6s;
      }
      span:nth-child(5) {
        animation-delay: 0.8s;
      }
    }

    @keyframes soundWave {
      0%,
      100% {
        height: 4px;
      }
      50% {
        height: 16px;
      }
    }

    .microphoneWrapper {
      display: flex;
      align-items: center;
      background-color: #f6f6f6;
      padding: 10px 15px;
      border-radius: 400px;
    }
  }
}

.mobile {
  padding-top: 12px;
}
