/* 微信客服弹层独立于紧凑端 Dock：桌面无需等待 Dock 样式即可正常打开。 */
.mob-wechat-modal {
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  inset: 0;
  z-index: var(--dm-z-modal, 10300);
  padding: 24px;
  background: rgba(0, 0, 0, 0.5);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mob-wechat-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.mob-wechat-modal:not(.is-open) {
  display: none;
}

.mob-wechat-modal__panel {
  position: relative;
  width: 100%;
  max-width: 340px;
  padding: 32px 28px 28px;
  background: #fff;
  border-radius: 40px;
  box-shadow: none;
  transform: scale(0.94) translateY(12px);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mob-wechat-modal.is-open .mob-wechat-modal__panel {
  transform: scale(1) translateY(0);
}

.mob-wechat-modal__close {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  color: #6b6b6b;
  background: #f5f3f0;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.mob-wechat-modal__close:active {
  color: var(--dm-mobile-nav-active, var(--husir-orange, #c63f00));
  background: #fff5f2;
}

.mob-wechat-modal__brand {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  background: linear-gradient(135deg, #07c160 0%, #05a350 100%);
  border-radius: 16px;
  box-shadow: none;
}

.mob-wechat-modal__brandSvg {
  display: block;
  width: 36px;
  height: 36px;
}

.mob-wechat-modal__title {
  margin: 0 0 16px;
  color: #1a1a1a;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
}

.mob-wechat-modal__hint {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 22px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border-radius: 14px;
}

.mob-wechat-modal__hintIcon {
  flex-shrink: 0;
  margin-top: 2px;
  line-height: 0;
}

.mob-wechat-modal__hintText {
  color: #0369a1;
  font-size: 13px;
  line-height: 1.6;
}

.mob-wechat-modal__action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 16px 24px;
  color: var(--dm-action-text, #ffffff);
  background: var(--dm-action-bg, #c63f00);
  border: 0;
  border-radius: 16px;
  box-shadow: none;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mob-wechat-modal__action:active {
  box-shadow: none;
  transform: translateY(1px);
}

/* 手动暗黑分支。 */
html.husir-dark .mob-wechat-modal__panel {
  background: var(--dm-mobile-wechat-panel-bg);
}

html.husir-dark .mob-wechat-modal__title {
  color: var(--dm-mobile-wechat-title);
}

html.husir-dark .mob-wechat-modal__close {
  color: var(--dm-text-secondary);
  background: var(--dm-bg-secondary);
}

html.husir-dark .mob-wechat-modal__hint {
  background: rgba(3, 105, 161, 0.16);
}

html.husir-dark .mob-wechat-modal__hintText {
  color: var(--dm-mobile-wechat-hint);
}

/* 系统暗黑分支，与手动暗黑同权重且互斥。 */
@media (prefers-color-scheme: dark) {
  html:not(.husir-light) .mob-wechat-modal__panel {
    background: var(--dm-mobile-wechat-panel-bg);
  }

  html:not(.husir-light) .mob-wechat-modal__title {
    color: var(--dm-mobile-wechat-title);
  }

  html:not(.husir-light) .mob-wechat-modal__close {
    color: var(--dm-text-secondary);
    background: var(--dm-bg-secondary);
  }

  html:not(.husir-light) .mob-wechat-modal__hint {
    background: rgba(3, 105, 161, 0.16);
  }

  html:not(.husir-light) .mob-wechat-modal__hintText {
    color: var(--dm-mobile-wechat-hint);
  }
}
