/* Regnum Animale – donation dialog. Uses the colour variables of the main stylesheet. */
.ra-overlay {
  position: fixed; inset: 0; z-index: 2000; display: flex; align-items: flex-start; justify-content: center;
  padding: 24px 12px; overflow-y: auto; background: hsl(150 30% 8% / 0.7);
  font-family: 'Karla', system-ui, sans-serif;
}
.ra-dialog {
  position: relative; width: 100%; max-width: 520px; margin: auto; padding: 28px 24px 24px;
  background: hsl(var(--card)); color: hsl(var(--foreground));
  border-radius: 1rem; box-shadow: 0 25px 60px -15px rgb(0 0 0 / 0.5);
}
.ra-dialog h2 { font-family: 'Cormorant Garamond', serif; font-size: 2rem; font-weight: 600; line-height: 1.1; margin: 0 0 6px; }
.ra-sub { margin: 0 0 18px; color: hsl(var(--muted-foreground)); font-size: 0.95rem; }
.ra-close {
  position: absolute; top: 10px; right: 12px; width: 40px; height: 40px; border: 0; background: transparent;
  font-size: 28px; line-height: 1; cursor: pointer; color: hsl(var(--muted-foreground)); border-radius: 8px;
}
.ra-close:hover { color: hsl(var(--foreground)); }
.ra-field { margin-bottom: 12px; }
.ra-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ra-row > .ra-field { min-width: 0; }
.ra-field label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 4px; }
.ra-field input[type=text], .ra-field input[type=email], .ra-field input[type=tel] {
  width: 100%; box-sizing: border-box; height: 44px; padding: 0 12px; font: inherit; font-size: 16px;
  color: hsl(var(--foreground)); background: hsl(var(--background)); border: 1px solid hsl(var(--input)); border-radius: 0.5rem;
}
.ra-field input:focus-visible, .ra-btn:focus-visible, .ra-close:focus-visible, .ra-check input:focus-visible {
  outline: 2px solid hsl(var(--ring)); outline-offset: 2px;
}
.ra-field input[aria-invalid=true] { border-color: hsl(var(--destructive)); }
.ra-err { color: hsl(var(--destructive)); font-size: 0.8rem; margin-top: 3px; min-height: 0; }
.ra-hint { font-size: 0.78rem; color: hsl(var(--muted-foreground)); margin-top: 3px; }
.ra-check { display: flex; gap: 10px; align-items: flex-start; font-size: 0.85rem; margin: 14px 0; line-height: 1.4; }
.ra-check input { margin-top: 3px; width: 18px; height: 18px; flex: none; }
.ra-btn {
  display: block; width: 100%; height: 52px; border: 0; border-radius: 0.5rem; cursor: pointer; font: inherit;
  font-size: 1.05rem; font-weight: 700; background: hsl(var(--accent)); color: hsl(var(--accent-foreground));
}
.ra-btn:hover { filter: brightness(0.96); }
.ra-btn[disabled] { opacity: 0.6; cursor: wait; }
.ra-btn.ra-secondary { background: transparent; border: 1px solid hsl(var(--input)); color: hsl(var(--foreground)); margin-top: 10px; }
/* Amount buttons on the page: 1-6 buttons share the row evenly (the list comes from config 'amounts') */
.ra-amounts { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 0.75rem; }
.ra-testbadge {
  position: fixed; left: 12px; bottom: 12px; z-index: 1800; padding: 6px 12px; border-radius: 999px; pointer-events: none;
  font: 700 0.75rem/1.2 'Karla', system-ui, sans-serif; letter-spacing: 0.04em; color: #fff; background: #b45309; box-shadow: 0 4px 14px rgb(0 0 0 / 0.35);
}
.ra-ref { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0 0 12px; padding: 12px 14px; border-radius: 0.5rem;
  background: hsl(var(--background)); border: 1px solid hsl(var(--input)); font-size: 0.95rem; }
.ra-ref strong { text-align: right; }
.ra-icon-autogiro-form::before { content: 'AG'; }
.ra-icon-swish-qr { background: #1a1a1a; }
.ra-icon-swish-qr::before { content: 'Sw'; }
.ra-qr { display: flex; justify-content: center; margin: 0 0 14px; }
.ra-qr img { width: 240px; height: 240px; max-width: 100%; border-radius: 0.75rem; background: #fff; border: 1px solid hsl(var(--input)); }
.ra-steps { margin: 0 0 14px; padding-left: 1.4rem; font-size: 0.95rem; line-height: 1.5; list-style: decimal; }
.ra-steps li { margin: 0 0 4px; padding-left: 2px; list-style: decimal; }
.ra-btn.ra-swish { background: #1a1a1a; color: #fff; }
.ra-methods { display: grid; gap: 10px; }
.ra-method {
  display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; text-align: left; font: inherit; cursor: pointer;
  color: hsl(var(--foreground)); background: hsl(var(--background)); border: 1px solid hsl(var(--input)); border-radius: 0.75rem;
}
.ra-method:hover { border-color: hsl(var(--primary)); }
.ra-method:focus-visible { outline: 2px solid hsl(var(--ring)); outline-offset: 2px; }
.ra-method-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ra-method-body strong { font-size: 1.05rem; }
.ra-method-body span { font-size: 0.85rem; color: hsl(var(--muted-foreground)); }
.ra-method-icon {
  flex: none; width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 700; color: #fff; background: hsl(var(--primary));
}
.ra-icon-swish, .ra-icon-swish-recurring { background: #1a1a1a; }
.ra-icon-swish::before, .ra-icon-swish-recurring::before { content: 'Sw'; }
.ra-icon-card::before { content: '\25AD'; font-size: 1.4rem; }
.ra-icon-autogiro::before { content: 'AG'; }
.ra-alert { margin: 0 0 14px; padding: 10px 12px; border-radius: 0.5rem; font-size: 0.9rem; background: hsl(var(--destructive) / 0.1); color: hsl(var(--destructive)); }
.ra-center { text-align: center; padding: 12px 0 4px; }
.ra-spinner {
  width: 44px; height: 44px; margin: 8px auto 16px; border-radius: 50%;
  border: 4px solid hsl(var(--input)); border-top-color: hsl(var(--primary)); animation: ra-spin 0.9s linear infinite;
}
@keyframes ra-spin { to { transform: rotate(360deg); } }
.ra-hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.ra-banner {
  position: fixed; left: 12px; right: 12px; top: 12px; z-index: 1900; max-width: 560px; margin: 0 auto; padding: 14px 44px 14px 16px;
  background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); border-radius: 0.75rem; box-shadow: 0 10px 30px -10px rgb(0 0 0 / 0.5);
  font-family: 'Karla', system-ui, sans-serif;
}
.ra-banner button { position: absolute; top: 6px; right: 8px; border: 0; background: transparent; color: inherit; font-size: 24px; cursor: pointer; }
@media (max-width: 480px) { .ra-row { grid-template-columns: 1fr; } .ra-dialog { padding: 24px 16px 18px; } }
@media (prefers-reduced-motion: reduce) { .ra-spinner { animation-duration: 3s; } }
