// SCSS 变量定义
$font-size-text: 32rpx;
$font-size-tip: 30rpx;
$font-size-title: 34rpx;
$text-color-sub: #999;
$primary-color: #0877F1;

.chat-page {
  display: flex;
  flex-direction: column;
  height: 100vh;
  background-color: #f5f5f5;
  overflow: hidden;
}

/* 患者信息栏样式 */
.patient-info-bar {
  position: relative;
  background: #fff;
  border-bottom: 1rpx solid #f0f0f0;
  padding: 20rpx 32rpx;
  z-index: 10;
  flex-shrink: 0; /* 防止被压缩 */
}

.patient-info-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12rpx;
  flex-shrink: 0;
}

.patient-basic-info {
  display: flex;
  align-items: center;
  gap: 16rpx;
  flex: 1;
  min-width: 0; /* 允许文字截断 */
}

.patient-name {
  font-size: 32rpx;
  color: #333;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200rpx;
}

.patient-detail {
  font-size: 28rpx;
  color: #999;
  white-space: nowrap;
  flex-shrink: 0;
}

.patient-detail-btn {
  display: flex;
  align-items: center;
  gap: 4rpx;
  padding: 12rpx 24rpx;
  background: linear-gradient(270deg, #1b5cc8 2.26%, #0877f1 94.33%);
  border-radius: 40rpx;
  transition: all 0.2s;
  flex-shrink: 0; /* 防止按钮被压缩 */
}

.patient-detail-btn:active {
  opacity: 0.8;
  transform: scale(0.98);
}

.detail-btn-text {
  font-size: 26rpx;
  color: #fff;
  font-weight: 500;
}

.remind-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10rpx 20rpx;
  border-radius: 24rpx;
  border: 2rpx solid #3876f6;
  background: #fff;
}

.remind-btn:active {
  opacity: 0.85;
}

.remind-btn-text {
  font-size: 24rpx;
  color: #3876f6;
  line-height: 1.4;
}

.arrow-icon {
  font-size: 32rpx;
  color: #fff;
  font-weight: 600;
  line-height: 1;
}

.chat-content {
  flex: 1;
  box-sizing: border-box;
  overflow-x: hidden;
  min-height: 0;
}

.chat-content-compressed {
  height: calc(100vh - 600rpx);
}

.waiting-consultation-card {
  position: relative;
  z-index: 2;
  margin-top: 32rpx;
  background: #fff;
  border-radius: 16rpx;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.waiting-card-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.waiting-illust {
  width: 72rpx;
  height: 72rpx;
  border-radius: 16rpx;
  background: #f5f7fb;
  object-fit: contain;
  margin-right: 16rpx;
}

.waiting-card-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-width: 0;
}

.waiting-title {
  font-size: $font-size-text;
  color: #000;
  font-weight: 600;
  margin-bottom: 8rpx;
  line-height: 1.2;
  display: flex;
  align-items: center;
}

.waiting-desc {
  color: #78808f;
  font-size: $font-size-text;
  margin: 32rpx;
  line-height: 24px;
}

.waiting-btn-wrap {
  width: 100%;
  box-sizing: border-box;
  padding: 0 32rpx;
  margin-bottom: 42rpx;
  display: flex;
  justify-content: center;
}

.waiting-btn {
  width: 100%;
  background: linear-gradient(270deg, #1b5cc8 2.26%, #0877f1 94.33%);
  color: #fff;
  font-size: 28rpx;
  font-weight: 600;
  border-radius: 40rpx;
  height: 80rpx;
  line-height: 80rpx;
  box-shadow: 0 2rpx 8rpx rgba(59, 124, 255, 0.08);
  border: none;
  text-align: center;
  padding: 0;
}

.doctor-avatar-outer {
  margin-left: 48rpx;
  position: relative;
}

.doctor-avatar {
  position: absolute;
  bottom: -10rpx;
  width: 140rpx;
  height: 140rpx;
  border-radius: 140rpx;
  box-shadow: 0 4px 7.3px 0 #00000014;
  background: #fff;
  margin-left: 24rpx;
}

.system-message {
  border-radius: 16rpx;
  padding: 12rpx;
  margin: 20rpx 24rpx;
  text-align: center;
  position: relative;
  z-index: 2;
}

.system-text {
  color: $text-color-sub;
  font-size: $font-size-tip;
  line-height: 1.4;
}

.message-list {
  padding: 0 16rpx;
  padding-bottom: 60rpx; /* 增加底部内边距，防止被小程序底部横线遮挡 */
}

.message-item {
  margin-bottom: 30rpx;
}

.message-content {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 20rpx;
  max-width: 100%;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.message-right .message-content {
  flex-direction: row-reverse;
}

.doctor-msg-avatar {
  width: 60rpx;
  height: 60rpx;
  border-radius: 50%;
  margin-top: 10rpx; 
}

.user-msg-avatar {
  width: 60rpx;
  height: 60rpx;
  border-radius: 50%;
  margin-top: 10rpx; 
}

// 消息气泡容器
.message-bubble-container {
  display: flex;
  flex-direction: column;
  max-width: 70%;
}

// 用户名标签样式
.username-label {
  margin-bottom: 6rpx;
  
  &.left {
    text-align: left;
  }
  
  &.right {
    text-align: right;
  }
}

.username-text {
  font-size: 24rpx;
  color: #999;
  line-height: 1.2;
}

.message-bubble {
  min-width: 60rpx;
  padding: 12rpx 16rpx;
  border-radius: 18rpx;
  position: relative;
  word-wrap: break-word;
  word-break: break-all;
  overflow-wrap: break-word;
}

.doctor-bubble {
  background-color: white;
  color: #333;
}

.doctor-bubble::before {
  content: "";
  position: absolute;
  top: 18rpx;
  left: -18rpx;
  width: 0;
  height: 0;
  border-left: 10rpx solid transparent;
  border-bottom: 10rpx solid transparent;
  border-right: 10rpx solid white;
  border-top: 10rpx solid transparent;
}

.user-bubble {
  background-color: #0877F1;
  color: white;
}

.user-bubble::after {
  content: "";
  position: absolute;
  top: 18rpx;
  right: -18rpx;
  width: 0;
  height: 0;
  border-left: 10rpx solid #0877F1;
  border-bottom: 10rpx solid transparent;
  border-right: 10rpx solid transparent;
  border-top: 10rpx solid transparent;
}

/* 医生发送的蓝色气泡（用于消息卡片） */
.doctor-bubble-blue {
  background-color: #0877F1;
  color: white;
}

.doctor-bubble-blue::before {
  content: "";
  position: absolute;
  top: 18rpx;
  left: -18rpx;
  width: 0;
  height: 0;
  border-left: 10rpx solid transparent;
  border-bottom: 10rpx solid transparent;
  border-right: 10rpx solid #0877F1;
  border-top: 10rpx solid transparent;
}

.message-text {
  font-size: 32rpx;
  line-height: 1.4;
  word-wrap: break-word;
  word-break: break-all;
  white-space: pre-wrap;
  overflow-wrap: break-word;
}

.message-time {
  font-size: $font-size-tip;
  opacity: 0.7;
  margin-top: 4rpx;
  text-align: right;
}

.message-system {
  text-align: center;
  margin: 8rpx 0;
}

.input-section {
  background: #fff;
  border-top: 1rpx solid #e0e0e0;
  position: relative;
  z-index: 200;
  padding-bottom: 40rpx;
  flex-shrink: 0;
}

.input-toolbar {
  display: flex;
  align-items: center;
  padding: 16rpx 20rpx;
  gap: 12rpx;
}

.voice-toggle-btn {
  width: 56rpx;
  height: 56rpx;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0;
}

.voice-toggle-icon {
  width: 56rpx;
  height: 56rpx;
  display: flex;
  align-items: center;
  justify-content: center;
}

.plus-btn {
  width: 56rpx;
  height: 56rpx;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0;
}

.send-btn {
  background: #3876f6;
  color: #fff;
  font-size: 30rpx;
  font-weight: 600;
  border: none;
  border-radius: 40rpx;
  height: 56rpx;
  min-width: 112rpx;
  padding: 0 32rpx;
  box-shadow: 0 2rpx 8rpx rgba(56, 118, 246, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  flex-shrink: 0;
  white-space: nowrap;
}

.send-btn:active {
  background: #2456c7;
}

.disabled-btn {
  background: #ccc;
  color: #fff;
  font-size: 30rpx;
  font-weight: 600;
  border: none;
  border-radius: 40rpx;
  height: 56rpx;
  min-width: 112rpx;
  padding: 0 32rpx;
  box-shadow: 0 2rpx 8rpx rgba(200, 200, 200, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  white-space: nowrap;
  cursor: not-allowed;
}

.input-area {
  flex: 1;
  margin: 0 8rpx;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.text-input,
.voice-input-btn {
  flex: 1;
  padding: 16rpx;
  background-color: #f3f5fa;
  border-radius: 10rpx;
  font-size: 30rpx;
  min-height: 80rpx;
  max-height: 200rpx;
  border: none;
  outline: none;
  box-sizing: border-box;
  line-height: 1.5;
  color: #333;
  display: flex;
  align-items: center;
  justify-content: center;
}

.text-input {
  padding: 20rpx;
  display: block;
  line-height: 1.5;
  height: 80rpx;
}

.voice-input-btn {
  height: 80rpx;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 46rpx;
  text-align: center;
  line-height: 80rpx;
}

.more-panel {
  display: flex;
  justify-content: flex-start;
  background: #fff;
  border-top: 1rpx solid #eee;
  padding: 20rpx 32rpx 40rpx;
  gap: 40rpx 28rpx;
  flex-wrap: wrap;
  background-color: #f5f5f5;
}

.more-btn {
  flex: none;
  width: 144rpx;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.more-icon {
  width: 108rpx;
  height: 108rpx;
  border-radius: 16rpx;
}

.more-btn text {
  margin-top: 20rpx;
  font-size: $font-size-text;
  color: #6b7a8b;
  line-height: 1.25;
  white-space: nowrap;
}

.consultation-bar {
  background-color: white;
  border-top: 1rpx solid #e0e0e0;
  padding: 16rpx;
  margin-bottom: 40rpx;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 -2rpx 8rpx rgba(0, 0, 0, 0.1);
  border-radius: 16rpx;
  z-index: 10; // 降低 z-index，避免遮挡弹窗组件
}

.consultation-info {
  display: flex;
  align-items: center;
  flex: 1;
}

.consultation-icon {
  margin-right: 12rpx;
}

.consultation-details {
  display: flex;
  flex-direction: column;
}

.consultation-title {
  color: #333;
  font-size: $font-size-text;
  font-weight: 600;
  margin-bottom: 4rpx;
}

.consultation-price {
  color: #ff3b30;
  font-size: $font-size-tip;
  font-weight: 500;
}

.consultation-btn {
  background-color: $primary-color;
  color: white;
  border: none;
  border-radius: 16rpx;
  height: 88rpx;
  font-size: $font-size-title;
  font-weight: 400;
  transition: all 0.3s;
}

.consultation-btn:active {
  background-color: $primary-color;
  transform: scale(0.98);
}

.consultation-btn::after {
  border: none;
}

/* 评价弹窗包裹器 - 最高优先级 */
.evaluation-popup-wrapper {
  z-index: 100000 !important;
}

/* 深度选择器，确保 uni-popup 内部元素也应用最高 z-index */
:deep(.evaluation-popup-wrapper) {
  z-index: 100000 !important;
}

:deep(.evaluation-popup-wrapper .uni-popup) {
  z-index: 100000 !important;
}

:deep(.evaluation-popup-wrapper .uni-popup__wrapper) {
  z-index: 100000 !important;
}

:deep(.evaluation-popup-wrapper .uni-popup__mask) {
  z-index: 99999 !important;
}

.evaluation-card {
  background-color: white;
  border-radius: 12rpx;
  margin: 16rpx;
  padding: 16rpx;
  box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1);
  border: 1rpx solid #e3f2fd;
  position: relative;
  z-index: 10; // 确保卡片在聊天内容之上，但低于弹出框遮罩层
}

.evaluation-content {
  display: flex;
  align-items: center;
}

.evaluation-icon {
  margin-right: 12rpx;
}

.evaluation-info {
  flex: 1;
}

.evaluation-title {
  color: #333;
  font-size: $font-size-text;
  font-weight: 600;
  display: block;
  margin-bottom: 4rpx;
}

.evaluation-subtitle {
  color: #666;
  font-size: $font-size-tip;
}

.evaluation-btn {
  background-color: $primary-color;
  border-radius: 16rpx;
  padding: 12rpx 20rpx;
}

.btn-text {
  color: white;
  font-size: $font-size-text;
  font-weight: 400;
}

.evaluation-popup-container {
  width: 100vw;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  position: relative;
  z-index: 100001 !important; // 确保弹窗在最上层，使用 !important 覆盖其他样式
}

/* 评价弹窗样式 */
.evaluation-popup {
  background-color: white;
  border-top-left-radius: 16rpx;
  border-top-right-radius: 16rpx;
  width: 100%;
  max-height: 80vh;
  padding: 20rpx;
  padding-bottom: calc(20rpx + 40rpx);
  position: relative;
  box-sizing: border-box;
  margin: 0;
  z-index: 100002 !important; // 确保弹窗内容在最上层
}

.popup-indicator {
  width: 40rpx;
  height: 4rpx;
  background-color: #e0e0e0;
  border-radius: 2rpx;
  margin: 0 auto 16rpx;
}

.popup-close {
  position: absolute;
  top: 16rpx;
  right: 16rpx;
  z-index: 10;
}

.doctor-info-section {
  text-align: center;
  margin-bottom: 24rpx;
}

.doctor-avatar-large {
  width: 60rpx;
  height: 60rpx;
  border-radius: 50%;
  margin-bottom: 12rpx;
}

.doctor-name {
  display: block;
  color: #333;
  font-size: $font-size-text;
  font-weight: 500;
  margin-bottom: 4rpx;
}

.doctor-dept {
  color: $text-color-sub;
  font-size: $font-size-tip;
}

.rating-section {
  text-align: center;
  margin-bottom: 24rpx;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* uni-rate 包装器样式 */
.rate-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

/* uni-rate 样式调整 */
.rating-section .uni-rate {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
}

.rating-text {
  display: block;
  font-size: $font-size-text;
  font-weight: 600;
  margin-top: 12rpx;
  color: $primary-color;
}

/* 当评分为0时的提示样式 */
.rating-text.no-rating {
  color: #999;
}

.comment-section {
  margin-bottom: 24rpx;
  position: relative;
}

.evaluation-textarea {
  width: 100%;
  min-height: 120rpx;
  background-color: #f8f9fa;
  border: 1rpx solid #e9ecef;
  border-radius: 16rpx;
  padding: 12rpx;
  font-size: $font-size-tip;
  line-height: 1.5;
  box-sizing: border-box;
  resize: none;
  margin: 0;
}

.char-count {
  position: absolute;
  bottom: 8rpx;
  right: 12rpx;
  color: #999;
  font-size: $font-size-tip;
}

.evaluation-footer {
  text-align: center;
}

.submit-evaluation-btn {
  background-color: $primary-color;
  color: white;
  border: none;
  border-radius: 16rpx;
  padding: 12rpx 40rpx;
  font-size: $font-size-text;
  font-weight: 600;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
}

/* 评价成功弹窗样式 */
.success-popup {
  background-color: white;
  width: auto;
  padding: 32rpx 20rpx 48rpx 20rpx;
  padding-bottom: calc(48rpx + 40rpx);
  text-align: center;
  margin: 0 auto;
  position: relative;
  z-index: 100002 !important; // 确保弹窗在最上层
}

.success-icon {
  margin-bottom: 16rpx;
}

.success-title {
  display: block;
  color: #333;
  font-size: $font-size-text;
  font-weight: 500;
  margin-bottom: 8rpx;
}

.success-eval-box {
  background: #f5f5f5;
  border-radius: 16rpx;
  box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.08);
  padding: 32rpx 20rpx 24rpx 20rpx;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.success-subtitle {
  color: #666;
  font-size: $font-size-tip;
  margin-bottom: 20rpx;
}

.success-rating {
  margin-bottom: 16rpx;
}

.success-rating .uni-rate {
  display: flex;
  justify-content: center;
  align-items: center;
}

.success-rating-text {
  display: block;
  color: $primary-color;
  font-size: $font-size-tip;
  font-weight: 500;
  margin-top: 8rpx;
}

.success-comment {
  background-color: #f8f9fa;
  border-radius: 16rpx;
  padding: 12rpx;
  margin-top: 16rpx;
  width: 100%;
  box-sizing: border-box;
  word-break: break-all;
  white-space: pre-wrap;
  overflow-wrap: break-word;
}

.comment-text {
  color: $text-color-sub;
  font-size: $font-size-tip;
  line-height: 1.4;
  word-break: break-all;
  white-space: pre-wrap;
  overflow-wrap: break-word;
}

.success-header-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12rpx;
  margin-bottom: 8rpx;
}

.success-icon {
  margin-bottom: 0;
}

.success-title {
  display: inline-block;
  color: #333;
  font-size: $font-size-text;
  font-weight: 500;
  margin-bottom: 0;
}

/* 导航栏下方添加倒计时条 */
.consult-countdown-bar {
  position: fixed;
  top: 0; // 导航栏高度，根据实际情况调整
  left: 0;
  right: 0;
  width: 100%;
  background: #ffd6d6;
  color: #e53935;
  text-align: center;
  padding: 12rpx 0;
  font-size: $font-size-text;
  font-weight: 500;
  border-bottom: none;
  z-index: 100; // 确保悬浮在聊天内容上方
  box-shadow: 0 2rpx 8rpx rgba(229, 57, 53, 0.1); // 添加轻微阴影，增强悬浮效果
}

.countdown-text {
  color: #e53935;
}

.waiting-section {
  position: relative;
  width: 100%;
  overflow: hidden;
  margin-top: -32rpx;
}

.waiting-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 200rpx;
  background-color: #0976f0;
  border-bottom-left-radius: 50rpx;
  border-bottom-right-radius: 50rpx;
  z-index: 1;
}

.waiting-card-outer {
  position: relative;
  z-index: 2;
  margin: 0 24rpx;
  margin-top: 0;
  padding-bottom: 20rpx;
}

.hospital-name {
  color: #fff;
  font-size: $font-size-text;
  font-weight: 500;
  line-height: 48rpx;
  margin: 32rpx 0 16rpx 8rpx;
  position: relative;
  z-index: 2;
}

/* 加载更多提示样式 */
.load-more-tip {
  padding: 20rpx;
  text-align: center;
}

.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12rpx;
}

.loading-icon {
  font-size: 28rpx;
  animation: rotate 1s linear infinite;
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.loading-text {
  font-size: 24rpx;
  color: #999;
}

.load-tip {
  display: flex;
  align-items: center;
  justify-content: center;
}

.tip-text {
  font-size: 24rpx;
  color: #999;
}

.completed-text {
  font-size: 24rpx;
  color: #ccc;
}

.waiting-card-row {
  display: flex;
  align-items: center;
  width: 100%;
  height: 140rpx;
  background: linear-gradient(-30.3deg, #cbdaff 0%, #e8f3ff 100%);
  border-top-left-radius: 16rpx;
  border-top-right-radius: 16rpx;
}

.waiting-illust {
  width: 116rpx;
  height: 120rpx;
  background: transparent;
  object-fit: contain;
  margin: 10rpx 18rpx;
}

.waiting-card-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 0 8rpx;
}

.waiting-desc {
  color: #999;
  font-size: 24rpx;
  margin-bottom: 24rpx;
  line-height: 1.4;
  text-align: center;
}

.text-input {
  color: #000;
}

.text-input::-webkit-input-placeholder,
.text-input:-moz-placeholder,
.text-input::-moz-placeholder,
.text-input:-ms-input-placeholder,
.text-input::placeholder {
  line-height: normal;
}

.voice-input-btn::-webkit-input-placeholder,
.voice-input-btn:-moz-placeholder,
.voice-input-btn::-moz-placeholder,
.voice-input-btn:-ms-input-placeholder,
.voice-input-btn::placeholder {
  line-height: 80rpx;
}

/* 时间分割线 */
.time-divider {
  text-align: center;
  margin: 20rpx 0;
}

.time-text {
  color: #999;
  font-size: 22rpx;
}

/* 消息状态 */
.message-status {
  margin-left: 12rpx;
  align-self: flex-end;
}

.status-text {
  font-size: 22rpx;
  color: #999;
}

.status-text.failed {
  color: #ff4d4f;
}

.voice-message {
  min-width: 100rpx;
  padding: 0rpx 8rpx;
  border-radius: 16rpx;
  transition: all 0.2s;
  display: flex;
  
  &.voice-playing {
    transform: scale(1.02);
  }
}

.voice-message:active {
  background-color: rgba(255, 255, 255, 0.2);
}

.voice-content {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8rpx;
}

.voice-icon-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8rpx;
  position: relative;
}

.icon-animate {
  animation: voice-icon-pulse 1.5s ease-in-out infinite;
}

@keyframes voice-icon-pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.1);
  }
}

.sound-wave {
  display: flex;
  align-items: center;
  gap: 4rpx;
  margin-left: 4rpx;
}

.wave-bar {
  width: 4rpx;
  height: 24rpx;
  border-radius: 2rpx;
  animation: wave-animation 1s ease-in-out infinite;
}

@keyframes wave-animation {
  0%, 100% {
    height: 8rpx;
  }
  50% {
    height: 24rpx;
  }
}

.voice-duration {
  font-size: 26rpx;
  color: inherit;
}

/* 图片消息样式 */
.message-image {
  max-width: 400rpx; /* 限制最大宽度 */
  max-height: 400rpx; /* 限制最大高度，参考微信 */
  min-height: 120rpx; /* 设置最小高度 */
  min-width: 200rpx; /* 设置最小宽度 */
  border-radius: 12rpx;
  object-fit: cover; /* 保持图片比例，裁剪多余部分 */
}

/* 图片消息气泡 - 无背景色 */
.image-bubble {
  background: transparent !important;
  padding: 0 !important;
  border-radius: 0 !important;
}

/* 移除图片消息气泡的小三角 */
.image-bubble::before,
.image-bubble::after {
  display: none !important;
}

.message-right .message-card {
  margin-right: 8rpx;
}

.message-left .message-card {
  margin-left: 8rpx;
}

.card-avatar-row {
  display: flex;
  align-items: flex-start;
  gap: 8rpx;
}

.test-load-btn {
  position: fixed;
  bottom: 200rpx; 
  left: 50%;
  transform: translateX(-50%);
  background-color: $primary-color;
  color: white;
  font-size: 28rpx;
  font-weight: 600;
  border-radius: 40rpx;
  height: 80rpx;
  line-height: 80rpx;
  padding: 0 40rpx;
  box-shadow: 0 2rpx 8rpx rgba(56, 118, 246, 0.08);
  z-index: 10;
}

.test-btn-text {
  color: white;
} 

/* 录音遮罩层样式 */
.recording-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999; // 录音遮罩层低于评价弹窗（99999）
  animation: fadeIn 0.2s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.recording-modal {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(40, 40, 40, 0.95);
  border-radius: 32rpx;
  padding: 80rpx 100rpx;
  backdrop-filter: blur(10rpx);
  animation: scaleIn 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  transition: all 0.3s ease;
}

.recording-modal.cancel-mode {
  background: rgba(60, 60, 60, 0.95);
  border: 4rpx solid #ff4757;
}

@keyframes scaleIn {
  0% {
    transform: scale(0.5);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.recording-icon-container {
  position: relative;
  width: 200rpx;
  height: 200rpx;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 40rpx;
}

/* 波纹动画 */
.wave-circle {
  position: absolute;
  width: 200rpx;
  height: 200rpx;
  border-radius: 50%;
  border: 4rpx solid rgba(255, 71, 87, 0.8);
  animation: wave 1.5s ease-out infinite;
}

.wave-1 { animation-delay: 0s; }
.wave-2 { animation-delay: 0.5s; }
.wave-3 { animation-delay: 1s; }

@keyframes wave {
  0% {
    transform: scale(0.5);
    opacity: 1;
  }
  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

.mic-icon-wrapper {
  position: relative;
  z-index: 10;
  width: 120rpx;
  height: 120rpx;
  background: linear-gradient(135deg, #ff4757 0%, #ff6b7a 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8rpx 24rpx rgba(255, 71, 87, 0.4);
  animation: pulse 1.5s ease-in-out infinite;
  transition: all 0.3s ease;
}

.mic-icon-wrapper.cancel-icon {
  background: linear-gradient(135deg, #666 0%, #888 100%);
  animation: shake 0.5s ease-in-out infinite;
  box-shadow: 0 8rpx 24rpx rgba(102, 102, 102, 0.4);
}

@keyframes shake {
  0%, 100% { transform: rotate(-5deg); }
  50% { transform: rotate(5deg); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.recording-text {
  font-size: 32rpx;
  color: #fff;
  font-weight: 600;
  margin-bottom: 20rpx;
  letter-spacing: 2rpx;
  transition: all 0.3s ease;
}

.recording-text.cancel-text {
  color: #ff4757;
  font-size: 34rpx;
}

.recording-hint {
  font-size: 24rpx;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 24rpx;
}

.recording-duration {
  font-size: 48rpx;
  color: #ff4757;
  font-weight: bold;
  letter-spacing: 2rpx;
  text-shadow: 0 2rpx 8rpx rgba(255, 71, 87, 0.3);
}

.cancel-hint {
  display: flex;
  align-items: center;
  gap: 12rpx;
  font-size: 28rpx;
  color: #ff4757;
  font-weight: 600;
  margin-top: 20rpx;
  animation: bounce 0.8s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10rpx); }
} 

/* 文章卡片样式 */
.article-card {
  display: flex;
  align-items: center;
  background-color: transparent;
  border-radius: 12rpx;
  padding: 24rpx;
  max-width: 500rpx;
  box-shadow: none;
  background-color: #fff;
}

.article-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  margin-right: 20rpx;
  min-width: 0;
}

.article-title {
  font-size: 28rpx;
  color: #333;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 8rpx;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.article-desc {
  font-size: 24rpx;
  color: #999;
  line-height: 1.3;
}

.article-image {
  width: 120rpx;
  height: 120rpx;
  border-radius: 8rpx;
  flex-shrink: 0;
}

/* 文章卡片在不同消息流中的样式 */
.message-right .article-card {
  background-color: transparent;
}

.message-left .article-card {
  background-color: transparent;
}

/* 问卷卡片样式 */
.survey-card {
  display: flex;
  align-items: center;
  background-color: #fff;
  border-radius: 12rpx;
  padding: 24rpx;
  max-width: 500rpx;
  box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.08);
}

.survey-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  margin-right: 20rpx;
  min-width: 0;
}

.survey-title {
  font-size: 28rpx;
  color: #333;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 8rpx;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.survey-desc {
  font-size: 24rpx;
  color: #999;
  line-height: 1.3;
}

.survey-image {
  width: 120rpx;
  height: 120rpx;
  border-radius: 8rpx;
  flex-shrink: 0;
}

/* 问卷卡片在不同消息流中的样式 */
.message-right .survey-card {
  background-color: #e8f4ff;
}

.message-left .survey-card {
  background-color: #fff;
}
