@charset "utf-8";
/* ============================================================
   阳珖科技 · 在线咨询组件（右侧悬浮对话框）
   文件：assets/css/consult.css
   说明：所有选择器均以 .yg- 前缀命名空间隔离，避免与 AmazeUI 冲突
   主题色取自站点主色：#24a5d5 / #59bcdb / #383d61
   ============================================================ */

.yg-consult {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 9990;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.65;
  color: #333;
  text-align: left;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

.yg-consult *,
.yg-consult *::before,
.yg-consult *::after { box-sizing: border-box; }

.yg-consult button {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  cursor: pointer;
  outline: none;
}
.yg-consult input,
.yg-consult textarea,
.yg-consult select {
  font-family: inherit;
  font-size: 14px;
  color: #333;
}
.yg-consult a { color: #24a5d5; text-decoration: none; }
.yg-consult p { margin: 0; }

/* ---------------- 遮罩（移动端） ---------------- */
.yg-mask {
  position: fixed;
  inset: 0;
  background: rgba(30, 34, 48, .45);
  opacity: 0;
  visibility: hidden;
  transition: opacity .22s, visibility .22s;
  z-index: 9989;
}
.yg-consult.yg-open ~ .yg-mask { opacity: 1; visibility: visible; }

/* ---------------- 悬浮入口 ---------------- */
.yg-launcher {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  height: 56px;
  padding: 0 22px 0 18px;
  border-radius: 28px;
  color: #fff;
  background: linear-gradient(135deg, #59bcdb 0%, #24a5d5 100%);
  box-shadow: 0 8px 24px rgba(36, 165, 213, .38);
  transition: transform .25s, box-shadow .25s, opacity .2s;
}
.yg-launcher:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(36, 165, 213, .48);
}
.yg-launcher:active { transform: translateY(0); }
.yg-launcher svg { flex: 0 0 auto; width: 22px; height: 22px; fill: #fff; }
.yg-launcher-txt { font-size: 15px; font-weight: 600; white-space: nowrap; letter-spacing: .5px; }
.yg-consult.yg-open .yg-launcher { opacity: 0; visibility: hidden; transform: scale(.85); }

/* ---------------- 悬浮气泡提示 ---------------- */
.yg-tip {
  position: absolute;
  right: 4px;
  bottom: 70px;
  width: 208px;
  padding: 11px 30px 11px 13px;
  border-radius: 12px 12px 4px 12px;
  background: #fff;
  box-shadow: 0 8px 26px rgba(56, 61, 97, .18);
  color: #383d61;
  font-size: 13.5px;
  line-height: 1.55;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .28s, transform .28s, visibility .28s;
}
.yg-tip.yg-show { opacity: 1; visibility: visible; transform: none; }
.yg-tip b { color: #24a5d5; }
.yg-tip-close {
  position: absolute;
  top: 5px;
  right: 6px;
  width: 20px;
  height: 20px;
  line-height: 19px;
  text-align: center;
  border-radius: 50%;
  color: #a9adbd;
  font-size: 15px;
}
.yg-tip-close:hover { background: #f0f2f6; color: #6b7182; }

/* ---------------- 快捷入口条（桌面端悬停展开） ---------------- */
.yg-shortcuts {
  position: absolute;
  right: 0;
  bottom: 66px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity .2s, transform .2s, visibility .2s;
}
@media (hover: hover) and (min-width: 641px) {
  .yg-consult:not(.yg-open):hover .yg-shortcuts { opacity: 1; visibility: visible; transform: none; }
  .yg-consult:not(.yg-open):hover .yg-tip { opacity: 0; visibility: hidden; }
}
.yg-shortcut {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 13px 0 11px;
  border-radius: 18px;
  background: #fff;
  color: #383d61;
  font-size: 13px;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(56, 61, 97, .14);
  transition: background .18s, color .18s, transform .18s;
}
.yg-shortcut:hover { background: #24a5d5; color: #fff; transform: translateX(-2px); }
.yg-shortcut svg { width: 15px; height: 15px; fill: currentColor; }

/* ---------------- 对话框主体 ---------------- */
.yg-panel {
  position: absolute;
  right: 0;
  bottom: 76px;
  display: flex;
  flex-direction: column;
  width: 374px;
  height: 552px;
  max-height: calc(100vh - 120px);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 18px 52px rgba(56, 61, 97, .24);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px) scale(.97);
  transform-origin: bottom right;
  transition: opacity .24s, transform .24s, visibility .24s;
}
.yg-consult.yg-open .yg-panel { opacity: 1; visibility: visible; transform: none; }

/* 头部 */
.yg-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 14px 14px 16px;
  background: linear-gradient(135deg, #59bcdb 0%, #24a5d5 100%);
  color: #fff;
}
.yg-head-avatar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .22);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -.5px;
}
.yg-head-meta { flex: 1 1 auto; min-width: 0; }
.yg-head-title { font-size: 15px; font-weight: 600; line-height: 1.3; }
.yg-head-sub { display: flex; align-items: center; gap: 5px; font-size: 12px; opacity: .92; }
.yg-dot-online {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #7dff9e;
  box-shadow: 0 0 0 2px rgba(125, 255, 158, .35);
}
.yg-head-close {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  line-height: 26px;
  text-align: center;
  border-radius: 50%;
  font-size: 19px;
  color: rgba(255, 255, 255, .9);
  transition: background .18s;
}
.yg-head-close:hover { background: rgba(255, 255, 255, .2); }

/* 消息区 */
.yg-body {
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px 14px 8px;
  background: #f6f7fa;
  -webkit-overflow-scrolling: touch;
}
.yg-body::-webkit-scrollbar { width: 5px; }
.yg-body::-webkit-scrollbar-thumb { background: #d3d8e2; border-radius: 3px; }

.yg-row { display: flex; margin: 0 0 12px; }
.yg-row--me { justify-content: flex-end; }
.yg-row--sys { justify-content: center; }
.yg-bubble {
  max-width: 82%;
  padding: 9px 13px;
  border-radius: 12px 12px 12px 4px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(56, 61, 97, .07);
  color: #333;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.yg-row--me .yg-bubble {
  border-radius: 12px 12px 4px 12px;
  background: linear-gradient(135deg, #59bcdb 0%, #24a5d5 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(36, 165, 213, .28);
}
.yg-bubble strong { color: #24a5d5; font-weight: 700; }
.yg-row--me .yg-bubble strong { color: #fff; }
.yg-sys-note {
  max-width: 92%;
  padding: 5px 12px;
  border-radius: 10px;
  background: rgba(56, 61, 97, .07);
  color: #7b7f92;
  font-size: 12px;
  text-align: center;
}

/* 输入中 */
.yg-typing { display: inline-flex; align-items: center; gap: 4px; height: 18px; }
.yg-typing i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #b9c0cf;
  animation: yg-blink 1.3s infinite ease-in-out both;
}
.yg-typing i:nth-child(2) { animation-delay: .18s; }
.yg-typing i:nth-child(3) { animation-delay: .36s; }
@keyframes yg-blink {
  0%, 80%, 100% { opacity: .35; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-3px); }
}

/* 快捷问题 */
.yg-chips { display: flex; flex-wrap: wrap; gap: 7px; margin: 0 0 13px; }
.yg-chip {
  padding: 7px 12px;
  border: 1px solid #d9e6ee;
  border-radius: 16px;
  background: #fff;
  color: #1b86b0;
  font-size: 13px;
  line-height: 1.3;
  text-align: left;
  transition: background .18s, border-color .18s, color .18s, transform .18s;
}
.yg-chip:hover {
  background: #24a5d5;
  border-color: #24a5d5;
  color: #fff;
  transform: translateY(-1px);
}

/* 留资表单 */
.yg-form {
  margin: 2px 0 13px;
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(56, 61, 97, .06);
}
.yg-form-title { margin: 0 0 4px; font-size: 14px; font-weight: 700; color: #383d61; }
.yg-form-tip { margin: 0 0 11px; font-size: 12px; color: #8b90a2; line-height: 1.5; }
.yg-field { margin-bottom: 9px; }
.yg-label { display: block; margin-bottom: 4px; font-size: 12.5px; color: #5d6274; }
.yg-label i { color: #ed5151; font-style: normal; }
.yg-input,
.yg-select,
.yg-textarea {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid #dde3ec;
  border-radius: 8px;
  background: #fbfcfe;
  transition: border-color .18s, box-shadow .18s, background .18s;
  appearance: none;
}
.yg-select { background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238b90a2' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 11px center; background-size: 11px; padding-right: 30px; }
.yg-textarea { min-height: 60px; resize: vertical; line-height: 1.55; }
.yg-input:focus, .yg-select:focus, .yg-textarea:focus {
  outline: none;
  border-color: #59bcdb;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(89, 188, 219, .16);
}
.yg-input.yg-err, .yg-select.yg-err { border-color: #ed5151; background: #fff8f8; }
.yg-err-msg { display: none; margin-top: 3px; font-size: 12px; color: #ed5151; }
.yg-err-msg.yg-show { display: block; }
.yg-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.yg-submit {
  display: block;
  width: 100%;
  height: 42px;
  margin-top: 12px;
  border-radius: 9px;
  background: linear-gradient(135deg, #59bcdb 0%, #24a5d5 100%);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .5px;
  box-shadow: 0 4px 14px rgba(36, 165, 213, .3);
  transition: opacity .18s, transform .18s;
}
.yg-submit:hover { opacity: .93; transform: translateY(-1px); }
.yg-submit[disabled] { opacity: .6; cursor: default; transform: none; }
.yg-form-note { margin: 8px 0 0; font-size: 12px; color: #9aa0b0; text-align: center; }

/* 提交结果卡 */
.yg-result {
  margin: 2px 0 13px;
  padding: 16px 14px;
  border-radius: 12px;
  text-align: center;
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 10px rgba(56, 61, 97, .06);
}
.yg-result-icon { font-size: 30px; line-height: 1; margin-bottom: 8px; }
.yg-result-title { font-size: 15px; font-weight: 700; color: #383d61; margin: 0 0 6px; }
.yg-result-text { font-size: 13px; color: #6b7182; line-height: 1.7; margin: 0; }
.yg-result-text b { color: #24a5d5; }
.yg-result--warn { border-color: #ffd9a8; background: #fffaf3; }

/* 联系方式行动条 */
.yg-actions { display: flex; flex-wrap: wrap; gap: 7px; justify-content: center; margin-top: 12px; }
.yg-action {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 34px;
  padding: 0 13px;
  border: 1px solid #d9e6ee;
  border-radius: 17px;
  background: #fff;
  color: #1b86b0;
  font-size: 13px;
  transition: background .18s, color .18s, border-color .18s;
}
.yg-action:hover { background: #24a5d5; border-color: #24a5d5; color: #fff; }
.yg-action svg { width: 14px; height: 14px; fill: currentColor; }

/* 底部输入区 */
.yg-foot {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid #eceff4;
  background: #fff;
}
.yg-foot-input {
  flex: 1 1 auto;
  min-height: 38px;
  max-height: 96px;
  padding: 9px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 19px;
  background: #f6f7fa;
  resize: none;
  line-height: 1.4;
  transition: border-color .18s, background .18s;
}
.yg-foot-input:focus { outline: none; border-color: #59bcdb; background: #fff; }
.yg-foot-send {
  flex: 0 0 auto;
  height: 38px;
  padding: 0 17px;
  border-radius: 19px;
  background: linear-gradient(135deg, #59bcdb 0%, #24a5d5 100%);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  transition: opacity .18s;
}
.yg-foot-send:hover { opacity: .92; }
.yg-foot-send[disabled] { opacity: .5; cursor: default; }

/* 底部小字 */
.yg-brandbar {
  flex: 0 0 auto;
  padding: 6px 12px 8px;
  background: #fff;
  border-top: 1px solid #f2f4f8;
  margin-top: -1px;
  font-size: 11.5px;
  color: #a5aabb;
  text-align: center;
}
.yg-brandbar a { color: #a5aabb; }
.yg-brandbar a:hover { color: #24a5d5; }

/* ---------------- 移动端适配 ---------------- */
@media (max-width: 640px) {
  .yg-consult { right: 14px; bottom: 14px; }
  .yg-launcher { height: 50px; padding: 0 17px 0 15px; gap: 7px; border-radius: 25px; }
  .yg-launcher svg { width: 19px; height: 19px; }
  .yg-launcher-txt { font-size: 14px; }
  .yg-shortcuts { display: none; }
  .yg-tip { bottom: 62px; width: 186px; font-size: 13px; }

  .yg-panel {
    position: fixed;
    right: 0;
    left: 0;
    bottom: 0;
    width: auto;
    height: 82vh;
    max-height: none;
    border-radius: 16px 16px 0 0;
    transform: translateY(100%);
  }
  .yg-consult.yg-open .yg-panel { transform: none; }
  .yg-head { padding: 13px 12px 13px 15px; }
  .yg-body { padding: 14px 12px 6px; }
  .yg-bubble { max-width: 86%; }
}

@media print {
  .yg-consult, .yg-mask { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  .yg-consult *,
  .yg-consult *::before,
  .yg-consult *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
