/* ===================== */
/* MODAL DE DOAÇÃO - BRANCO + AZUL */
/* ===================== */

.donation-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(3px);
  overflow-y: auto;
  padding: 20px;
  font-family: "Inter", sans-serif;
}

.donation-modal.show {
  display: flex;
  animation: fadeIn 0.25s ease;
}

/* Caixa principal */
.donation-modal__dialog {
  background: #ffffff;
  color: #1a1a1a;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
  width: 100%;
  max-width: 460px;
  overflow: hidden;
  animation: slideUp 0.25s ease;
  display: flex;
  flex-direction: column;
}

/* Cabeçalho */
.donation-modal__header {
  background: linear-gradient(135deg, #4A9B9B 0%, #3D8585 100%);
  color: #fff;
  padding: 1.5rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 12px 12px 0 0;
}
.donation-modal__header h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.02em;
}
.donation-modal__close {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1.6rem;
  font-weight: 600;
  cursor: pointer;
  line-height: 1;
}

/* Corpo */
.donation-modal__body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Botões de valores */
.donation-amounts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.875rem;
  margin-bottom: 2rem;
}
.donation-amount-btn {
  background: #ffffff;
  border: 2px solid #E5E7EB;
  color: #374151;
  padding: 1rem 0.75rem;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}
.donation-amount-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transition: left 0.5s;
}
.donation-amount-btn:hover {
  background: #F3F4F6;
  border-color: #4A9B9B;
  color: #4A9B9B;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(74, 155, 155, 0.15);
}
.donation-amount-btn:hover::before {
  left: 100%;
}
.donation-amount-btn.selected {
  background: linear-gradient(135deg, #4A9B9B 0%, #3D8585 100%);
  border-color: #4A9B9B;
  color: #fff;
  box-shadow: 0 4px 16px rgba(74, 155, 155, 0.3);
  transform: translateY(-2px);
}

/* Bloco personalizado */
.donation-custom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
}

.donation-custom p {
  margin: 0;
  color: #004aad;
  font-weight: 600;
  font-size: 0.95rem;
  text-align: center;
}

/* Campo de valor */
.donation-custom-input {
  display: flex;
  align-items: center;
  background: #fff;
  border: 1px solid #c8d9ff;
  border-radius: 8px;
  overflow: hidden;
  width: 100%;
  max-width: 250px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}
.currency-symbol {
  background: #eaf2ff;
  color: #004aad;
  font-weight: 600;
  padding: 0.7rem .9rem;
  border-right: 1px solid #c8d9ff;
}
.donation-custom-input input {
  flex: 1;
  border: none;
  padding: 0.7rem;
  outline: none;
  background: transparent;
  color: #333;
  font-size: 1rem;
  text-align: left;
}

/* Botão principal */
.donation-submit-btn {
  width: 100%;
  background: linear-gradient(135deg, #4A9B9B 0%, #3D8585 100%);
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
  border: none;
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 16px rgba(74, 155, 155, 0.3);
  position: relative;
  overflow: hidden;
}
.donation-submit-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}
.donation-submit-btn:hover {
  background: linear-gradient(135deg, #3D8585 0%, #2D6B6B 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(74, 155, 155, 0.4);
}
.donation-submit-btn:hover::before {
  left: 100%;
}
.donation-submit-btn:active {
  transform: translateY(0);
}

/* Loading */
.donation-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
}
.loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #e6f0ff;
  border-top: 3px solid #77bcb7;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
.donation-loading p {
  margin: 0;
  color: #666;
  font-size: 0.9rem;
}

/* Resultado do PIX (estilo inspirado no project-2) */
.donation-pix-result {
  margin-top: 1rem;
  padding: 1.5rem;
  background: #f8fafc;
  border-radius: 12px;
  border: 2px solid #e2e8f0;
  animation: slideUp 0.3s ease;
}

.pix-result-header h3 {
  margin: 0 0 0.25rem;
  font-size: 1.1rem;
  color: #0f172a;
}

.pix-instructions {
  margin: 0;
  font-size: 0.9rem;
  color: #475569;
}

.pix-qr-container {
  display: flex;
  justify-content: center;
  margin: 1rem 0;
}

.pix-qr-code {
  width: 220px;
  height: 220px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
  border: 2px solid #e2e8f0;
}

.pix-code-container {
  margin-top: 1rem;
}

.pix-code-label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #475569;
}

.pix-code-wrapper {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}

.pix-code {
  flex: 1;
  padding: 0.75rem;
  background: #ffffff;
  border-radius: 8px;
  border: 2px solid #e2e8f0;
  font-family: 'Courier New', monospace;
  font-size: 0.75rem;
  color: #1e293b;
  word-break: break-all;
  max-height: 120px;
  overflow-y: auto;
}

.pix-copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.8rem 1.2rem;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 45%, #22c55e 100%);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.45);
  position: relative;
  overflow: hidden;
}

.pix-copy-btn:hover {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.55);
}

.pix-copy-btn:active {
  transform: translateY(0) scale(0.99);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.pix-copy-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(255, 255, 255, 0.5),
    transparent
  );
  transition: left 0.5s ease;
}

.pix-copy-btn:hover::before {
  left: 100%;
}

.pix-info {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: #475569;
}

.pix-expiry {
  margin: 0 0 0.35rem;
}

.pix-value {
  margin: 0;
}

.pix-status {
  margin-top: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pix-status.waiting {
  background: #fff7ed;
  color: #9a3412;
  border: 1px solid #fed7aa;
}

.pix-status.paid {
  background: #ecfdf3;
  color: #166534;
  border: 1px solid #bbf7d0;
}

/* Animações */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Responsivo */
@media (max-width: 480px) {
  .donation-modal {
    padding: 10px;
  }
  .donation-modal__dialog {
    max-width: 100%;
  }
  .donation-amounts {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
  .donation-amount-btn {
    padding: 0.875rem 0.5rem;
    font-size: 0.9rem;
  }
}

