/* 全站统一：Toast 提示 + 弹窗基础样式 */

/* Toast */
.toast-wrap {
  position: fixed;
  top: 88px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.15);
  font-size: 14px;
  color: var(--text, #1A1A1A);
  border: 1px solid var(--border, rgba(0, 0, 0, 0.08));
  opacity: 0;
  transform: translateY(-12px);
  transition: opacity 0.25s, transform 0.25s;
  pointer-events: auto;
  max-width: min(90vw, 360px);
  line-height: 1.5;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast-warning {
  border-color: #FFD699;
  background: #FFFBF0;
  color: #8A5A00;
}

.toast-error {
  border-color: #F5B5BB;
  background: #FEF5F6;
  color: #C41E3A;
}

.toast-success {
  border-color: #9FD9BF;
  background: #F0FAF5;
  color: #0A7A57;
}

.toast-icon {
  font-size: 16px;
  flex-shrink: 0;
}

/* 弹窗基础 */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 24px;
}

.modal-overlay.show {
  display: flex;
  animation: uiModalFadeIn 0.2s;
}

#memberModal {
  z-index: 1100;
}

@keyframes uiModalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-box {
  background: white;
  border-radius: 12px;
  max-width: 560px;
  width: 100%;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  animation: uiModalSlideUp 0.3s;
}

.modal-box.lg {
  max-width: 800px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}

.modal-box.lg .modal-body {
  overflow-y: auto;
  flex: 1;
}

@keyframes uiModalSlideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.modal-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border, rgba(0, 0, 0, 0.08));
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-size: 16px;
  font-weight: 500;
  color: var(--text, #1A1A1A);
}

.modal-close-btn {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  font-size: 20px;
  color: var(--text-tertiary, #8C8C8C);
  cursor: pointer;
  border-radius: 4px;
  line-height: 1;
}

.modal-close-btn:hover {
  background: var(--bg-secondary, #F7F8FA);
  color: var(--text, #1A1A1A);
}

.modal-body {
  padding: 32px 40px;
}

.service-modal-body {
  text-align: center;
}

.service-modal-qr {
  width: 220px;
  height: 220px;
  margin: 0 auto 16px;
  padding: 8px;
  background: white;
  border: 1px solid var(--border, rgba(0, 0, 0, 0.08));
  border-radius: 8px;
}

.service-modal-qr img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.service-modal-tip {
  font-size: 14px;
  color: var(--text-secondary, #5F5F5F);
  line-height: 1.6;
}

@media (max-width: 768px) {
  .modal-body {
    padding: 24px 20px;
  }
}
