/* converted from pages/chat2/chat2.wxss */
/* miniprogram/pages/chat2/chat2.wxss */

body {
    background: #f5f7fb;
  }
  
  .ChatPage {
    height: 100vh;
    background: #f5f7fb;
    display: flex;
    flex-direction: column;
  }
  
  .ChatHeaderBar {
    position: relative;
    flex-shrink: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
    border-bottom: 0.5px solid #e8edf5;
    min-height: 150px;
    padding: calc(env(safe-area-inset-top) + 9px) 12px 12px;
    background: #78a6ff;
    transition: min-height 0.26s ease, padding 0.26s ease;
  }

  .ChatHeaderBar--collapsed {
    min-height: 96px;
  }
  
  .ChatHeaderBg {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    display: block;
    transform: scale(1);
    transform-origin: center center;
    transition: transform 0.26s ease;
  }

  .ChatHeaderBar--collapsed .ChatHeaderBg {
    transform: scale(1.03);
  }
  
  .ChatHeaderFx {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 1;
    pointer-events: none;
  }
  
  .ChatHeaderFx--strong {
    width: 46%;
    background: linear-gradient(
      90deg,
      rgba(2, 6, 16, 0.44) 0%,
      rgba(2, 6, 16, 0.40) 20%,
      rgba(2, 6, 16, 0.34) 42%,
      rgba(2, 6, 16, 0.22) 72%,
      rgba(2, 6, 16, 0) 100%
    );
  }
  
  .ChatHeaderFx--mid {
    width: 70%;
    background: linear-gradient(
      90deg,
      rgba(6, 14, 32, 0.28) 0%,
      rgba(6, 14, 32, 0.23) 24%,
      rgba(6, 14, 32, 0.16) 46%,
      rgba(6, 14, 32, 0.085) 72%,
      rgba(6, 14, 32, 0) 100%
    );
  }
  
  .ChatHeaderFx--light {
    width: 84%;
    background: linear-gradient(
      90deg,
      rgba(10, 20, 44, 0.10) 0%,
      rgba(10, 20, 44, 0.075) 28%,
      rgba(10, 20, 44, 0.045) 52%,
      rgba(10, 20, 44, 0.015) 74%,
      rgba(10, 20, 44, 0) 100%
    );
  }
  
  .ChatHeaderShade {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    z-index: 1;
    pointer-events: none;
    background:
      /* 左侧主蒙版 */
      linear-gradient(
        90deg,
        rgba(0, 0, 0, 0.16) 0%,
        rgba(0, 0, 0, 0.13) 22%,
        rgba(0, 0, 0, 0.085) 48%,
        rgba(0, 0, 0, 0.028) 70%,
        rgba(0, 0, 0, 0) 84%
      ),
      /* 右侧轻微勾边 */
      linear-gradient(
        270deg,
        rgba(0, 0, 0, 0.08) 0%,
        rgba(0, 0, 0, 0.035) 14%,
        rgba(0, 0, 0, 0.008) 26%,
        rgba(0, 0, 0, 0) 38%
      ),
      /* 底部蒙版：这一层就是给底部白字提示兜底的，强度在这里改 */
      linear-gradient(
        180deg,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 0) 62%,
        rgba(0, 0, 0, 0.28) 78%,
        rgba(0, 0, 0, 0.38) 90%,
        rgba(0, 0, 0, 0.58) 100%
      );
  }
  
  .ChatHeaderMain {
    position: relative;
    z-index: 2;
    flex: 1;
    min-width: 0;
    padding-right: 10px;
  }
  
  .ChatHeaderTitle {
    display: block;
    margin-top: 6px;
    margin-left: 6px;
    font-size: 24px;
    line-height: 1.22;
    color: #ffffff;
    font-weight: 700;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.16);
  }
  
  .ChatHeaderSubtitle {
    display: block;
    margin-top: 0;
    margin-left: 6px;
    font-size: 11px;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.88);
    text-shadow: 0 3px 9px rgba(0, 0, 0, 0.16);
  }
  
  .TopAction {
    position: relative;
    z-index: 2;
    flex-shrink: 0;
    padding: 7px 11px;
    border-radius: 499.5px;
    background: rgba(255, 255, 255, 0.90);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    border: 0.5px solid rgba(255, 255, 255, 0.72);
  }
  
  .TopActionText {
    color: #4a5a72;
    font-size: 12px;
    font-weight: 700;
  }
  
  .ChatHeaderNotice {
    position: absolute;
    left: 50%;
    bottom: 4px;
    transform: translateX(-50%);
    z-index: 2;
    pointer-events: none;
    white-space: nowrap;
  
    /* 这行提示文字大小在这里改 */
    font-size: 11.5px;
    line-height: 16px;
  
    /* 这行提示文字颜色在这里改 */
    color: rgba(255, 255, 255, 0.95);
  
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.22);
  }
  
  .ChatScroll {
    flex: 1;
    min-height: 0;
  }
  
  .ScrollInner {
    padding: 15px 12px 9px;
    box-sizing: border-box;
  }

  .EmptyStage {
    min-height: 100%;
    padding: 11px 12px 9px;
    box-sizing: border-box;
  }

  .QuestionSheet {
    min-height: 100%;
    box-sizing: border-box;
  }

  .QuestionSheet--empty {
    display: flex;
    flex-direction: column;
  }

  .EmptyHint {
    flex: 1;
    border-radius: 12px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border: 0.5px solid #e4ebf4;
    box-shadow: 0 6px 15px rgba(55, 89, 160, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
  }

  .EmptyHintText {
    text-align: center;
    font-size: 14px;
    line-height: 1.8;
    color: #6f7b8f;
  }

  .IntroActionWrap {
    padding-top: 11px;
  }

  .PrimaryBtn {
    width: 100%;
    min-height: 44px;
    border-radius: 499.5px;
    background: linear-gradient(135deg, #eef3f8 0%, #ffffff 100%);
    border: 0.5px solid #dde4ee;
    color: #4a5a72;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
  }
  
  .MsgRow {
    display: flex;
    align-items: flex-start;
    margin-bottom: 11px;
  }
  
  .MsgRow--user {
    justify-content: flex-end;
  }

  .RetryBtnWrap {
    display: flex;
    align-items: center;
    margin-right: 7px;
    flex-shrink: 0;
  }

  .RetryBtn {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: linear-gradient(180deg, #ff6b6b 0%, #ef4444 100%);
    color: #ffffff;
    display: flex;
    margin-top: 8px;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 700;
    box-shadow: 0 5px 10px rgba(239, 68, 68, 0.26);
  }
  
  .Avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    flex-shrink: 0;
    background: #ffffff;
    border: 1px solid #d8dee9;
    box-shadow: 0 4px 9px rgba(56, 72, 104, 0.10);
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .AvatarImg {
    width: 68%;
    height: 68%;
    display: block;
  }
  
  .MsgContent {
    max-width: calc(100% - 44px);
    margin-left: 8px;
  }

  .MsgContent--withAction {
    width: calc(100% - 44px);
  }
  
  .MsgContent--user {
    margin-left: 0;
  }
  
  .MsgBubble {
    border-radius: 13px;
    padding: 11px 18px 7px 18px;
    box-sizing: border-box;
    box-shadow: 0 6px 15px rgba(55, 89, 160, 0.08);
  }
  
  .MsgBubble--assistant {
    background: #ffffff;
    border-top-left-radius: 6px;
  }
  
  .MsgBubble--user {
    background: linear-gradient(135deg, #4ea9ff 0%, #6cccf6 52%, #89e7c7 100%);
    border-top-right-radius: 6px;
  }
  
  .MsgText {
    font-size: 14px;
    line-height: 1.8;
    word-break: break-word;
    white-space: pre-wrap;
    color: #30405e;
  }
  
  .MsgBubble--user .MsgText {
    color: #ffffff;
  }
  
  .MsgTime {
    display: block;
    margin-top: 5px;
    margin-left: 3px;
    font-size: 10px;
    color: #98a3b9;
  }
  
  .MsgTime--user {
    text-align: right;
    margin-right: 3px;
  }
  
  /* =========================
   智能提示 / 演练报告 气泡
   与 AI 说话气泡左边、右边对齐
   ========================= */

.NeutralRow {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 11px;
  
    /* 30px 头像宽度 + 8px 头像与气泡间距 */
    padding-left: 38px;
  
    box-sizing: border-box;
  }
  
  /* 让中立气泡右边也和 AI 气泡对齐 */
  .NeutralCard {
    width: calc(100% - 6px);
    max-width: calc(100% - 6px);
  
    padding: 11px 18px 7px 18px;
    border-radius: 13px;
  
    /* 和 AI 气泡更接近 */
    background: linear-gradient(180deg, #f1f4f8 0%, #f8fafc 100%);
    border: 0.5px solid #e4ebf4;
    box-shadow: 0 6px 15px rgba(55, 89, 160, 0.08);
  
    box-sizing: border-box;
  }
  
  .NeutralTag {
    display: inline-block;
    margin-bottom: 7px;
    margin-left: -4px;
    padding: 3px 7px;
    border-radius: 499.5px;
    background: #e9eef4;
    color: #647286;
    font-size: 11px;
    font-weight: 700;
  }
  
  .NeutralBody--system {
    text-align: center;
  }
  
  .MdH1,
  .MdH2,
  .MdH3,
  .MdP {
    white-space: pre-wrap;
    word-break: break-word;
  }
  
  .MdH1 {
    margin-bottom: 8px;
    font-size: 17px;
    line-height: 1.45;
    color: #5f6c80;
    font-weight: 700;
  }
  
  .MdH2 {
    margin-top: 7px;
    margin-bottom: 7px;
    font-size: 15.5px;
    line-height: 1.5;
    color: #667387;
    font-weight: 700;
  }
  
  .MdH3 {
    margin-top: 6px;
    margin-bottom: 6px;
    font-size: 14.5px;
    line-height: 1.55;
    color: #6c788d;
    font-weight: 700;
  }
  
  .MdP {
    margin-bottom: 6px;
    font-size: 14px;
    line-height: 1.85;
    color: #6f7b8f;
  }
  
  .MdList {
    margin: 4px 0 6px;
  }
  
  .MdListItem {
    display: flex;
    align-items: flex-start;
    margin-bottom: 4px;
  }
  
  .MdBullet {
    width: 19px;
    flex-shrink: 0;
    font-size: 14px;
    line-height: 1.8;
    color: #4f7df5;
    font-weight: 700;
  }
  
  .MdListContent {
    flex: 1;
    font-size: 14px;
    line-height: 1.8;
    color: #6f7b8f;
    word-break: break-word;
  }
  
  .Seg--bold {
    font-weight: 700;
    color: #5f6c80;
  }
  
  .Seg--code {
    padding: 1px 5px;
    border-radius: 5px;
    background: #eef3ff;
    color: #315fcc;
  }
  
  .MsgBubble--assistant .MdH1 {
    color: #1f2f53;
  }
  
  .MsgBubble--assistant .MdH2 {
    color: #24365f;
  }
  
  .MsgBubble--assistant .MdH3 {
    color: #2b3f70;
  }
  
  .MsgBubble--assistant .MdP,
  .MsgBubble--assistant .MdListContent,
  .MsgBubble--assistant .Seg--bold {
    color: #30405e;
  }
  
  .NeutralCard .MdH1,
  .NeutralCard .MdH2,
  .NeutralCard .MdH3,
  .NeutralCard .MdP,
  .NeutralCard .MdList,
  .NeutralCard .MdListContent {
    padding-left: 2px;
  }
  
  .SuggestWrap {
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.96);
    border-top: 0.5px solid #edf1f8;
    padding: 6px 10px 5px;
    box-sizing: border-box;
  }
  
  .SuggestHeader {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 2px;
  }
  
  .SuggestTitle {
    font-size: 12px;
    color: #7b879f;
    font-weight: 600;
  }
  
  .SuggestAction {
    font-size: 11px;
    color: #8d97ac;
  }
  
  .SuggestList {
    padding-top: 4px;
    display: flex;
    flex-wrap: wrap;
  }
  
  .SuggestChip {
    margin-right: 7px;
    margin-bottom: 6px;
    padding: 6px 10px;
    border-radius: 499.5px;
    background: linear-gradient(135deg, #eef6fb 0%, #ffffff 100%);
    color: #50647f;
    font-size: 11.5px;
    line-height: 1.45;
    border: 0.5px solid #dde5ef;
  }
  
  .SuggestChip--danger {
    color: #c74242;
    border: 0.5px solid #e16969;
    background: #fffafa;
  }
  
  .SuggestChip--disabled {
    color: #aab4c7;
    border-color: #e3e9f2;
    background: #f7f9fc;
  }
  
  .InputBar {
    flex-shrink: 0;
    padding: 9px 11px calc(9px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.96);
    border-top: 0.5px solid #edf1f8;
    display: flex;
    align-items: center;
    box-sizing: border-box;
  }
  
  .MicBtn {
    width: 41px;
    height: 41px;
    border-radius: 50%;
    background: linear-gradient(135deg, #eef3f8 0%, #ffffff 100%);
    border: 0.5px solid #dde4ee;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }
  
  .MicBtn--active {
    background: linear-gradient(135deg, #dff4ff 0%, #eefcff 100%);
    border-color: #bfe5fb;
  }
  
  .MicBtnText {
    font-size: 17px;
  }
  
  .InputMain {
    position: relative;
    flex: 1;
    margin-left: 7px;
  }
  
  .ChatInput,
  .VoiceInputBtn {
    width: 100%;
    height: 41px;
    padding: 0 12px;
    box-sizing: border-box;
    border-radius: 499.5px;
    background: #f4f7fc;
    font-size: 14px;
    color: #2b3957;
  }
  
  .ChatInput {
    line-height: 41px;
  }
  
  .VoiceInputBtn {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0.5px solid #d2dbe8;
    transition: transform 0.12s ease, opacity 0.12s ease, border-color 0.12s ease;
  }
  
  .VoiceInputBtn--pressed {
    transform: scale(0.988);
    opacity: 0.94;
    border-color: #b9c7da;
  }
  
  .VoiceInputBtnText {
    font-size: 13.5px;
    color: #6c7a96;
  }
  
  .InputLockMask {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
  }
  
  .SendBtn {
    margin-left: 8px;
    width: 58px;
    height: 41px;
    border-radius: 499.5px;
    background: linear-gradient(135deg, #eef3f8 0%, #ffffff 100%);
    border: 0.5px solid #dde4ee;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }
  
  .SendBtnText {
    color: #4a5a72;
    font-size: 14px;
    font-weight: 700;
  }
  
  .StateWrap {
    padding: 50px 20px;
    text-align: center;
  }
  
  .StateText {
    font-size: 14px;
    color: #6d7992;
  }
  
  .StateText--error {
    color: #d93b3b;
  }
  
  .BottomAnchor {
    height: 0;
  }
  
  .SystemTopZone,
.SystemTopBanner {
  display: none;
}
  
  /* =========================
     chat2 语音输入
     ========================= */
  
  .VoiceOverlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
  }
  
  .VoiceOverlayMask {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.58);
    backdrop-filter: blur(2px);
  }
  
  .VoiceUnifiedCard {
    position: absolute;
    left: 50%;
    top: 27%;
    transform: translateX(-50%);
    width: 280px;
    height: 150px;
    border-radius: 19px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 9px 24px rgba(0, 0, 0, 0.18);
    padding: 17px 14px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .VoiceUnifiedCard--cancel {
    background: rgba(255, 245, 245, 0.98);
  }
  
  .VoiceWave {
    width: 100%;
    height: 90px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 3px;
  }
  
  .VoiceWaveBar {
    width: 4px;
    min-height: 8px;
    border-radius: 499.5px;
    background: #111111;
    opacity: 0.92;
    transition: height 0.06s linear, background 0.12s ease;
  }
  
  .VoiceWaveBar--cancel {
    background: #c62828;
  }
  
  .VoiceSpinner {
    width: 41px;
    height: 41px;
    border-radius: 499.5px;
    border: 3.5px solid rgba(17, 17, 17, 0.12);
    border-top-color: #111111;
    animation: VoiceSpin 0.9s linear infinite;
  }
  
  .VoiceReviewTextarea {
    width: 100%;
    height: 100%;
    font-size: 20px;
    line-height: 1.55;
    color: #111111;
  }
  
  .VoiceBottomDock {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 180px;
  }
  
  .VoiceBottomArc {
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 460px;
    height: 135px;
    background: rgba(255, 255, 255, 0.18);
    border-top-left-radius: 50% 100%;
    border-top-right-radius: 50% 100%;
  }
  
  .VoiceRecordActionStack {
    position: absolute;
    left: 50%;
    bottom: 46px;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 2;
  }
  
  .VoiceCancelFloat {
    width: 63px;
    height: 63px;
    border-radius: 499.5px;
    background: rgba(255, 255, 255, 0.22);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 600;
    backdrop-filter: blur(2px);
    transition: all 0.15s ease;
    margin-bottom: 17px;
  }
  
  .VoiceCancelFloat--active {
    background: rgba(255, 255, 255, 0.98);
    color: #c62828;
    transform: scale(1.06);
  }
  
  .VoiceMainFloat {
    width: 76px;
    height: 76px;
    border-radius: 499.5px;
    background: rgba(255, 255, 255, 0.94);
    color: #111111;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: 700;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.14);
    transition: transform 0.12s ease;
  }
  
  .VoiceMainFloat--pressed {
    transform: scale(0.98);
  }
  
  .VoiceReviewActionRow {
    position: absolute;
    left: 50%;
    bottom: 64px;
    transform: translateX(-50%);
    width: 160px;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .VoiceReviewCircleBtn {
    width: 61px;
    height: 61px;
    border-radius: 499.5px;
    background: rgba(255, 255, 255, 0.22);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    font-weight: 700;
    backdrop-filter: blur(2px);
  }
  
  .VoiceReviewCircleBtn--primary {
    background: rgba(255, 255, 255, 0.96);
    color: #111111;
  }
  
  @keyframes VoiceSpin {
    from {
      transform: rotate(0deg);
    }
    to {
      transform: rotate(360deg);
    }
  }

/* =========================
   chat2 AI气泡内嵌操作卡片
   ========================= */
.ActionCardList {
  width: 100%;
  margin-top: 7px;
  box-sizing: border-box;
}

.ActionCard {
  position: relative;
  width: 100%;
  margin-top: 6px;
  padding: 9px 28px 9px 11px;
  border-radius: 10px;
  background: linear-gradient(135deg, #eef5ff 0%, #ffffff 100%);
  border: 0.5px solid #d9e6ff;
  box-shadow: 0 5px 12px rgba(52, 96, 180, 0.08);
  box-sizing: border-box;
}

.ActionCard::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  bottom: 9px;
  width: 4px;
  border-radius: 499.5px;
  background: linear-gradient(180deg, #6aa8ff 0%, #4e7df3 100%);
}

.ActionCard::after {
  content: '›';
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: #7f93b8;
  font-weight: 700;
}

.ActionCardText {
    display: block;
    width: 100%;
    padding-left: 6px;
    font-size: 13px;
    line-height: 1.45;
    color: #2f456e;
    font-weight: 700;
  
    /* 允许 hint / report 气泡文字自然换行 */
    white-space: normal;
    word-break: break-word;
    overflow: visible;
    text-overflow: clip;
  }

.ActionCardTitle {
  display: block;
  padding-left: 6px;
  font-size: 13px;
  line-height: 1.45;
  color: #2f456e;
  font-weight: 700;
}

.ActionCardQuery {
  display: block;
  padding-left: 6px;
  margin-top: 2px;
  font-size: 11.5px;
  line-height: 1.45;
  color: #7282a1;
}

.ActionCard--danger {
  background: linear-gradient(135deg, #fff1f1 0%, #ffffff 100%);
  border-color: #ffd5d5;
  box-shadow: 0 5px 12px rgba(200, 64, 64, 0.08);
}

.ActionCard--danger::before {
  background: linear-gradient(180deg, #ff7b7b 0%, #e34d4d 100%);
}

.ActionCard--danger::after {
  color: #d46a6a;
}

.ActionCard--danger .ActionCardText,
.ActionCard--danger .ActionCardTitle {
  color: #9b3333;
}

.ActionCard--danger .ActionCardQuery {
  color: #a86b6b;
}

.ActionCard--disabled {
  background: #f5f7fa;
  border-color: #e1e7f0;
  box-shadow: none;
  opacity: 0.68;
}

.ActionCard--disabled::before {
  background: #c5cedc;
}

.ActionCard--disabled::after {
  content: '';
}

.ActionCard--disabled .ActionCardText,
.ActionCard--disabled .ActionCardTitle,
.ActionCard--disabled .ActionCardQuery {
  color: #9aa6bb;
}
