/* ==========================================================
   Riverport Business Club - form sending overlay
   Used with js/riverport-form-processing.js on every form page.
   Contact + Join:          spinner, then the thank-you page loads
   Contributions + Callback: spinner that turns into "Sent successfully"
   .rp-processing--inset sits inside a pop-up (the callback form)
   instead of covering the whole page.
   ========================================================== */

.rp-processing { position: fixed; inset: 0; z-index: 900; display: flex; align-items: center; justify-content: center; padding: 1rem; background: rgba(40, 40, 40, 0.6); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.rp-processing[hidden] { display: none; }
.rp-processing--inset { position: absolute; z-index: 5; background: rgba(255, 255, 255, 0.94); -webkit-backdrop-filter: none; backdrop-filter: none; border-radius: inherit; }

.rp-processing__box {
  display: flex; flex-direction: column; align-items: center; gap: 1rem; width: min(380px, 100%);
  padding: 2rem 2.25rem; border-radius: var(--radius-lg); background: var(--white); box-shadow: var(--shadow-md);
  text-align: center; animation: rp-pop 0.25s var(--ease);
}
.rp-processing--inset .rp-processing__box { box-shadow: none; background: transparent; padding: 1.5rem 1rem; }
.rp-processing__box p { margin: 0; line-height: 1.55; color: #3a3a3a; }
.rp-processing__text { font-weight: 700; }

.rp-processing__spinner { width: 48px; height: 48px; border-radius: 50%; border: 4px solid var(--grey-line); border-top-color: var(--brand); animation: rp-spin 0.9s linear infinite; }
@keyframes rp-spin { to { transform: rotate(360deg); } }
@keyframes rp-pop { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: none; } }

/* Finished: tick (sent) or warning (not sent) */
.rp-processing__icon { display: flex; align-items: center; justify-content: center; width: 60px; height: 60px; border-radius: 50%; background: var(--brand); color: var(--white); font-size: 1.5rem; animation: rp-pop 0.3s var(--ease); }
.rp-processing.is-error .rp-processing__icon { background: #3d3d3d; }
.rp-processing__title { margin: 0; font-size: 1.35rem; font-weight: 800; line-height: 1.25; color: #2b2b2b; }
.rp-processing__btn { margin-top: 0.25rem; background: var(--brand); color: var(--white); }
.rp-processing__btn:hover { background: var(--brand-dark); color: var(--white); }
.rp-processing.is-error .rp-processing__btn { background: #3d3d3d; }
.rp-processing.is-error .rp-processing__btn:hover { background: #2b2b2b; }

@media (prefers-reduced-motion: reduce) {
  .rp-processing__box, .rp-processing__icon { animation: none; }
  .rp-processing__spinner { animation-duration: 2s; }
}
