.myIframe {
  position: fixed;
  left: 10px;
  bottom: 10px;
  z-index: 20000;
  width: 600px;
  height: 589px;
  border-radius: 12px 12px 12px 12px;
  background-color: #f5f5f5;
  box-shadow: 0px 3px 6px 1px rgba(0, 0, 0, 0.1);
  /* 头部样式 */
  /* 聊天区域 */
  /* 消息气泡 */
  /* 底部输入区域 */
  /* 时间戳 */
  /* 系统消息 */
}

.myIframe .chat-header {
  height: 50px;
  background: #ea5520;
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 15px;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  border-radius: 12px 12px 0 0;
}

.myIframe .chart {
  height: 100%;
}

.myIframe .header-left,
.myIframe .header-right {
  display: flex;
  align-items: center;
}

/* 统一按钮基础样式 */
.myIframe .header-right .window-btn {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 10px;
  border-radius: 4px;
  color: #fff;
  cursor: pointer;
  user-select: none;
  background-repeat: no-repeat;
  background-position: center;
}

/* 按钮悬停效果 */
.myIframe .header-right .window-btn:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

/* 最小化按钮图标 */
.myIframe .window-min {
  background-image: url('data:image/svg+xml;utf8,<svg width="18" height="18" viewBox="0 0 18 18" xmlns="http://www.w3.org/2000/svg"><path d="M3 9h12" stroke="white" stroke-width="1.5" fill="none"/></svg>');
}

/* 放大按钮图标（单框） */
.myIframe .window-max {
  background-image: url('data:image/svg+xml;utf8,<svg width="18" height="18" viewBox="0 0 18 18" xmlns="http://www.w3.org/2000/svg"><rect x="3.5" y="3.5" width="11" height="11" stroke="white" stroke-width="1" fill="none"/></svg>');
}

/* 恢复按钮图标（双框，最大化/最小化恢复时使用） */
.myIframe .window-max.restore,
.myIframe .window-min.restore {
  background-image: url('data:image/svg+xml;utf8,<svg width="18" height="18" viewBox="0 0 18 18" xmlns="http://www.w3.org/2000/svg"><path d="M5.5 5.5v-2h10v10h-2" stroke="white" stroke-width="1" fill="none"/><rect x="3.5" y="5.5" width="10" height="10" stroke="white" stroke-width="1" fill="none"/></svg>');
}

/* 关闭按钮图标（X） */
.myIframe .window-close {
  background-image: url('data:image/svg+xml;utf8,<svg width="18" height="18" viewBox="0 0 18 18" xmlns="http://www.w3.org/2000/svg"><path d="M4 4l10 10M14 4l-10 10" stroke="white" stroke-width="1.5" fill="none"/></svg>');
}

.myIframe.minimized .bd,
.myIframe.minimized .chart,
.myIframe.minimized #messages {
  display: none;
}

.myIframe.maximized {
  /* 最大化状态样式，具体尺寸由JS控制 */
}

.myIframe .avatar {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background-color: #ddd;
  margin-right: 10px;
  overflow: hidden;
}

.myIframe .message.right .avatar {
  margin-right: 0;
  margin-left: 10px;
}

.myIframe .avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.myIframe .contact-info h5 {
  margin: 0;
  font-size: 16px;
}

.myIframe .contact-info p {
  margin: 0;
  font-size: 12px;
  opacity: 0.9;
}

.myIframe .header-icons i {
  margin-left: 15px;
  font-size: 20px;
}

.myIframe .chat-container {
  margin-top: 0px;
  margin-bottom: 10px;
  padding: 15px 20px;
  overflow-y: auto;
  height: calc(100% - 160px);
}

.myIframe .message {
  display: flex;
  margin-bottom: 15px;
  align-items: flex-start;
}

.myIframe .message.left {
  justify-content: flex-start;
}

.myIframe .message.right {
  justify-content: flex-end;
}

.myIframe .message-content {
  max-width: 70%;
  position: relative;
}

.myIframe .message.left .message-content {
  background-color: white;
  border-radius: 0 10px 10px 10px;
  padding: 10px;
}

.myIframe .message.right .message-content {
  background-color: #ea5520;
  border-radius: 10px 0 10px 10px;
  padding: 10px;
}

.myIframe .message-text {
  margin: 0;
  font-size: 14px; /* 统一字体大小 */
  word-wrap: break-word;
  color: #fff;
  line-height: 1.6; /* 统一行高 */
}

/* 针对 markdown 内容中的元素进行样式重置，确保统一 */
.myIframe .message-text p,
.myIframe .message-text ul,
.myIframe .message-text ol,
.myIframe .message-text li {
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 8px; /* 段落间距 */
  margin-top: 0;
}

/* 移除最后一个元素的下边距，确保气泡内垂直居中 */
.myIframe .message-text > *:last-child {
  margin-bottom: 0;
}


.myIframe .message-text h1 {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.myIframe .message-text h1,
.myIframe .message-text h2,
.myIframe .message-text h3,
.myIframe .message-text h4,
.myIframe .message-text h5,
.myIframe .message-text h6 {
  font-weight: bold;
  margin-top: 12px;
  margin-bottom: 8px;
  line-height: 1.4;
}

.myIframe .message-text h1 { font-size: 18px; }
.myIframe .message-text h2 { font-size: 17px; }
.myIframe .message-text h3 { font-size: 16px; }
.myIframe .message-text h4 { font-size: 15px; }
.myIframe .message-text h5 { font-size: 14px; }
.myIframe .message-text h6 { font-size: 14px; }

/* 列表样式 */
.myIframe .message-text ul,
.myIframe .message-text ol {
  padding-left: 20px;
}

/* 代码块样式 */
.myIframe .message-text pre {
  background-color: #f5f5f5;
  padding: 10px;
  border-radius: 4px;
  overflow-x: auto;
  font-family: monospace;
  font-size: 13px;
  color: #333;
  margin-bottom: 10px;
}

.myIframe .message-text code {
  background-color: rgba(0, 0, 0, 0.05);
  padding: 2px 4px;
  border-radius: 3px;
  font-family: monospace;
  font-size: 13px;
}

/* 左侧（客服/AI）消息颜色 */
.myIframe .chat-container .left .message-text,
.myIframe .chat-container .left .message-text p,
.myIframe .chat-container .left .message-text li,
.myIframe .chat-container .left .message-text h1,
.myIframe .chat-container .left .message-text h2,
.myIframe .chat-container .left .message-text h3 {
  color: #262626;
}

/* 右侧（用户）消息颜色 */
.myIframe .chat-container .right .message-text,
.myIframe .chat-container .right .message-text p {
  color: #fff;
}

.myIframe .message-time {
  font-size: 12px;
  color: #999;
  text-align: right;
  margin-top: 5px;
}

.myIframe .chat-footer {
  bottom: 0;
  left: 0;
  right: 0;
  background-color: #f5f5f5;
  padding: 10px;
  display: flex;
  align-items: center;
  border-top: 1px solid #ddd;
  border-radius: 0 0 12px 12px;
}

.myIframe .input-group {
  flex: 1;
  display: flex;
  background-color: white;
  border-radius: 5px;
  padding: 5px;
}

.myIframe .input-group textarea {
  flex: 1;
  border: none;
  outline: none;
  padding: 5px 10px;
  font-size: 16px;
  height: 50px !important;
}

.myIframe .send-btn {
  background: linear-gradient(315deg, #ea5520 0%, #ff9113 100%);
  color: white;
  border: none;
  border-radius: 5px;
  padding: 8px 15px;
  margin-left: 10px;
  cursor: pointer;
  font-size: 14px;
}

.myIframe .send-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.myIframe .timestamp {
  text-align: center;
  margin: 10px 0;
  color: #999;
  font-size: 12px;
}

.myIframe .system-message {
  text-align: center;
  margin: 15px 0;
  color: #333;
  font-size: 14px;
}

.myIframe .system-message span {
  background-color: #e5e5e5;
  padding: 3px 10px;
  border-radius: 3px;
}

.myIframe .chat-container .left .message-text {
  color: #262626;
}

.myIframe .bd {
  overflow: auto;
  height: 90%;
  padding: 20px;
}

.myIframe #contactForm {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}

.myIframe .form-group {
  margin-bottom: 20px;
  width: 100%;
}

.myIframe .form-group label {
  font-size: 14px;
  margin-bottom: 5px;
  display: block;
}

.myIframe .form-control {
  border: 1px solid #d4d7d9;
  padding: 10px;
  border-radius: 4px;
  width: 100%;
  box-sizing: border-box;
  height: 40px;
  font-size: 14px !important;
}

.myIframe .checkbox-label {
  font-size: 14px !important;
  margin-left: 5px;
}

.myIframe .submit-btn {
  color: white;
  border: none;
  padding: 12px 40px;
  border-radius: 20px;
  font-size: 16px;
  cursor: pointer;
  width: 350px;
  height: 40px;
  background: linear-gradient(90deg, #ff622a 0%, #ea5520 100%);
  border-radius: 26px 26px 26px 26px;
  margin-top: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.myIframe .submit-btn:hover {
  background-color: #e64a19;
}

.myIframe .product-type {
  display: flex;
}

.myIframe input[type="checkbox"] {
  margin-right: 15px !important;
}

.myIframe .required {
  color: red;
}

.myIframe #message {
  height: 80px !important;
}

.myIframe .checkbox {
  display: flex;
  margin-right: 10px !important;
  font-size: 14px !important;
}

.gb {
  color: #fff;
  font-size: 20px !important;
  cursor: pointer;
}

input[type="text"]::placeholder,
input[type="tel"]::placeholder,
input[type="email"]::placeholder,
textarea::placeholder {
  color: #C0C4CC;
}

.message-required {
  height: 70px;
}


@media only screen and (max-width: 959px) {
  .product-type {
    margin-bottom: 10px;
    flex-wrap: wrap;
    width: 100%;
    box-sizing: border-box;
    gap: 10px;
  }


  .product-type .checkbox {
    display: flex;
    align-items: center !important;
    /* 强制垂直居中 */
    margin-bottom: 10px;
    /* 换行后行距 */
    line-height: 1;
    /* 消除行高差异 */
  }

  .product-type input[type="checkbox"] {
    margin: 0 6px 0 0 !important;
    width: 16px;
    height: 16px;
    vertical-align: middle;
    position: relative;
    top: -1px;
    /* 微调向上 */
  }

  .product-type .checkbox span {
    line-height: 1.2;
    display: inline-block;
  }

  .product-type .checkbox.checkbox-2 {
    display: flex;
    align-items: center;
  }
}