:root {
  --primary-color: #f47b20;
  --primary-hover: #dc6a14;
  --text-main: #1e2433;
  --text-muted: #6b7280;
  --bg-page: #0f1015;
  --card-bg: #faf8f5;
  --card-radius: 24px;
  --pill-radius: 9999px;
  --border-light: #e4e4e7;
  --bg-pill: #f4f4f5;
  --bg-card-alt: #f6efe7;
  --primary-soft: #fde9d8;
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-page);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 12px;
  background-image: radial-gradient(circle at 50% 20%, rgba(255, 94, 30, 0.08) 0%, transparent 60%);
}

/* Modal / Card Container */
.checkout-modal {
  width: 100%;
  max-width: 440px;
  background: var(--card-bg);
  border-radius: var(--card-radius);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.1);
  overflow: hidden;
  position: relative;
  animation: modalEnter 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalEnter {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Header com Miniaturas / Banner */
.checkout-header {
  position: relative;
  background: #27272a;
}

.banner-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 96px;
  overflow: hidden;
  position: relative;
}

.banner-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.92);
  transition: transform 0.4s ease;
}

.banner-grid:hover img {
  transform: scale(1.05);
}

.banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.1), rgba(0,0,0,0.4));
}

/* Profile Section */
.profile-row {
  display: flex;
  align-items: center;
  padding: 12px 20px 8px 20px;
  gap: 14px;
  position: relative;
}

.profile-avatar-wrap {
  position: relative;
  margin-top: -36px;
  flex-shrink: 0;
}

.profile-avatar {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  object-fit: cover;
  border: 3.5px solid #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: block;
  background: #e4e4e7;
}

.profile-info {
  flex: 1;
  min-width: 0;
}

.profile-name {
  font-size: 17px;
  font-weight: 700;
  color: #09090b;
  display: flex;
  align-items: center;
  gap: 6px;
}

.verified-badge {
  color: #3b82f6;
  display: inline-flex;
}

.profile-handle {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 1px;
}

/* Benefícios */
.benefits-section {
  padding: 10px 20px 14px 20px;
  border-bottom: 1px solid #f4f4f5;
}

.benefits-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #18181b;
  margin-bottom: 8px;
}

.benefits-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.benefits-list li {
  font-size: 13px;
  color: #3f3f46;
  display: flex;
  align-items: center;
  gap: 8px;
}

.benefits-list li svg {
  color: #10b981;
  flex-shrink: 0;
}

/* Preço */
.price-section {
  padding: 14px 20px 8px 20px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.price-value {
  font-size: 26px;
  font-weight: 800;
  color: #09090b;
  letter-spacing: -0.5px;
}

.price-period {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
}

.timer-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: #dc2626;
  background: #fef2f2;
  padding: 4px 10px;
  border-radius: var(--pill-radius);
  border: 1px solid #fee2e2;
}

/* Formas de Pagamento */
.payment-section {
  padding: 10px 20px 20px 20px;
}

.section-label {
  font-size: 14.5px;
  font-weight: 700;
  color: #18181b;
  margin-bottom: 14px;
}

/* QR Code Box */
.qrcode-card {
  border: 1.5px solid #ebecee;
  border-radius: 18px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #ffffff;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.04);
  margin-bottom: 14px;
}

.qrcode-wrapper {
  width: 210px;
  height: 210px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

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

.status-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  font-size: 12px;
  color: #059669;
  font-weight: 500;
}

.status-dot {
  width: 8px;
  height: 8px;
  background-color: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulseGreen 1.8s infinite;
}

@keyframes pulseGreen {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Copia e Cola Input Bar */
.copy-pill-wrapper {
  display: flex;
  align-items: center;
  background: #f4f4f6;
  border: 1px solid #e4e4e7;
  border-radius: var(--pill-radius);
  padding: 4px 5px 4px 14px;
  margin-bottom: 12px;
  position: relative;
}

.copy-input {
  flex: 1;
  background: transparent;
  border: none;
  font-size: 12.5px;
  color: #52525b;
  font-family: monospace;
  outline: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-copy-pix {
  background: var(--primary-color);
  color: #ffffff;
  border: none;
  border-radius: var(--pill-radius);
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-copy-pix:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-copy-pix:active {
  transform: translateY(0);
}

.btn-copy-pix.copied {
  background: #10b981;
}

/* Botões de Ação Alternativos */
.alt-buttons {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-bottom: 16px;
}

.btn-pill {
  width: 100%;
  height: 44px;
  border-radius: var(--pill-radius);
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  text-decoration: none;
}

.btn-gpay {
  background: #000000;
  color: #ffffff;
}

.btn-gpay:hover {
  background: #1f1f23;
}

.btn-card {
  background: #faf6f0;
  color: #27272a;
  border: 1px solid #ede3d7;
}

.btn-card:hover {
  background: #f4ecdf;
}

.btn-wallet {
  background: #faf6f0;
  color: #27272a;
  border: 1px solid #ede3d7;
  justify-content: space-between;
  padding: 0 18px;
}

.btn-wallet .wallet-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.badge-recharge {
  color: var(--primary-color);
  font-size: 13px;
  font-weight: 600;
}

/* Drawer / Acordeão de Cartão de Crédito */
.credit-card-panel {
  display: none;
  background: #fbfbfb;
  border: 1px solid #e4e4e7;
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 12px;
  animation: fadeIn 0.2s ease;
}

.credit-card-panel.active {
  display: block;
}

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

.form-label {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  color: #52525b;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-control {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid #d4d4d8;
  font-size: 13.5px;
  color: #18181b;
  outline: none;
  transition: border-color 0.2s;
  background: #ffffff;
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(255, 94, 30, 0.15);
}

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

.btn-pay-card {
  width: 100%;
  height: 42px;
  background: var(--primary-color);
  color: #ffffff;
  border: none;
  border-radius: var(--pill-radius);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 6px;
  transition: background 0.2s;
}

.btn-pay-card:hover {
  background: var(--primary-hover);
}

/* Rodapé de Segurança */
.security-note {
  font-size: 10.5px;
  color: #a1a1aa;
  text-align: center;
  line-height: 1.4;
  margin-bottom: 12px;
}

.more-methods {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 500;
  color: #52525b;
  cursor: pointer;
  text-align: center;
  transition: color 0.2s;
}

.more-methods:hover {
  color: #18181b;
}

/* Toast de Notificação */
.toast-msg {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: #18181b;
  color: #ffffff;
  padding: 10px 20px;
  border-radius: var(--pill-radius);
  font-size: 13.5px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 9999;
  pointer-events: none;
}

.toast-msg.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Tela de Sucesso (Pago com Sucesso) */
.success-screen {
  display: none;
  text-align: center;
  padding: 30px 20px;
}

.success-screen.active {
  display: block;
}

.success-icon {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: #ecfdf5;
  color: #10b981;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  box-shadow: 0 0 0 8px #d1fae5;
}

.success-title {
  font-size: 20px;
  font-weight: 700;
  color: #065f46;
  margin-bottom: 6px;
}

.success-subtitle {
  font-size: 13.5px;
  color: var(--text-muted);
  margin-bottom: 20px;
}
/* ===== Área do QR igual à foto 2 ===== */

/* Remove o card externo */
.qrcode-card {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  margin: 12px 0 14px;
}

/* A caixa do QR com borda escura vira o elemento principal */
.qrcode-wrapper {
  width: 252px;
  height: 252px;
  padding: 10px;
  background: #ffffff;
  border: 1.5px solid #1e2433;
  border-radius: 12px;
}

.qrcode-img {
  image-rendering: pixelated;
}

/* Status em laranja e discreto */
.status-indicator {
  color: #f47b20;
  font-size: 11.5px;
  margin-top: 8px;
}
.status-dot {
  background-color: #f47b20;
  animation: pulseOrange 1.8s infinite;
}
@keyframes pulseOrange {
  0%   { transform: scale(.95); box-shadow: 0 0 0 0 rgba(244,123,32,.7); }
  70%  { transform: scale(1);   box-shadow: 0 0 0 6px rgba(244,123,32,0); }
  100% { transform: scale(.95); box-shadow: 0 0 0 0 rgba(244,123,32,0); }
}

/* Campo do Pix: branco, borda laranja, fonte normal */
.copy-pill-wrapper {
  background: #ffffff;
  border: 1.5px solid #f47b20;
  padding: 3px 4px 3px 16px;
  margin-bottom: 10px;
}
.copy-input {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  color: #1e2433;
}
.btn-copy-pix {
  padding: 9px 16px;
  font-weight: 700;
}

/* Botões de baixo: mais compactos, sem borda */
.alt-buttons { gap: 8px; margin-bottom: 12px; }
.btn-pill { height: 40px; font-weight: 500; }
.btn-card, .btn-wallet {
  background: #f6efe7;
  border: none;
}
/* ===== Resto do card na paleta nova ===== */
.profile-avatar { border-color: var(--card-bg); }
.profile-name,
.price-value,
.benefits-title,
.section-label { color: var(--text-main); }

.benefits-section { border-bottom-color: var(--primary-soft); }
.benefits-list li svg { color: var(--primary-color); }

.btn-card:hover,
.btn-wallet:hover { background: #efe4d6; }

.btn-gpay { border: 1.5px solid #000; }

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(244, 123, 32, 0.18);
}

/* Faltava definir esta animação (o painel do cartão usa) */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}
/* ===== Tipografia igual à referência (Poppins) ===== */
:root {
  --font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* botões e inputs não herdam a fonte sozinhos */
button, input, textarea { font-family: inherit; }

/* Poppins é mais larga e pesada: reduzi pesos e tamanhos para ficar como na foto */
.price-value {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.3px;
}
.profile-name,
.section-label,
.benefits-title { font-weight: 600; }

.benefits-list li { font-size: 12.5px; }
.profile-handle { font-size: 12.5px; }

.copy-input { font-family: var(--font-family); font-size: 13.5px; }
.btn-copy-pix { font-weight: 600; }
.btn-pill { font-weight: 500; }

/* números do timer sem "pular" a cada segundo */
.timer-badge { font-variant-numeric: tabular-nums; }
/* ===== MOBILE ===== */
html { -webkit-text-size-adjust: 100%; }

@media (max-width: 480px) {
  body {
    padding: 0;
    align-items: flex-start;      /* cartão começa no topo, sem ficar centralizado com vão */
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
  }

  /* cartão ocupa a tela toda */
  .checkout-modal {
    max-width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    border-radius: 0;
    box-shadow: none;
    padding-bottom: env(safe-area-inset-bottom);
  }

  /* menos respiro lateral */
  .profile-row { padding-left: 16px; padding-right: 16px; }
  .benefits-section,
  .price-section,
  .payment-section { padding-left: 16px; padding-right: 16px; }

  .banner-grid { height: 110px; }
  .banner-grid:hover img { transform: none; }   /* sem efeito de hover no toque */

  /* QR se ajusta à largura do aparelho */
  .qrcode-wrapper {
    width: min(76vw, 252px);
    height: auto;
    aspect-ratio: 1 / 1;
  }
  .status-indicator { text-align: center; line-height: 1.35; }

  /* campo do Pix + botão: sempre na mesma linha, sem estourar */
  .copy-input { min-width: 0; font-size: 16px; } /* 16px evita zoom do iPhone */
  .btn-copy-pix { flex-shrink: 0; min-height: 44px; padding: 10px 16px; }

  /* área de toque confortável */
  .btn-pill { height: 48px; }
  .btn-pay-card { height: 48px; }
  .form-control { height: 44px; font-size: 16px; }

  /* aviso (toast) acima da barra do celular */
  .toast-msg {
    bottom: calc(16px + env(safe-area-inset-bottom));
    width: calc(100% - 32px);
    max-width: 420px;
    text-align: center;
    justify-content: center;
    white-space: normal;
  }
}

/* celulares bem pequenos */
@media (max-width: 360px) {
  .price-value { font-size: 21px; }
  .qrcode-wrapper { width: 72vw; }
  .btn-copy-pix { padding: 10px 12px; font-size: 12.5px; }
}
/* ===== Loading do QR Code ===== */
.pix-loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #fff;
  border-radius: 12px;
  font-size: 13px;
  color: #52525b;
}
.pix-spinner {
  width: 34px;
  height: 34px;
  border: 3px solid #fde9d8;
  border-top-color: #f47b20;
  border-radius: 50%;
  animation: pixSpin 0.8s linear infinite;
}
.qrcode-img[src=""] { visibility: hidden; }
@keyframes pixSpin { to { transform: rotate(360deg); } }
