/* "Before you pay" consent pop-up (#2202, #2323).
   Colours come from the website's --rp-* tokens (includes/policy-theme.php),
   the same ones the Refund Policy page uses. */

.pc-modal {
  --rp-brand: #1F4E8C;
  --rp-on-brand: #fff;
  --rp-brand-ink: #1F4E8C;
  --rp-ink: #14213D;
  --rp-text: #3B4658;
  --rp-muted: #5B6575;
  --rp-line: #DCE1EA;
  --rp-soft: #EEF3FA;
  --rp-tint: #C9D8EE;
  --rp-font-head: inherit;
}

.pc-modal .modal-dialog { max-width: 620px; padding: 0 16px; margin-left: auto; margin-right: auto; }

.pc-card {
  border: 0;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 30px 70px -30px rgba(16, 24, 40, .55);
  padding: 36px 36px 32px;
  text-align: left;
}

.pc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.pc-title {
  margin: 0;
  font-family: var(--rp-font-head);
  font-weight: 700;
  font-size: 1.75rem;
  line-height: 1.25;
  color: var(--rp-ink) !important;
}
.pc-close {
  display: inline-grid; place-items: center;
  width: 44px; height: 44px; margin: -8px -10px 0 0;
  border: 0; background: none; border-radius: 10px;
  color: var(--rp-muted); font-size: 1.15rem; line-height: 1;
}
.pc-close:hover { color: var(--rp-ink); background: var(--rp-soft); }

.pc-body { padding: 0; }
.pc-lead { margin: 10px 0 20px; font-size: 1rem; color: var(--rp-muted); }

.pc-option {
  position: relative;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 18px;
  padding: 18px 20px;
  border: 1px solid var(--rp-line);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease;
}
.pc-option:hover { border-color: var(--rp-tint); }
.pc-option:has(.pc-check:checked) { border-color: var(--rp-brand); background: var(--rp-soft); }

/* the real checkbox stays in the tab order, drawn as .pc-box */
.pc-check { position: absolute; opacity: 0; width: 22px; height: 22px; margin: 0; left: 20px; top: 19px; }
.pc-box {
  flex: 0 0 22px; width: 22px; height: 22px; margin-top: 1px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--rp-muted); border-radius: 6px;
  background: #fff; color: var(--rp-on-brand); font-size: .9rem;
}
.pc-box i { opacity: 0; }
.pc-check:checked + .pc-box { background: var(--rp-brand); border-color: var(--rp-brand); }
.pc-check:checked + .pc-box i { opacity: 1; }
.pc-check:focus-visible + .pc-box { outline: 3px solid var(--rp-tint); outline-offset: 2px; }

.pc-text { font-size: 1rem; line-height: 1.55; color: var(--rp-ink); }
.pc-link {
  display: block; margin-top: 4px;
  font-size: .85rem; font-weight: 500;
  color: var(--rp-brand-ink) !important; text-decoration: underline !important;
}
.pc-link:hover { color: var(--rp-ink) !important; }

.pc-record {
  display: flex; gap: 10px; align-items: flex-start;
  margin: 0; padding: 14px 16px;
  border-radius: 12px; background: var(--rp-soft);
  font-size: .85rem; line-height: 1.6; color: var(--rp-muted);
}
.pc-record i { font-size: 1.05rem; color: var(--rp-text); margin-top: -1px; }

.pc-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px 16px; flex-wrap: wrap; margin-top: 24px;
}
.pc-status { margin: 0; font-size: .85rem; color: var(--rp-muted); }
.pc-status.is-ready { color: #157A43; font-weight: 600; }
.pc-actions { display: flex; gap: 12px; }

.pc-btn {
  min-height: 48px; padding: 12px 22px;
  border: 1px solid transparent; border-radius: 12px;
  font-family: var(--rp-font-head); font-weight: 600; font-size: 1rem; line-height: 1.2;
}
.pc-btn--ghost { background: #fff; border-color: var(--rp-line); color: var(--rp-ink); }
.pc-btn--ghost:hover { border-color: var(--rp-muted); }
.pc-btn--pay { background: var(--rp-brand); color: var(--rp-on-brand); }
.pc-btn--pay:hover:not(:disabled) { filter: brightness(1.08); }
.pc-btn--pay:disabled { background: var(--rp-line); color: var(--rp-muted); cursor: not-allowed; }
.pc-btn:focus-visible, .pc-close:focus-visible, .pc-link:focus-visible {
  outline: 3px solid var(--rp-tint); outline-offset: 2px;
}

@media (max-width: 575.98px) {
  .pc-modal .modal-dialog { padding: 0 12px; }
  .pc-card { padding: 24px 20px 20px; }
  .pc-title { font-size: 1.4rem; }
  .pc-option { padding: 16px; }
  .pc-check { left: 16px; top: 17px; }
  .pc-foot { flex-direction: column-reverse; align-items: stretch; }
  .pc-status { text-align: center; }
  .pc-actions { flex-direction: column-reverse; }
  .pc-btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .pc-option { transition: none; }
}

/* shown under the Cloudflare check when the form is sent before it is ticked */
.pc-verify-msg {
  margin: -4px 0 16px; padding: 10px 14px; border-radius: 10px;
  background: #FDECEE; color: #B0161F; font-size: .92rem; font-weight: 500;
}
