#ra-donation-modal[hidden] { display: none !important; }

#ra-donation-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.ra-modal-card {
  position: relative;
  width: 100%;
  max-width: 470px;
  max-height: 94vh;
  overflow-y: auto;
  border-radius: 28px 28px 0 0;
  background: var(--card, #fff);
  color: var(--foreground, #1f2937);
  padding: 24px;
  box-shadow: 0 -10px 40px rgba(0,0,0,.18);
  animation: raSlideUp .24s ease-out;
}

.ra-close {
  position: absolute;
  right: 16px;
  top: 16px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted-foreground, #6b7280);
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
}
.ra-close:hover { background: var(--surface, #f5f5f5); }

.ra-title {
  margin: 6px 46px 0 0;
  font-size: 27px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.025em;
}
.ra-title span { color: var(--primary-dark, #16a34a); }
.ra-subtitle {
  margin: 10px 0 0;
  color: var(--muted-foreground, #6b7280);
  font-size: 14px;
  line-height: 1.55;
}

.ra-values {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 20px;
}
.ra-value {
  min-height: 52px;
  border: 2px solid var(--border, #e5e7eb);
  border-radius: 16px;
  background: var(--surface, #f8fafc);
  color: var(--foreground, #111827);
  font-weight: 800;
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}
.ra-value:hover { transform: translateY(-1px); border-color: var(--primary, #22c55e); }
.ra-value.is-selected {
  border-color: var(--primary, #22c55e);
  background: var(--primary-soft, #ecfdf5);
  color: var(--primary-dark, #15803d);
}

.ra-field-label {
  display: block;
  margin-top: 16px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted-foreground, #6b7280);
}
.ra-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 7px;
  padding: 0 15px;
  min-height: 52px;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 16px;
  background: var(--surface, #f8fafc);
}
.ra-input-wrap:focus-within { border-color: var(--primary, #22c55e); }
.ra-input-prefix { font-size: 14px; font-weight: 800; color: var(--muted-foreground, #6b7280); }
.ra-input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--foreground, #111827);
  font-size: 16px;
  font-weight: 700;
}

.ra-error {
  margin-top: 10px;
  color: #dc2626;
  font-size: 12px;
  font-weight: 700;
}

.ra-primary-btn,
.ra-secondary-btn {
  width: 100%;
  min-height: 58px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  transition: transform .15s ease, opacity .15s ease;
}
.ra-primary-btn {
  margin-top: 18px;
  border: 0;
  background: var(--primary, #22c55e);
  color: var(--primary-foreground, #fff);
  box-shadow: 0 8px 24px rgba(34,197,94,.22);
}
.ra-primary-btn:hover { transform: translateY(-1px); }
.ra-primary-btn:disabled { cursor: wait; opacity: .65; transform: none; }
.ra-secondary-btn {
  margin-top: 10px;
  border: 1px solid var(--border, #e5e7eb);
  background: transparent;
  color: var(--foreground, #111827);
}

.ra-total {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 18px;
  background: var(--primary-soft, #ecfdf5);
  text-align: center;
}
.ra-total small {
  display: block;
  color: var(--primary-dark, #15803d);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.ra-total strong {
  display: block;
  margin-top: 2px;
  color: var(--primary-dark, #15803d);
  font-size: 29px;
  line-height: 1.1;
}

.ra-qr-wrap {
  display: flex;
  justify-content: center;
  margin-top: 18px;
}
.ra-qr {
  display: block;
  width: min(235px, 72vw);
  height: auto;
  border-radius: 16px;
  background: #fff;
  padding: 8px;
  box-shadow: 0 4px 18px rgba(0,0,0,.08);
}
.ra-pix-code {
  width: 100%;
  margin-top: 14px;
  min-height: 82px;
  resize: none;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 16px;
  background: var(--surface, #f8fafc);
  color: var(--foreground, #111827);
  padding: 12px;
  font-size: 11px;
  line-height: 1.4;
  word-break: break-all;
  outline: none;
}

.ra-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--surface, #f8fafc);
  color: var(--muted-foreground, #6b7280);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}
.ra-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--primary, #22c55e);
  animation: raPulse 1.2s ease-in-out infinite;
}

.ra-success-icon {
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  margin: 8px auto 0;
  border-radius: 999px;
  background: var(--primary-soft, #ecfdf5);
  color: var(--primary-dark, #15803d);
  font-size: 36px;
}
.ra-success .ra-title,
.ra-success .ra-subtitle { text-align: center; margin-right: 0; }
.ra-success-note {
  margin-top: 18px;
  padding: 15px;
  border-radius: 18px;
  background: var(--primary-soft, #ecfdf5);
  color: var(--primary-dark, #15803d);
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}

.ra-security {
  margin-top: 14px;
  color: var(--muted-foreground, #6b7280);
  font-size: 11px;
  text-align: center;
}

@keyframes raSlideUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes raPulse {
  0%, 100% { opacity: .35; transform: scale(.9); }
  50% { opacity: 1; transform: scale(1); }
}

@media (min-width: 640px) {
  #ra-donation-modal { align-items: center; padding: 24px; }
  .ra-modal-card { border-radius: 28px; padding: 30px; }
}
