/* ============================================================
   在线咨询浮层（对齐原站 www.yichengjiaoyu.net 交互形态）
   ============================================================ */

/* ---- 右下角浮动入口 ---- */
.consult-float {
  position: fixed;
  right: 22px;
  bottom: 28px;
  z-index: 990;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.consult-float-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 66px;
  height: 66px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  color: #120d02;
  background: linear-gradient(135deg, #ffd166, #f59e0b 45%, #f97316);
  box-shadow: 0 12px 28px rgba(245, 158, 11, 0.45);
  transition: transform 0.25s;
  font-family: inherit;
}
.consult-float-btn:hover { transform: translateY(-4px) scale(1.05); }
.consult-float-btn .cf-icon { font-size: 21px; line-height: 1; }
.consult-float-btn .cf-tip { font-size: 11px; font-weight: 700; }

.consult-float-tel {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 19px;
  color: #eef3ff;
  background: linear-gradient(160deg, #1d2d5c, #0b1432);
  box-shadow: 0 10px 22px rgba(2, 6, 23, 0.5);
  text-decoration: none;
  transition: transform 0.25s;
}
.consult-float-tel:hover { transform: translateY(-3px) scale(1.06); }

/* ---- 咨询窗 ---- */
.consult-window {
  position: fixed;
  right: 22px;
  bottom: 108px;
  z-index: 1000;
  width: 352px;
  max-height: min(620px, 84vh);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid #dfe7f5;
  box-shadow: 0 26px 60px rgba(4, 12, 36, 0.35);
  transform: translateY(16px) scale(0.97);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.28s ease, opacity 0.28s ease;
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}
.consult-window.open {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}

/* 头部 */
.cw-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: linear-gradient(135deg, #eaf1ff, #dde8ff);
  border-bottom: 1px solid #d6e2f8;
}
.cw-avatar {
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  font-weight: 700;
  color: #ffffff;
  background: linear-gradient(135deg, #3b6ef5, #2563eb);
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.35);
}
.cw-meta { flex: 1; min-width: 0; }
.cw-name { font-size: 15px; font-weight: 700; color: #0b1432; line-height: 1.2; }
.cw-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 3px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  color: #1e5fd6;
  background: rgba(37, 99, 235, 0.1);
  border-radius: 999px;
}
.cw-badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}
.cw-close {
  flex: none;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 15px;
  color: #5b6b8c;
  background: rgba(11, 20, 50, 0.06);
  transition: background 0.2s, color 0.2s;
}
.cw-close:hover { background: rgba(11, 20, 50, 0.12); color: #0b1432; }

/* 消息区 */
.cw-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px 12px 6px;
  background: #f6f8fd;
  scroll-behavior: smooth;
}
.cw-body::-webkit-scrollbar { width: 6px; }
.cw-body::-webkit-scrollbar-thumb { background: #cdd8ec; border-radius: 6px; }

.cmsg { display: flex; gap: 8px; margin-bottom: 12px; align-items: flex-start; }
.cmsg .c-av {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #3b6ef5, #2563eb);
}
.cmsg .c-bubble {
  max-width: 82%;
  padding: 9px 12px;
  font-size: 13.5px;
  line-height: 1.6;
  color: #20304f;
  background: #ffffff;
  border: 1px solid #e3eaf7;
  border-radius: 12px 12px 12px 4px;
  white-space: pre-line;
  word-break: break-word;
}
.cmsg.user { flex-direction: row-reverse; }
.cmsg.user .c-bubble {
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  border: none;
  border-radius: 12px 12px 4px 12px;
}
.cmsg.user .c-av {
  background: linear-gradient(135deg, #ffd166, #f59e0b);
  color: #120d02;
}

/* 学历选项卡 */
.c-opts {
  margin: 0 12px 12px 46px;
  padding: 10px;
  background: #ffffff;
  border: 1px solid #e3eaf7;
  border-radius: 12px;
}
.c-opts-title { font-size: 12px; color: #8fa3c4; margin-bottom: 8px; }
.c-opts .c-opt {
  display: block;
  width: 100%;
  margin-bottom: 7px;
  padding: 9px 12px;
  border: 1px solid #d7e2f6;
  border-radius: 10px;
  background: #f7faff;
  font-size: 13.5px;
  font-weight: 600;
  color: #1d2d5c;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s;
  font-family: inherit;
}
.c-opts .c-opt:last-child { margin-bottom: 0; }
.c-opts .c-opt:hover { border-color: #f59e0b; color: #b45309; background: #fff7e8; }

/* 表单卡 */
.c-form-card {
  margin: 0 12px 12px 46px;
  padding: 14px;
  background: #ffffff;
  border: 1px solid #e3eaf7;
  border-radius: 12px;
}
.cf-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 800;
  color: #0b1432;
}
.cf-title .tag {
  font-size: 10px;
  font-weight: 700;
  color: #b45309;
  background: #fff3d6;
  border-radius: 6px;
  padding: 2px 6px;
}
.cf-desc { margin: 6px 0 10px; font-size: 12px; line-height: 1.5; color: #8fa3c4; }
.cf-field { margin-bottom: 9px; }
.cf-field select,
.cf-field input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid #d7e2f6;
  border-radius: 10px;
  background: #f7faff;
  font-size: 13.5px;
  color: #1d2d5c;
  outline: none;
  font-family: inherit;
  appearance: none;
}
.cf-field select { background-image: linear-gradient(45deg, transparent 50%, #8fa3c4 50%), linear-gradient(135deg, #8fa3c4 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.cf-field select:focus, .cf-field input:focus { border-color: #2563eb; background-color: #fff; }
.cf-submit {
  width: 100%;
  padding: 11px;
  border: none;
  border-radius: 10px;
  font-size: 14.5px;
  font-weight: 700;
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  box-shadow: 0 6px 16px rgba(249, 115, 22, 0.35);
  cursor: pointer;
  font-family: inherit;
  transition: filter 0.2s, transform 0.15s;
}
.cf-submit:hover { filter: brightness(1.06); }
.cf-submit:disabled { opacity: 0.6; cursor: not-allowed; }
.cf-result { margin-top: 8px; font-size: 12.5px; line-height: 1.5; }
.cf-result.ok { color: #16a34a; }
.cf-result.err { color: #dc2626; }

/* 快捷问题 */
.cw-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 9px 12px 2px;
  background: #f6f8fd;
}
.cw-quick .cq {
  padding: 5px 11px;
  border: 1px solid #d7e2f6;
  border-radius: 999px;
  background: #ffffff;
  font-size: 12px;
  color: #33508c;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}
.cw-quick .cq:hover { border-color: #f59e0b; color: #b45309; background: #fff7e8; }

/* 输入栏 */
.cw-input {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px 12px;
  background: #ffffff;
  border-top: 1px solid #e6ecf6;
}
.cw-input input {
  flex: 1;
  min-width: 0;
  padding: 9px 14px;
  border: 1px solid #d7e2f6;
  border-radius: 20px;
  background: #f6f8fd;
  font-size: 13.5px;
  color: #1d2d5c;
  outline: none;
  font-family: inherit;
}
.cw-input input:focus { border-color: #2563eb; background: #fff; }
.cw-send {
  flex: none;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  box-shadow: 0 6px 14px rgba(249, 115, 22, 0.35);
  cursor: pointer;
  font-family: inherit;
}
.cw-send:disabled { opacity: 0.5; cursor: not-allowed; box-shadow: none; }

/* 移动端：全宽 + 自动弹出（含底部导航避让） */
@media (max-width: 768px) {
  .consult-window {
    right: 12px;
    left: 12px;
    bottom: 12px;
    width: auto;
    max-height: 78vh;
    border-radius: 16px;
  }
  .consult-float {
    right: 14px;
    bottom: 74px;
    gap: 8px;
  }
  .consult-float-btn { width: 58px; height: 58px; }
  .consult-float-tel { width: 42px; height: 42px; }
}
