/* =========================================================
   call-modal.css — 预约沟通弹窗
   布局参考 Yander：标签在输入框上方 / 全宽输入框 / 舒展呼吸感
   ========================================================= */

/* ---- 页面内杂项复用 ---- */
.home-cta-row { justify-content: center; margin-top: var(--space-5); }
.home-cta-row + .home-cta-phone { text-align: center; font-size: var(--text-sm); color: var(--text-muted); margin: var(--space-3) 0 0; }
.home-cta-phone a { color: var(--accent); font-weight: 650; text-decoration: none; }

.idea-call-hint {
  margin: var(--space-4) 0 0;
  font-size: var(--text-base);
  line-height: var(--lh-relaxed);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.idea-call-hint .btn { vertical-align: middle; margin: 0 2px; flex-shrink: 0; }

/* =========================================================
   弹窗容器与面板
   ========================================================= */
.call-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.call-modal-overlay[hidden] { display: none !important; }

/* 弹窗进入柔和过渡：仅在显示时播放（隐藏仍瞬时关闭，避免卡死无法关闭的回归）。
   保持 hidden 属性为唯一显隐来源，不写任何内联 display。 */
.call-modal-overlay:not([hidden]) { animation: callOverlayIn 0.2s ease both; }
.call-modal-overlay:not([hidden]) .call-modal { animation: callPanelIn 0.26s cubic-bezier(0.16, 1, 0.3, 1) both; }
@keyframes callOverlayIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes callPanelIn {
  from { opacity: 0; transform: translateY(10px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .call-modal-overlay:not([hidden]),
  .call-modal-overlay:not([hidden]) .call-modal { animation: none !important; }
}

.call-modal {
  background: #131826;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 18px;
  padding: 32px 34px 24px;
  width: 100%;
  max-width: 480px;
  max-height: 92vh;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  box-shadow: 0 30px 90px rgba(0,0,0,0.55), 0 0 1px rgba(255,255,255,0.05) inset;
  position: relative;
}
.call-modal:focus { outline: none; }
.call-modal:focus {
  outline: none;
}

/* 隐藏滚动条（保留可滚动，避免小屏底部按钮够不到） */
.call-modal::-webkit-scrollbar { width: 0; height: 0; display: none; }

.call-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 30px; height: 30px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: #6b7a92;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.call-modal-close:hover { background: rgba(255,255,255,0.08); color: #d0d6e0; }

.call-modal-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #f0f2f5;
  margin: 0 0 6px;
  letter-spacing: -0.02em;
}

.call-modal-lead {
  font-size: 13.5px;
  line-height: 1.65;
  color: #8a96a8;
  margin: 0 0 18px;
}
.call-modal-lead strong { color: #b8c2d0; font-weight: 600; }
.call-modal-lead .nowrap { white-space: nowrap; }

/* =========================================================
   表单布局 — 标签在输入框上方（纵向），参考 Yander
   ========================================================= */
.call-modal-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* 每个字段：标签在上 + 输入框在下，全宽 */
.call-field {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch;
  gap: 6px;
}
.call-field > span {
  font-size: 12.5px;
  font-weight: 600;
  color: #9aa3b2;
  letter-spacing: 0.02em;
}
.call-field .req { color: #36d4ee; font-weight: 700; }
.call-field .opt { color: #5a6478; font-weight: 400; }

/* 输入框统一样式 — 全宽、暗色、精致边框 */
.call-field input[type="text"],
.call-field input[type="email"],
.call-field input[type="tel"],
.call-field input[type="url"],
.call-field input[type="date"] {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid rgba(255,255,255,0.1) !important;
  border-radius: 10px !important;
  background: #1a2235 !important;
  color: #e4e8f0 !important;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}
.call-field input::placeholder { color: #4a5568; }
.call-field input:focus {
  border-color: #36d4ee !important;
  box-shadow: 0 0 0 3px rgba(54,212,238,0.12);
}

/* autofill 亮色底兜底：避免暗底输入在 Chrome/Edge 自动填充时突兀变亮 */
.call-field input:-webkit-autofill,
.call-field input:-webkit-autofill:hover,
.call-field input:-webkit-autofill:focus {
  -webkit-text-fill-color: #e4e8f0;
  box-shadow: 0 0 0px 1000px #1a2235 inset;
  transition: background-color 5000s ease-in-out 0s;
}

/* 公司名 + 域名 双列横排 */
.call-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* ---- 期望通话时间区块 ---- */
.call-dt-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.call-date-row input[type="date"] {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid rgba(255,255,255,0.1) !important;
  border-radius: 10px !important;
  background: #1a2235 !important;
  color: #e4e8f0 !important;
  font-size: 14px;
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}
.call-date-row input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.45;
  filter: invert(0.85);
}
.call-date-row input[type="date"]::-webkit-calendar-picker-indicator:hover { opacity: 0.8; }
.call-date-row input[type="date"]:focus {
  border-color: #36d4ee !important;
  box-shadow: 0 0 0 3px rgba(54,212,238,0.12);
}

/* 时段胶囊按钮组 */
.call-time-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.call-time-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 14px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 999px;
  background: transparent;
  color: #8a94a8;
  font-size: 12.5px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.18s ease;
  user-select: none;
  -webkit-user-select: none;
  line-height: 1.35;
  white-space: nowrap;
}
.call-time-pill:hover {
  border-color: rgba(54,212,238,0.5);
  color: #c0e0f0;
  background: rgba(54,212,238,0.06);
}
.call-time-pill.active {
  border-color: #36d4ee;
  background: rgba(54,212,238,0.13);
  color: #36d4ee;
  font-weight: 650;
  box-shadow: 0 0 0 3px rgba(54,212,238,0.1), 0 2px 10px rgba(54,212,238,0.08);
}

/* ---- textarea —— 全宽、暗色、舒展 ---- */
.call-modal-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(255,255,255,0.1) !important;
  border-radius: 10px !important;
  background: #1a2235 !important;
  color: #e4e8f0 !important;
  font-size: 14px;
  line-height: 1.65;
  resize: vertical;
  min-height: 90px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}
.call-modal-form textarea::placeholder { color: #4a5568; }
.call-modal-form textarea:focus {
  border-color: #36d4ee !important;
  box-shadow: 0 0 0 3px rgba(54,212,238,0.12);
}

/* ---- checkbox ---- */
.call-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: #6b7a92;
  cursor: pointer;
}
.call-check input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 16px; height: 16px;
  border: 1.5px solid rgba(255,255,255,0.18);
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  transition: all 0.15s;
}
.call-check input[type="checkbox"]:checked {
  background: #36d4ee;
  border-color: #36d4ee;
}
.call-check input[type="checkbox"]:checked::after {
  content: "✓";
  position: absolute;
  top: -2px; left: 3px;
  font-size: 11.5px;
  color: #131826;
  font-weight: 800;
}

/* ---- 错误提示 ---- */
.call-error {
  font-size: 12.5px;
  color: #f87171;
}
.call-error[hidden] { display: none; }

/* ---- 提交按钮 —— 全宽、克制、精致 ---- */
.call-submit {
  width: 100%;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 10px;
  margin-top: 4px;
  letter-spacing: 0.02em;
}

.call-meta {
  text-align: center;
  font-size: 11.5px;
  color: #4a5568;
  margin-top: 10px;
  letter-spacing: 0.01em;
}
.call-meta strong { color: #6b7a92; }

/* ---- 已收到状态 ---- */
.call-modal-done {
  text-align: center;
  padding: 20px 0 6px;
}
.call-modal-done h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: #f0f2f5;
  margin-bottom: 10px;
}
.call-modal-done p {
  font-size: 13.5px;
  color: #8a96a8;
  line-height: 1.65;
  margin-bottom: 8px;
}
.call-modal-done a { color: #36d4ee; text-decoration: none; font-weight: 600; }
.call-modal-done a:hover { text-decoration: underline; }

/* =========================================================
   about 页面复用
   ========================================================= */
.about-call-promise {
  margin: var(--space-8) 0;
  padding: var(--space-8);
  border: 1px solid var(--accent);
  border-radius: var(--radius-lg);
  background: var(--bg-muted);
}
.about-call-promise h3 {
  font-size: var(--text-xl);
  margin: 0 0 var(--space-3) 0;
  color: var(--text);
}
.about-call-promise p {
  font-size: var(--text-base);
  line-height: var(--lh-relaxed);
  color: var(--text-muted);
  margin: 0 0 var(--space-5) 0;
}

/* =========================================================
   移动端适配 (< 600px)
   ========================================================= */
@media (max-width: 600px) {
  .call-modal {
    padding: 24px 20px 22px;
    border-radius: 16px;
    max-height: 90vh;
  }
  .call-modal-form {
    gap: 14px;
  }
  .call-field-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .call-time-pill {
    padding: 7px 12px;
    font-size: 12px;
  }
}
