/* ============================================================
   Support Modal — 客服弹窗（Swiss 风，对齐站内整体设计语言）
   触发：所有 [data-action="contact-cs"] / .contact-cs 元素 + FAB
   行为：从右下方 popup（与 FAB 锚定）；移动端 bottom sheet
   ============================================================ */

.support-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  pointer-events: none;
}

.support-modal.is-open {
  display: block;
  pointer-events: auto;
}

.support-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 10, 0.36);
  opacity: 0;
  transition: opacity 0.16s ease;
}

.support-modal.is-open .support-modal-overlay {
  opacity: 1;
}

/* ---------- Panel：直角 + 黑边 + 无圆角，对齐站内 Swiss 风 ---------- */
.support-modal-panel {
  position: absolute;
  right: 24px;
  bottom: 92px;
  width: min(320px, calc(100vw - 32px));
  max-height: calc(100vh - 120px);
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--sw-ink, #0a0a0a);
  border-radius: 0;
  box-shadow: 0 18px 36px rgba(10, 10, 10, 0.12);
  font-family: var(--sw-sans, "Helvetica Neue", Arial, sans-serif);
  color: var(--sw-ink, #0a0a0a);
  transform: translateY(8px);
  opacity: 0;
  transition: transform 0.18s cubic-bezier(0.2, 0.7, 0.2, 1),
              opacity 0.14s ease;
}

.support-modal.is-open .support-modal-panel {
  transform: translateY(0);
  opacity: 1;
}

/* ---------- Header ---------- */
.support-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 16px 8px;
  border-bottom: 1px solid var(--sw-ink, #0a0a0a);
}

.support-modal-kicker {
  display: inline-block;
  font-family: var(--sw-mono, "SF Mono", Menlo, monospace);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--sw-accent, #d62828);
  margin: 0 0 2px;
}

.support-modal-kicker-dash {
  color: var(--sw-ink, #0a0a0a);
  font-weight: 700;
  margin-right: 4px;
}

.support-modal-title {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: var(--sw-ink, #0a0a0a);
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.support-modal-close {
  width: 24px;
  height: 24px;
  border: none;
  background: transparent;
  color: var(--sw-ink-soft, #666);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  margin-top: -2px;
  margin-right: -4px;
  font-family: var(--sw-mono, "SF Mono", Menlo, monospace);
  font-weight: 700;
  transition: color 0.15s ease;
}

.support-modal-close:hover {
  color: var(--sw-accent, #d62828);
}

/* ---------- Body：紧凑列表 + qrcode ---------- */
.support-modal-body {
  padding: 12px 16px 14px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.support-modal-section-title {
  margin: 0;
  font-family: var(--sw-mono, "SF Mono", Menlo, monospace);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--sw-ink-soft, #666);
}

.support-modal-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.support-modal-list li + li {
  border-top: 1px dashed var(--sw-line-soft, #d4d4d4);
}

.support-modal-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 9px 4px 9px 10px;
  color: var(--sw-ink, #0a0a0a);
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: background 0.14s ease, border-color 0.14s ease;
}

.support-modal-item:hover {
  background: var(--sw-bg, #fafafa);
  border-left-color: var(--sw-accent, #d62828);
}

.support-modal-item-num {
  font-family: var(--sw-mono, "SF Mono", Menlo, monospace);
  font-size: 11px;
  font-weight: 700;
  color: var(--sw-accent, #d62828);
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

.support-modal-item-label {
  min-width: 0;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--sw-ink, #0a0a0a);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.support-modal-item-arrow {
  font-family: var(--sw-mono, "SF Mono", Menlo, monospace);
  font-size: 14px;
  color: var(--sw-ink-soft, #666);
  font-weight: 700;
  flex-shrink: 0;
}

.support-modal-item:hover .support-modal-item-arrow {
  color: var(--sw-ink, #0a0a0a);
}

/* ---------- Divider ---------- */
.support-modal-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-family: var(--sw-mono, "SF Mono", Menlo, monospace);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--sw-ink-soft, #666);
  white-space: nowrap;
}

.support-modal-divider::before,
.support-modal-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--sw-line-soft, #d4d4d4);
}

/* ---------- 客服区 ---------- */
.support-modal-cs {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.support-modal-qrcode {
  width: 240px;
  max-width: 100%;
  display: block;
}

.support-modal-qrcode img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--sw-line-soft, #d4d4d4);
  background: #fff;
}

.support-modal-cs-note {
  margin: 0;
  font-family: var(--sw-mono, "SF Mono", Menlo, monospace);
  font-size: 11px;
  color: var(--sw-ink-soft, #666);
  letter-spacing: 0.04em;
  line-height: 1.5;
}

.support-modal-cs-note strong {
  color: var(--sw-accent, #d62828);
  font-weight: 700;
  font-family: var(--sw-mono, "SF Mono", Menlo, monospace);
  letter-spacing: 0.06em;
}

/* ---------- Mobile: bottom sheet ---------- */
@media (max-width: 560px) {
  .support-modal-panel {
    right: 0;
    left: 0;
    bottom: 0;
    width: 100%;
    max-width: 100%;
    max-height: 80vh;
    border-left: none;
    border-right: none;
    border-bottom: none;
    transform: translateY(20px);
  }

  .support-modal.is-open .support-modal-panel {
    transform: translateY(0);
  }

  .support-modal-qrcode {
    width: 220px;
  }
}

/* ---------- Reduce motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .support-modal-overlay,
  .support-modal-panel,
  .support-modal-item {
    transition: none;
  }
}
