/* ============================================
 * WhatsApp 浮动联系窗（全站，右下角）
 * 2026-09-12 新增。
 * 刻意不用 WhatsApp 官方 widget：那是第三方脚本，会破坏本站「零第三方请求」的基线。
 * 这里全部内联实现，图标是内联 SVG。
 * z-index 9000：要低于 age gate(9999) 与 cookie 条(9990)，别盖住它们。
 * ============================================ */
.atw-wa {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 9000;
  font-family: var(--font-body);
}

/* ---- 右下角圆形按钮 ---- */
.atw-wa__bubble {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
  transition: transform 0.15s ease, background 0.15s ease;
}
.atw-wa__bubble:hover { background: #1ebe5b; transform: translateY(-2px); }
.atw-wa__bubble svg { width: 30px; height: 30px; display: block; }

/* ---- 展开的小窗 ---- */
.atw-wa__panel {
  position: absolute;
  right: 0;
  bottom: 68px;
  width: 300px;
  max-width: calc(100vw - 40px);
  padding: 18px;
  background: #fff;
  border: 1px solid var(--atw-gray-200);
  border-radius: 14px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.16);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}
.atw-wa.is-open .atw-wa__panel { opacity: 1; visibility: visible; transform: none; }

.atw-wa__close {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--atw-gray-600);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.atw-wa__close:hover { color: var(--atw-black); }

.atw-wa__title {
  margin: 0 24px 6px 0;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.atw-wa__text {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--atw-gray-600);
}
.atw-wa__input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 10px;
  padding: 9px 11px;
  border: 1px solid var(--atw-gray-200);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.45;
  color: var(--atw-black);
  resize: none;
}
.atw-wa__input:focus { outline: none; border-color: var(--atw-black); }

.atw-wa__send {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 11px 14px;
  border: 0;
  border-radius: 8px;
  background: #25d366;
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
}
.atw-wa__send:hover { background: #1ebe5b; }
.atw-wa__send svg { width: 16px; height: 16px; }

@media (max-width: 480px) {
  .atw-wa { right: 14px; bottom: 14px; }
  .atw-wa__panel { width: calc(100vw - 28px); }
}
