/* ===== ESTILOS DO MODAL DE CHECKOUT ===== */

/* Overlay do modal */
.checkout-modal-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  background: rgba(0, 0, 0, 0.9) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 6000 !important;
  padding: 20px !important;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.checkout-modal-overlay.show {
  opacity: 1;
}

/* Conteúdo do modal */
.checkout-modal-content {
  background: #0a0a0f !important;
  border: 2px solid #5e17eb !important;
  border-radius: 25px !important;
  max-width: 500px !important;
  width: 100% !important;
  max-height: 90vh !important;
  overflow-y: auto !important;
  padding: 30px !important;
  position: relative !important;
  animation: slideUp 0.3s ease;
}

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

/* Cabeçalho do checkout */
.checkout-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.checkout-header h2 {
  font-size: 28px;
  font-weight: 700;
  background: linear-gradient(135deg, #5e17eb, #ff0080);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0;
}

.checkout-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.8);
  font-size: 30px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.checkout-close:hover {
  color: #ff0080;
}

/* Resumo do pedido */
.checkout-summary {
  background: rgba(94, 23, 235, 0.1);
  border: 1px solid rgba(94, 23, 235, 0.3);
  border-radius: 15px;
  padding: 20px;
  margin-bottom: 25px;
}

.checkout-summary h3 {
  font-size: 18px;
  margin-bottom: 15px;
  color: white;
}

.summary-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 15px;
}

.summary-item span {
  color: rgba(255, 255, 255, 0.7);
}

.summary-item strong {
  color: white;
}

.summary-item.total {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 18px;
}

.summary-item.total strong {
  color: #00ff88;
  font-size: 22px;
}

/* Formulário */
#checkoutForm h3 {
  font-size: 18px;
  margin-bottom: 20px;
  color: white;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  font-weight: 500;
}

.form-input {
  width: 100%;
  padding: 12px 15px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  color: white;
  font-size: 16px;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.form-input:focus {
  outline: none;
  border-color: #5e17eb;
  background: rgba(255, 255, 255, 0.08);
}

.form-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

/* Botão de submit */
.checkout-submit-btn {
  width: 100%;
  padding: 15px;
  background: linear-gradient(135deg, #5e17eb, #ff0080);
  color: white;
  border: none;
  border-radius: 50px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 25px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.checkout-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(94, 23, 235, 0.4);
}

/* Loading */
#checkoutLoading {
  text-align: center;
  padding: 40px;
}

.loading-spinner {
  width: 60px;
  height: 60px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: #5e17eb;
  border-radius: 50%;
  margin: 0 auto 20px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

#checkoutLoading p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 16px;
}

/* ===== TELA DE PAGAMENTO PIX ===== */

.pix-payment-screen {
  text-align: center;
}

/* Cabeçalho PIX */
.pix-header {
  margin-bottom: 25px;
}

.pix-header h2 {
  font-size: 24px;
  margin-bottom: 10px;
  background: linear-gradient(135deg, #5e17eb, #ff0080);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.pix-value {
  font-size: 20px;
}

.pix-value span {
  color: rgba(255, 255, 255, 0.7);
}

.pix-value strong {
  color: #00ff88;
  font-size: 28px;
  margin-left: 10px;
}

/* Instruções */
.pix-instructions {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 15px;
  padding: 20px;
  margin-bottom: 25px;
}

.instruction-step {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
  text-align: left;
}

.instruction-step:last-child {
  margin-bottom: 0;
}

.step-number {
  background: #5e17eb;
  color: white;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}

.instruction-step span:last-child {
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  line-height: 1.4;
}

.instruction-step a {
  color: #ff0080;
  text-decoration: none;
}

.instruction-step a:hover {
  text-decoration: underline;
}

/* QR Code */
.pix-qrcode-container {
  margin: 25px 0;
}

.pix-qrcode {
  width: 200px;
  height: 200px;
  border-radius: 15px;
  border: 3px solid #5e17eb;
  padding: 10px;
  background: white;
}

.qrcode-label {
  margin-top: 10px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 700;
  letter-spacing: 2px;
}

/* Container do código PIX */
.pix-code-container {
  margin: 25px 0;
}

/* Botão copiar */
.copy-pix-btn {
  background: linear-gradient(135deg, #00c851, #00ff88);
  color: white;
  border: none;
  padding: 15px 30px;
  border-radius: 50px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: all 0.3s ease;
  margin-bottom: 15px;
}

.copy-pix-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 255, 136, 0.3);
}

/* Código PIX */
.pix-code-text {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 15px;
  word-break: break-all;
  font-family: monospace;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  max-height: 100px;
  overflow-y: auto;
}

/* Logo dos bancos */
.banks-logo {
  margin: 25px 0;
}

.banks-image {
  max-width: 100%;
  height: auto;
  opacity: 0.8;
}

/* Timer */
.pix-timer {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  margin-top: 20px;
}

/* ===== RESPONSIVIDADE ===== */

@media (max-width: 768px) {
  .checkout-modal-content {
    padding: 20px !important;
    margin: 10px;
  }

  .checkout-header h2 {
    font-size: 24px;
  }

  .form-input {
    font-size: 16px; /* Evita zoom no iOS */
  }

  .pix-qrcode {
    width: 180px;
    height: 180px;
  }

  .copy-pix-btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .checkout-modal-content {
    padding: 15px !important;
  }

  .checkout-header h2 {
    font-size: 20px;
  }

  .summary-item {
    font-size: 14px;
  }

  .pix-qrcode {
    width: 160px;
    height: 160px;
  }
}

/* Animação pulse para timer */
@keyframes pulse {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
  100% {
    opacity: 1;
  }
}

/* ===== TELA DE SUCESSO ===== */

.success-screen {
  text-align: center;
  padding: 20px;
}

/* Ícone animado */
.success-icon {
  margin-bottom: 25px;
  animation: successPulse 0.6s ease;
}

@keyframes successPulse {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Título */
.success-title {
  font-size: 28px;
  font-weight: 700;
  color: #00ff88;
  margin-bottom: 15px;
}

/* Mensagem */
.success-message {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.5;
  margin-bottom: 30px;
}

/* Detalhes do pedido */
.success-details {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  padding: 20px;
  margin-bottom: 25px;
}

.detail-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 15px;
}

.detail-item:last-child {
  margin-bottom: 0;
}

.detail-item span {
  color: rgba(255, 255, 255, 0.7);
}

.detail-item strong {
  color: white;
}

/* Aviso */
.success-notice {
  background: rgba(255, 193, 7, 0.1);
  border: 1px solid rgba(255, 193, 7, 0.3);
  border-radius: 10px;
  padding: 15px;
  margin-bottom: 25px;
  color: #ffc107;
  font-size: 14px;
}

/* Botão */
.success-btn {
  background: linear-gradient(135deg, #5e17eb, #ff0080);
  color: white;
  border: none;
  padding: 15px 40px;
  border-radius: 50px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
}

.success-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(94, 23, 235, 0.4);
}
