/* ==========================================================================
   Checkout Transparente & Comprovante Digital • Black & Red Theme
   ========================================================================== */

/* Modal Container */
.checkout-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(12px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.checkout-modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.checkout-modal-window {
  background: #110706;
  border: 1px solid #331510;
  border-radius: 20px;
  width: 100%;
  max-width: 680px;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: 0 30px 80px -20px rgba(9, 7, 11, 0.98), 0 0 50px -15px rgba(95, 21, 2, 0.4);
  position: relative;
  transform: translateY(20px) scale(0.98);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.checkout-modal-overlay.open .checkout-modal-window {
  transform: translateY(0) scale(1);
}

.modal-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: #1C1C1C;
  border: 1px solid #333333;
  color: #A3A3A3;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  transition: all 0.2s ease;
  z-index: 10;
}

.modal-close-btn:hover {
  color: #FFFFFF;
  background: #E83D01;
  border-color: #E83D01;
}

/* Modal Header */
.modal-header {
  padding: 28px 32px 20px;
  border-bottom: 1px solid #222222;
}

.modal-header h3 {
  font-size: 1.4rem;
  font-weight: 800;
  color: #FFFFFF;
}

.modal-header p {
  font-size: 0.9rem;
  color: #8E8E8E;
  margin-top: 4px;
}

/* Abas de Pagamento */
.payment-tabs {
  display: flex;
  gap: 12px;
  padding: 20px 32px 0;
}

.tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 18px;
  background: #161616;
  border: 1px solid #2B2B2B;
  border-radius: 12px;
  color: #A3A3A3;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-btn:hover {
  background: #1E1E1E;
  color: #FFFFFF;
}

.tab-btn.active {
  background: #240C08;
  border-color: #E83D01;
  color: #FFFFFF;
  box-shadow: 0 4px 15px rgba(232, 61, 1, 0.25);
}

.tab-badge {
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(37, 211, 102, 0.15);
  color: #4ADE80;
}

/* Formulário de Checkout */
.checkout-body {
  padding: 24px 32px 32px;
}

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

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: #D4D4D4;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-control {
  width: 100%;
  padding: 14px 16px;
  background: #141414;
  border: 1px solid #2E2E2E;
  border-radius: 10px;
  color: #FFFFFF;
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
  outline: none;
  border-color: #E83D01;
  box-shadow: 0 0 0 3px rgba(232, 61, 1, 0.25);
  background: #1B0E0D;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-row-3 {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 16px;
}

/* Bloco de Cupom de Desconto */
.coupon-box {
  background: #141414;
  border: 1px dashed #3A3A3A;
  border-radius: 12px;
  padding: 16px;
  margin: 20px 0;
}

.coupon-input-group {
  display: flex;
  gap: 10px;
}

.coupon-btn {
  padding: 0 20px;
  background: #262626;
  border: 1px solid #3A3A3A;
  color: #FFFFFF;
  font-weight: 700;
  font-size: 0.85rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.coupon-btn:hover {
  background: #E83D01;
  border-color: #E83D01;
}

.coupon-feedback {
  font-size: 0.8rem;
  margin-top: 8px;
  font-weight: 600;
}

.coupon-feedback.success { color: #4ADE80; }
.coupon-feedback.error { color: #F87171; }

/* Resumo de Valores */
.order-summary-box {
  background: #161616;
  border: 1px solid #282828;
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 24px;
}

.summary-line {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: #A3A3A3;
  margin-bottom: 8px;
}

.summary-line.total {
  font-size: 1.15rem;
  font-weight: 800;
  color: #FFFFFF;
  border-top: 1px solid #2B2B2B;
  padding-top: 10px;
  margin-top: 10px;
  margin-bottom: 0;
}

.summary-line.discount {
  color: #4ADE80;
  font-weight: 700;
}

/* Área de Exibição do PIX */
.pix-display-area {
  display: none;
  text-align: center;
  padding: 20px;
  background: #141414;
  border: 1px solid #2A2A2A;
  border-radius: 16px;
}

.pix-qr-img {
  width: 220px;
  height: 220px;
  margin: 16px auto;
  border-radius: 12px;
  padding: 10px;
  background: #FFFFFF;
  box-shadow: 0 10px 30px rgba(0,0,0,0.6);
}

.pix-copia-cola-box {
  background: #0A0A0A;
  border: 1px solid #2A2A2A;
  border-radius: 8px;
  padding: 12px;
  font-family: monospace;
  font-size: 0.85rem;
  color: #D4D4D4;
  word-break: break-all;
  max-height: 70px;
  overflow-y: auto;
  margin: 14px 0;
  text-align: left;
}

.pix-timer {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #FBBF24;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.pix-status-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #A3A3A3;
  font-size: 0.85rem;
  margin-top: 16px;
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid #333333;
  border-top-color: #E83D01;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Selos e Informações de Segurança */
.security-badges {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 20px;
  font-size: 0.78rem;
  color: #888888;
}

.security-badge-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.checkout-security-info {
  margin-top: 14px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid #262626;
  border-radius: 8px;
  font-size: 0.78rem;
  color: #A3A3A3;
  line-height: 1.45;
}

.security-info-content {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.security-info-icon {
  font-size: 1.1rem;
  line-height: 1;
  margin-top: 2px;
  flex-shrink: 0;
}

.checkout-security-info strong {
  display: block;
  color: #FFFFFF;
  margin-bottom: 3px;
  font-size: 0.8rem;
}

.checkout-security-info p {
  margin: 0;
  color: #A3A3A3;
}

.card-security-note,
.pix-security-note {
  margin-top: 12px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid #262626;
  border-radius: 6px;
  font-size: 0.75rem;
  color: #BBB;
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.4;
}

.card-security-note strong,
.pix-security-note strong {
  color: #FFF;
}

/* ==========================================================================
   Comprovante Oficial de Matrícula (Página de Obrigado / Comprovante)
   ========================================================================== */
.receipt-wrapper {
  max-width: 720px;
  margin: 120px auto 60px;
  padding: 0 20px;
}

.receipt-card {
  background: #0D0D0D;
  border: 1px solid #2E2E2E;
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,0.9);
  position: relative;
}

.receipt-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #262626;
  padding-bottom: 24px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.receipt-header img {
  height: 44px;
  width: auto;
  object-fit: contain;
}

.receipt-status-badge {
  background: rgba(37, 211, 102, 0.15);
  color: #4ADE80;
  border: 1px solid rgba(37, 211, 102, 0.4);
  padding: 6px 16px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.receipt-id-banner {
  background: #141414;
  border: 1px solid #262626;
  border-radius: 12px;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 12px;
}

.receipt-id-item span {
  display: block;
  font-size: 0.75rem;
  color: #8E8E8E;
  text-transform: uppercase;
  font-weight: 700;
}

.receipt-id-item strong {
  font-size: 1.1rem;
  color: #FFFFFF;
}

.receipt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.receipt-info-box {
  background: #121212;
  border: 1px solid #222222;
  border-radius: 10px;
  padding: 16px;
}

.receipt-info-box .label {
  font-size: 0.75rem;
  text-transform: uppercase;
  font-weight: 700;
  color: #8E8E8E;
}

.receipt-info-box .val {
  font-size: 1rem;
  font-weight: 700;
  color: #FFFFFF;
  margin-top: 4px;
}

.receipt-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 30px;
}

/* Regras de Impressão */
@media print {
  body {
    background: #FFFFFF !important;
    color: #000000 !important;
  }
  .site-header, .site-footer, .receipt-actions, .btn-whatsapp {
    display: none !important;
  }
  .receipt-wrapper {
    margin: 0 !important;
    padding: 0 !important;
    max-width: 100% !important;
  }
  .receipt-card {
    border: 1px solid #CCCCCC !important;
    background: #FFFFFF !important;
    box-shadow: none !important;
    color: #000000 !important;
  }
  .receipt-id-banner, .receipt-info-box {
    background: #F8F8F8 !important;
    border-color: #E0E0E0 !important;
  }
  .receipt-id-item strong, .receipt-info-box .val {
    color: #000000 !important;
  }
}
