/* 联系客服弹窗（文档站用）。
 *
 * 视觉与 Create UI 的 ContactSupportModal 完全一致，`.contact-*` 那一套规则是从
 * suno-create-ui/src/styles.css 原样搬过来的（改样式请两边一起改）。
 * 只有两处差异：
 *   1. 外层遮罩/卡片用新的 `.contact-modal-*` 类，避免和文档站已有样式撞名；
 *   2. 窄屏适配用媒体查询代替 Create UI 的 `.is-mobile` 类（静态页没有 React 状态）。
 */

.contact-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(7, 7, 10, 0.72);
}

.contact-modal-backdrop[hidden] {
  display: none;
}

.contact-modal-card {
  position: relative;
  width: min(520px, 100%);
  max-height: min(88vh, 760px);
  overflow: auto;
  padding: 24px;
  border-radius: 16px;
  background: #1d1d1d;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  animation: contact-modal-in 0.16s ease-out;
}

@keyframes contact-modal-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.contact-modal-close {
  position: absolute;
  top: 24px;
  right: 24px;
  display: inline-flex;
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 99px;
  background: #2a2a2a;
  color: #a3a3a3;
  cursor: pointer;
}

.contact-modal-close:hover {
  background: #343434;
  color: #fff;
}

.contact-modal-close svg {
  fill: none;
}

/* ---- 以下与 Create UI 的 .contact-* 保持一致 ---- */

.contact-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.contact-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-right: 40px;
}

.contact-brand {
  display: flex;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background-image: linear-gradient(-90deg, #ec4899 0%, #f97316 100%);
  color: #fff;
}

.contact-brand svg {
  width: 19px;
  height: 19px;
  fill: none;
}

.contact-title {
  color: #fff;
  font-size: 21px;
  font-weight: 600;
}

.contact-service-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 10px;
  background: #f5c45114;
}

.contact-service-icon {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  color: #f5c451;
  fill: none;
}

.contact-service-time {
  color: #f5c451;
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
}

.contact-service-note {
  color: #a3a3a3;
  font-size: 13px;
}

/* 联系通道卡：与开屏弹窗底部同款，两列贴左右边距 */
.contact-channels {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 20px;
  border-radius: 12px;
  background: #232323;
}

.contact-channel {
  display: flex;
  width: auto;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.contact-channel-head {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #fff;
  font-size: 14.5px;
  font-weight: 600;
}

.contact-channel-logo {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  border-radius: 5px;
  object-fit: cover;
}

.contact-channel-line {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #a3a3a3;
  font-size: 13.5px;
}

.contact-copy {
  position: relative;
  display: flex;
  align-items: center;
  border: 0;
  background: transparent;
  color: #8e8e8e;
  cursor: pointer;
}

.contact-copy:hover {
  color: #fff;
}

.contact-copy svg {
  width: 16px;
  height: 16px;
  fill: none;
}

.contact-copy.is-copied {
  color: #22c55e;
}

.contact-copy.is-copied::after {
  content: "已复制";
  position: absolute;
  left: 50%;
  bottom: calc(100% + 6px);
  transform: translateX(-50%);
  padding: 3px 8px;
  border-radius: 6px;
  background: #2f2f2f;
  color: #fff;
  font-size: 12px;
  white-space: nowrap;
}

.contact-qr {
  display: block;
  width: 148px;
  height: 148px;
  margin-top: 2px;
  border-radius: 8px;
}

.contact-help {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 16px;
  border-radius: 12px;
  background: #232323;
}

.contact-help-title {
  color: #8e8e8e;
  font-size: 12.5px;
}

.contact-help-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
}

.contact-help-icon {
  display: flex;
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  align-items: center;
  justify-content: center;
  color: #f5c451;
}

.contact-help-icon svg {
  width: 15px;
  height: 15px;
  fill: none;
}

.contact-help-name {
  width: 80px;
  flex: 0 0 80px;
  color: #e5e5e5;
  font-size: 14px;
  font-weight: 500;
}

.contact-help-desc {
  min-width: 0;
  color: #8e8e8e;
  font-size: 13.5px;
}

.contact-help-desc-short {
  display: none;
}

.contact-footer {
  width: 100%;
  color: #8e8e8e;
  font-size: 13px;
  text-align: center;
}

/* 窄屏：对应 Create UI 的 .is-mobile（尺寸收紧、两列二维码并排） */
@media (max-width: 900px) {
  .contact-modal-backdrop {
    padding: 16px;
  }

  .contact-modal-card {
    width: min(95vw, 480px);
    padding: 20px;
  }

  .contact-modal-close {
    top: 20px;
    right: 20px;
    width: 28px;
    height: 28px;
  }

  .contact-body {
    gap: 12px;
  }

  .contact-head {
    gap: 10px;
    padding-right: 36px;
  }

  .contact-brand {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
    border-radius: 9px;
  }

  .contact-title {
    font-size: 18px;
  }

  .contact-service-bar {
    flex-wrap: wrap;
    align-items: center;
    gap: 3px 8px;
    padding: 8px 11px;
  }

  .contact-service-time,
  .contact-service-note {
    font-size: 12.5px;
  }

  .contact-service-note {
    flex-basis: 100%;
  }

  .contact-channels {
    gap: 16px;
    padding: 14px 16px;
  }

  .contact-channel-head {
    gap: 5px;
    font-size: 12.5px;
  }

  .contact-channel-line {
    gap: 5px;
    font-size: 12px;
  }

  .contact-qr {
    width: 136px;
    height: 136px;
  }

  .contact-help {
    padding: 11px 14px;
  }

  .contact-help-row {
    align-items: flex-start;
    gap: 8px;
    padding: 5px 0;
  }

  .contact-help-name {
    width: 68px;
    flex-basis: 68px;
    font-size: 13px;
  }

  .contact-help-desc {
    font-size: 12.5px;
  }

  /* 窄屏用精简文案，避免换行（与 Create UI 的 descShort 一致）。 */
  .contact-help-desc-full {
    display: none;
  }

  .contact-help-desc-short {
    display: inline;
  }
}

/* 触发按钮：静态文档页（docs.css 的深色主题）用的是 `.site-nav`。
 *
 * docs.css 里的 `.btn` 只给文字色和边框、没有底色，如果直接叠上浅色的
 * `.btn-secondary`，浅底 + 浅字会看不见，所以这里单独给一套深色配色；
 * 交互式文档（docsify 外壳）用的是 `.navbar-right`，不受这段影响。 */
.site-nav [data-contact-open] {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--line, #22273a);
  border-radius: 10px;
  background: var(--panel, #141724);
  color: var(--text, #f3f4f6);
  font-size: 13.5px;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
}

.site-nav [data-contact-open]:hover {
  background: #1c2133;
  border-color: #2c3350;
}

.site-nav [data-contact-open] svg {
  flex: 0 0 auto;
}
