/* ==========================================================================
   PIX ENGINE - Modal & Checkout Estilizado para AmploPay
   Design Moderno Glassmorphism / Emerald & Gold
   ========================================================================== */

#pix-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(3, 7, 18, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #f8fafc;
  box-sizing: border-box;
}

#pix-modal-overlay * {
  box-sizing: border-box;
}

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

#pix-modal-card {
  width: 100%;
  max-width: 440px;
  max-height: 92vh;
  overflow-y: auto;
  background: #0b1320;
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 24px;
  padding: 24px 20px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7), 0 0 35px rgba(16, 185, 129, 0.15);
  transform: scale(0.95) translateY(10px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

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

/* Scrollbar fina no card */
#pix-modal-card::-webkit-scrollbar {
  width: 6px;
}
#pix-modal-card::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 999px;
}

/* Botão Fechar */
.pix-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 18px;
  line-height: 1;
}
.pix-close-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

/* Header */
.pix-header {
  text-align: center;
  margin-bottom: 20px;
}

.pix-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}

.pix-title {
  font-size: 20px;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 6px 0;
  line-height: 1.25;
}

.pix-subtitle {
  font-size: 13px;
  color: #94a3b8;
  margin: 0;
  line-height: 1.4;
}

/* Preço em destaque */
.pix-amount-box {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(245, 158, 11, 0.08) 100%);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 16px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.pix-amount-label {
  font-size: 12px;
  color: #94a3b8;
  font-weight: 600;
  text-transform: uppercase;
}
.pix-amount-val {
  font-size: 22px;
  font-weight: 900;
  color: #10b981;
  letter-spacing: -0.02em;
}

/* Formulário de Dados */
.pix-form-group {
  margin-bottom: 14px;
}
.pix-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #cbd5e1;
  margin-bottom: 6px;
}
.pix-input-wrap {
  position: relative;
}
.pix-input {
  width: 100%;
  height: 44px;
  background: #111c2e;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 0 14px 0 38px;
  font-size: 14px;
  color: #fff;
  outline: none;
  transition: all 0.2s;
}
.pix-input:focus {
  border-color: #10b981;
  background: #14233a;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}
.pix-input::placeholder {
  color: #64748b;
}
.pix-input-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
  width: 16px;
  height: 16px;
  pointer-events: none;
}

/* Botão Principal */
.pix-btn-primary {
  width: 100%;
  height: 48px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  border: none;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 8px 20px -4px rgba(16, 185, 129, 0.4);
  transition: all 0.2s;
  margin-top: 18px;
}
.pix-btn-primary:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}
.pix-btn-primary:active {
  transform: translateY(1px);
}
.pix-btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Timer Regressivo */
.pix-timer-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.25);
  padding: 8px 12px;
  border-radius: 12px;
  margin-bottom: 16px;
  font-size: 13px;
  color: #f87171;
  font-weight: 700;
}
.pix-timer-clock {
  font-variant-numeric: tabular-nums;
  font-weight: 900;
}

/* QR Code */
.pix-qrcode-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 14px 0;
}
.pix-qrcode-box {
  background: #ffffff;
  padding: 12px;
  border-radius: 18px;
  border: 2px solid #10b981;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 200px;
  max-height: 200px;
}
.pix-qrcode-box img {
  width: 176px;
  height: 176px;
  display: block;
}

/* Botão Copiar Código */
.pix-copy-btn {
  width: 100%;
  height: 46px;
  background: #111c2e;
  border: 1px solid rgba(16, 185, 129, 0.5);
  border-radius: 14px;
  color: #34d399;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 12px;
}
.pix-copy-btn:hover {
  background: rgba(16, 185, 129, 0.15);
}
.pix-copy-btn.copied {
  background: #10b981;
  color: #ffffff;
  border-color: #10b981;
}

/* Código em texto para seleção */
.pix-textarea {
  width: 100%;
  height: 52px;
  background: #090f19;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 8px 10px;
  font-family: monospace;
  font-size: 11px;
  color: #94a3b8;
  resize: none;
  margin-top: 10px;
  word-break: break-all;
}

/* Status em tempo real pulsante */
.pix-status-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
  font-size: 12px;
  color: #94a3b8;
  font-weight: 600;
}
.pix-status-dot {
  width: 9px;
  height: 9px;
  background: #10b981;
  border-radius: 50%;
  position: relative;
}
.pix-status-dot::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: #10b981;
  opacity: 0.5;
  animation: pixPulse 1.6s infinite ease-out;
}

@keyframes pixPulse {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(2.4); opacity: 0; }
}

/* Tela de Sucesso */
.pix-success-screen {
  text-align: center;
  padding: 20px 10px;
}
.pix-success-icon {
  width: 64px;
  height: 64px;
  background: rgba(16, 185, 129, 0.15);
  border: 2px solid #10b981;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px auto;
  color: #10b981;
  font-size: 32px;
  animation: pixPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes pixPop {
  0% { transform: scale(0.5); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* Selos de segurança no rodapé */
.pix-footer-badges {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 11px;
  color: #64748b;
}
.pix-footer-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
