/* ==========================================================
   Checkout Broski (MB WAY & Multibanco) — mesmo fluxo do Construindo Futuro
   Paleta mapeada para as cores da campanha Ayla
   ========================================================== */
#donationModal {
  --azul-principal: var(--green);
  --azul-escuro: var(--green-dark);
  --azul-luz: var(--green-light);
  --amarelo-acao: var(--yellow);
  --amarelo-hover: var(--yellow-hover);
  --verde-botao: #28a745;
  --verde-hover: #218838;
  --verde-sombra: #1e7e34;
  --vermelho-urgencia: #FF3B30;
  --laranja-texto: #e28743;
  --fundo-creme: #FDFBF7;
  --branco: #FFFFFF;
  --texto-forte: #111814;
  --texto-medio: #4F5E55;
  --borda: #E0E5E2;
  --raio-sm: 10px;
  --raio-md: 16px;
  --sombra-viva: 0 8px 24px -6px rgba(0, 117, 35, 0.25);
  --sombra-amarela: 0 10px 24px -6px rgba(255, 188, 0, 0.4);
  --sombra-verde: 0 10px 24px -6px rgba(40, 167, 69, 0.4);
  --sombra-card: 0 4px 16px -4px rgba(0, 0, 0, 0.06);
  --fonte-display: 'Montserrat', sans-serif;
  --fonte-corpo: 'Inter', sans-serif;
  font-family: var(--fonte-corpo);
}
#donationModal *, #donationModal *::before, #donationModal *::after { box-sizing: border-box; }
#donationModal img { max-width: 100%; height: auto; display: block; }
#donationModal button { font-family: inherit; cursor: pointer; }
/* ══ MODAL DE DOAÇÃO ══ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(0, 51, 102, 0.6);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal-box {
  background: var(--branco);
  width: 100%;
  max-width: 440px;
  border-radius: var(--raio-md);
  overflow: hidden;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  transform: translateY(20px) scale(0.95);
  transition: all 0.3s;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
}

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

.modal-header {
  background: var(--azul-principal);
  color: var(--branco);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 1.1rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-close {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--branco);
  transition: background 0.2s;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.35);
}

.modal-stepper {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0.75rem 1.25rem;
  background: var(--fundo-creme);
  border-bottom: 1px solid var(--borda);
}

.step-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--texto-medio);
  text-transform: uppercase;
}

.step-pill.ativo {
  color: var(--azul-principal);
}

.step-n {
  width: 18px;
  height: 18px;
  background: var(--borda);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
}

.step-pill.ativo .step-n {
  background: var(--azul-principal);
  color: var(--branco);
}

.step-linha {
  flex: 1;
  height: 2px;
  background: var(--borda);
}

.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
  scrollbar-width: none;
}

.modal-body::-webkit-scrollbar {
  display: none;
}

.valores-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 1.25rem;
}

.pill-btn {
  border: 2px solid var(--borda);
  background: var(--branco);
  color: var(--texto-forte);
  font-size: 0.95rem;
  font-weight: 800;
  padding: 10px 0;
  border-radius: 10px;
  transition: all 0.2s;
  position: relative;
  font-family: var(--fonte-corpo);
}

.pill-btn:hover {
  border-color: var(--azul-principal);
  cursor: pointer;
}

.pill-btn.selected {
  border-color: var(--azul-principal);
  background: var(--azul-luz);
  color: var(--azul-escuro);
  box-shadow: 0 4px 10px rgba(0, 86, 179, 0.15);
  transform: translateY(-1px);
}

.pill-btn.popular {
  border-color: var(--amarelo-acao);
}

.pill-btn.popular.selected {
  background: #fffcf0;
  box-shadow: 0 4px 10px rgba(255, 193, 7, 0.15);
  color: var(--azul-escuro);
  border-color: var(--amarelo-acao);
}

.pill-btn.popular::after {
  content: 'MAIS ESCOLHIDO';
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--amarelo-acao);
  color: var(--azul-escuro);
  font-size: 0.5rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
  letter-spacing: 0.05em;
}

.ou-divisor {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--texto-medio);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.valor-livre {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 2px solid var(--borda);
  border-radius: var(--raio-sm);
  padding: 0.5rem 1rem;
}

.valor-livre:focus-within {
  border-color: var(--azul-principal);
  box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.1);
}

.valor-livre span {
  font-family: var(--fonte-display);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--azul-principal);
}

.valor-livre input {
  border: none;
  outline: none;
  font-family: var(--fonte-display);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--azul-escuro);
  width: 100%;
  max-width: 140px;
  text-align: center;
}

.valor-livre input::placeholder {
  color: #C3CEC8;
}

.modal-footer {
  padding: 1.25rem;
  border-top: 1px solid var(--borda);
  background: var(--fundo-creme);
}

.btn-modal-cta {
  width: 100%;
  background: var(--verde-botao);
  color: var(--branco);
  font-size: 1.05rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 1rem;
  border-radius: var(--raio-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: var(--sombra-verde);
  transition: all 0.2s;
}

.btn-modal-cta:hover {
  background: var(--verde-hover);
  transform: translateY(-1px);
  cursor: pointer;
}

.chip-resumo {
  background: var(--azul-escuro);
  color: var(--branco);
  border-radius: var(--raio-sm);
  padding: 1rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chip-resumo .lbl {
  font-size: 0.7rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.7);
  text-transform: uppercase;
  margin-bottom: 2px;
}

.chip-resumo .val {
  font-family: var(--fonte-display);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--amarelo-acao);
  line-height: 1;
}

.btn-voltar {
  font-size: 0.75rem;
  color: var(--branco);
  text-decoration: underline;
  font-weight: 600;
  cursor: pointer;
}

.campo {
  margin-bottom: 1rem;
}

.campo label {
  display: block;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--azul-escuro);
  margin-bottom: 4px;
}

.campo label span {
  color: var(--texto-medio);
  font-weight: 600;
  font-size: 0.7rem;
}

.input-txt {
  width: 100%;
  border: 2px solid var(--borda);
  border-radius: 8px;
  padding: 0.85rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--texto-forte);
  transition: border-color 0.2s;
  outline: none;
  font-family: var(--fonte-corpo);
}

.input-txt:focus {
  border-color: var(--azul-principal);
}

.box-turbo {
  border: 2px solid var(--azul-luz);
  background: var(--fundo-creme);
  border-radius: 8px;
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.2s;
}

.box-turbo.ativo {
  border-color: var(--azul-principal);
  background: var(--azul-luz);
}

.box-turbo-info strong {
  display: block;
  font-size: 0.85rem;
  color: var(--azul-escuro);
  margin-bottom: 2px;
}

.box-turbo-info span {
  display: block;
  font-size: 0.75rem;
  color: var(--texto-medio);
  line-height: 1.2;
}

.toggle {
  width: 40px;
  height: 22px;
  background: var(--borda);
  border-radius: 20px;
  position: relative;
  flex-shrink: 0;
  transition: background 0.3s;
}

.toggle::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background: var(--branco);
  border-radius: 50%;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.box-turbo.ativo .toggle {
  background: var(--azul-principal);
}

.box-turbo.ativo .toggle::after {
  transform: translateX(18px);
}

.donation-step {
  display: none;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
}

.donation-step.active {
  display: flex;
}

.donation-loading {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
  text-align: center;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--azul-luz);
  border-top-color: var(--azul-principal);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 1rem;
}

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

/* Seleção de Métodos de Pagamento */
.methods-select-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 1.1rem;
}

.method-card {
  background: #FFFFFF;
  border: 2px solid var(--borda);
  border-radius: 12px;
  padding: 12px 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s;
  position: relative;
}

.method-card:hover {
  border-color: var(--azul-principal);
  background: #fbfdff;
}

.method-card.selected {
  border-color: var(--azul-principal);
  background: var(--azul-luz);
  box-shadow: 0 4px 12px rgba(0, 86, 179, 0.12);
}

.method-card .method-tag {
  position: absolute;
  top: -8px;
  right: 8px;
  font-size: 0.55rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

.method-card.selected .method-tag {
  background: var(--azul-principal);
  color: var(--branco);
}

.method-card:not(.selected) .method-tag {
  background: var(--borda);
  color: var(--texto-medio);
}

.method-logo-box {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #FFFFFF;
  border-radius: 6px;
  padding: 2px 8px;
}

.method-logo-box img {
  max-height: 32px !important;
  width: auto !important;
  object-fit: contain;
  border-radius: 0 !important;
}

.method-title {
  font-size: 0.84rem;
  font-weight: 800;
  color: var(--azul-escuro);
  margin-top: 2px;
}

.method-sub {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--texto-medio);
  text-align: center;
}

/* Erros no Checkout */
.checkout-error {
  display: none;
  background: #fff5f5;
  border: 1px solid #fed7d7;
  border-left: 4px solid var(--vermelho-urgencia);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 1rem;
  font-size: 0.82rem;
  color: #c53030;
  line-height: 1.4;
}

.checkout-error strong {
  display: block;
  font-weight: 800;
  margin-bottom: 2px;
  font-size: 0.86rem;
}

.checkout-error .error-retry-action {
  margin-top: 6px;
}

.checkout-error .btn-switch-method {
  background: var(--azul-principal);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 5px 10px;
  border-radius: 6px;
  display: inline-block;
  cursor: pointer;
  border: none;
  margin-top: 4px;
}

/* MB WAY Waiting */
.mbway-wait-wrap {
  text-align: center;
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.mbway-pulse-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--azul-luz);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--azul-principal);
  margin-bottom: 1.2rem;
  position: relative;
  animation: mbwayPulse 2s infinite;
}

@keyframes mbwayPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 86, 179, 0.4);
  }

  70% {
    box-shadow: 0 0 0 16px rgba(0, 86, 179, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(0, 86, 179, 0);
  }
}

.mbway-wait-title {
  font-family: var(--fonte-display);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--azul-escuro);
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.mbway-wait-desc {
  font-size: 0.85rem;
  color: var(--texto-medio);
  margin-bottom: 1.2rem;
  max-width: 320px;
  line-height: 1.45;
}

.mbway-wait-chip {
  background: var(--fundo-creme);
  border: 1px solid var(--borda);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 1.2rem;
  width: 100%;
  max-width: 330px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

.mbway-wait-timer {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--azul-principal);
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Multibanco Voucher */
.multibanco-voucher-wrap {
  padding: 1.2rem 1rem;
}

.mb-voucher-card {
  background: #FFFFFF;
  border: 2px solid var(--azul-principal);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 1.2rem;
  box-shadow: var(--sombra-card);
}

.mb-voucher-head {
  background: #F8FAFC;
  border-bottom: 1px solid var(--borda);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mb-voucher-head img {
  height: 32px !important;
  max-height: 32px !important;
  width: auto !important;
  max-width: 90px !important;
  object-fit: contain;
  border-radius: 0 !important;
}

.mb-field-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px dashed var(--borda);
}

.mb-field-row:last-child {
  border-bottom: none;
}

.mb-lbl {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--texto-medio);
  text-transform: uppercase;
}

.mb-val-box {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mb-val-text {
  font-family: monospace;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--azul-escuro);
  letter-spacing: 0.05em;
}

.btn-copy-small {
  background: var(--azul-luz);
  color: var(--azul-principal);
  border: none;
  border-radius: 6px;
  padding: 5px 9px;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-copy-small:hover {
  background: var(--azul-principal);
  color: var(--branco);
}

.btn-copy-small.copied {
  background: var(--verde-botao);
  color: var(--branco);
}

.mb-notice {
  font-size: 0.78rem;
  color: var(--texto-medio);
  background: var(--fundo-creme);
  border: 1px solid var(--borda);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 1.2rem;
  line-height: 1.4;
}

/* Sucesso MB WAY */
.success-screen-wrap {
  text-align: center;
  padding: 2rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.success-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #e8f5e9;
  color: var(--verde-botao);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.2rem;
  animation: popSuccess 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popSuccess {
  0% {
    transform: scale(0.4);
    opacity: 0;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.success-title {
  font-family: var(--fonte-display);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--azul-escuro);
  margin-bottom: 0.5rem;
}

.success-desc {
  font-size: 0.9rem;
  color: var(--texto-medio);
  max-width: 320px;
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

