/**
 * Payment Modal Styles - V2.2 Mock 支付闭环
 */

/* ===== Payment Modal Overlay ===== */
.payment-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.payment-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ===== Payment Modal ===== */
.payment-modal {
  background: #fff;
  border-radius: 20px;
  padding: 1.75rem;
  width: 100%;
  max-width: 380px;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  transform: scale(0.92) translateY(20px);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.payment-modal-overlay.active .payment-modal {
  transform: scale(1) translateY(0);
}

/* Close button */
.payment-modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 2rem;
  height: 2rem;
  border: none;
  background: #f3f4f6;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.25rem;
  color: #6b7280;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  line-height: 1;
}

.payment-modal-close:hover {
  background: #e5e7eb;
  color: #111;
}

/* ===== Payment Header ===== */
.payment-modal-header {
  text-align: center;
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid #f3f4f6;
}

.payment-product-name {
  font-size: 1.05rem;
  font-weight: 600;
  color: #111;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.payment-product-price {
  font-size: 2rem;
  font-weight: 700;
  color: #16a34a;
}

.payment-product-price span {
  font-size: 1.25rem;
  font-weight: 600;
}

/* ===== Payment States ===== */
.payment-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

/* ===== QR Code Section ===== */
.payment-qr-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
}

.payment-qr-placeholder {
  width: 200px;
  height: 200px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.qr-placeholder-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.qr-placeholder-logo {
  font-size: 2rem;
  margin-bottom: 0.25rem;
}

.qr-placeholder-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #111;
}

.qr-placeholder-sub {
  font-size: 0.7rem;
  color: #9ca3af;
  margin-bottom: 0.5rem;
}

/* 模拟二维码方块图案 */
.qr-blocks {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 0.5rem;
  background: #fff;
}

.qr-block-row {
  display: flex;
  gap: 3px;
}

.qr-block {
  width: 12px;
  height: 12px;
  border-radius: 2px;
}

.qr-block.black {
  background: #111;
}

.qr-block.white {
  background: #fff;
  border: 1px solid #e5e7eb;
}

.payment-hint {
  font-size: 0.85rem;
  color: #6b7280;
  text-align: center;
  margin: 0;
}

/* ===== Order Info ===== */
.payment-order-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  width: 100%;
  justify-content: space-between;
}

.payment-order-label {
  font-size: 0.75rem;
  color: #9ca3af;
  white-space: nowrap;
}

.payment-order-id {
  font-size: 0.75rem;
  color: #374151;
  font-family: 'Courier New', monospace;
  font-weight: 600;
}

/* ===== Payment Status ===== */
.payment-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.payment-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f59e0b;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.payment-status-text {
  font-size: 0.85rem;
  color: #f59e0b;
  font-weight: 500;
}

/* ===== Paid State ===== */
.payment-state-paid {
  padding: 1rem 0;
}

.payment-success-icon {
  font-size: 3.5rem;
  margin-bottom: 0.25rem;
}

.payment-success-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #111;
  margin: 0 0 0.25rem 0;
}

.payment-success-sub {
  font-size: 0.95rem;
  color: #16a34a;
  font-weight: 600;
  margin: 0 0 0.25rem 0;
}

.payment-success-desc {
  font-size: 0.85rem;
  color: #6b7280;
  margin: 0 0 1.25rem 0;
}

.payment-success-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
}

/* ===== Mock Actions ===== */
.payment-mock-actions {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid #f3f4f6;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
}

.payment-mock-note {
  font-size: 0.7rem;
  color: #9ca3af;
  margin: 0.25rem 0 0 0;
  text-align: center;
}

/* ===== Unlock Banner ===== */
.unlock-banner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #dcfce7, #bbf7d0);
  border: 1px solid #86efac;
  border-radius: 10px;
  padding: 0.625rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.875rem;
  color: #166534;
  font-weight: 500;
}

/* ===== File Row Badge States ===== */
.file-download-badge {
  display: inline-block;
  font-size: 0.7rem;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  font-weight: 500;
  transition: all 0.2s;
}

.badge-locked {
  color: #92400e;
  background: #fef3c7;
  border: 1px solid #fcd34d;
}

.badge-unlocked {
  color: #166534;
  background: #dcfce7;
  border: 1px solid #86efac;
  cursor: pointer;
}

.badge-unlocked:hover {
  background: #bbf7d0;
}

/* ===== Mock Download Section ===== */
.mock-download-section {
  margin-top: 1rem;
}

.mock-download-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  text-align: center;
}

.mock-download-tip {
  font-size: 0.875rem;
  color: #166534;
  margin: 0;
  font-weight: 500;
}

.mock-download-note {
  font-size: 0.75rem;
  color: #92400e;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  margin: 0;
  line-height: 1.5;
}

/* ===== Button overrides in payment context ===== */
.payment-modal .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  border-radius: 10px;
  padding: 0.625rem 1.25rem;
  font-size: 0.9rem;
}

.payment-modal .btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  border-radius: 50px;
  width: 100%;
}

.payment-modal .btn-primary {
  background: #16a34a;
  color: #fff;
}

.payment-modal .btn-primary:hover {
  background: #15803d;
}

.payment-modal .btn-success {
  background: #16a34a;
  color: #fff;
}

.payment-modal .btn-success:hover {
  background: #15803d;
}

.payment-modal .btn-outline {
  background: #fff;
  color: #374151;
  border: 1px solid #e5e7eb;
}

.payment-modal .btn-outline:hover {
  background: #f9fafb;
  border-color: #d1d5db;
}

/* ===== Responsive ===== */
@media (max-width: 480px) {
  .payment-modal {
    padding: 1.25rem;
    border-radius: 16px;
    max-width: 340px;
  }

  .payment-product-name {
    font-size: 0.95rem;
  }

  .payment-product-price {
    font-size: 1.75rem;
  }

  .payment-qr-placeholder {
    width: 170px;
    height: 170px;
  }

  .qr-block {
    width: 10px;
    height: 10px;
  }

  .payment-mock-actions .btn-lg {
    padding: 0.75rem 1rem;
  }
}
