/* UPC Donate Popup: shell. Loads on every page and must not depend on the
   site's design tokens (global_css only loads on html_mode pages). */
html.upc-dp-open { overflow: hidden; }
/* The site's accessibility button keeps raising itself to the top layer and covers the Donate button.
   It cannot adjust the form inside the frame, so it steps aside while the popup is open. */
html.upc-dp-open #dvmd_acsb_button { visibility: hidden; }
html.upc-dp-open #snn-accessibility-widget-container { display: none !important; } /* production's widget */
.upc-dp[hidden] { display: none !important; }
.upc-dp { position: fixed; inset: 0; z-index: 2147483000; /* above the third-party accessibility button (z 1000099) */ display: flex; align-items: center; justify-content: center; padding: 24px; }
.upc-dp__backdrop { position: absolute; inset: 0; background: rgba(0, 30, 45, .6); opacity: 0; transition: opacity .2s; }
.upc-dp.is-open .upc-dp__backdrop { opacity: 1; }
.upc-dp__dialog {
  position: relative; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  /* Fixed size: the form scrolls inside the frame instead of the popup growing. */
  width: min(1040px, 100%); height: min(720px, calc(100vh - 48px)); overflow: hidden;
  background: #fff; border-radius: 16px; box-shadow: 0 24px 64px rgba(0, 0, 0, .3);
  opacity: 0; transform: translateY(12px) scale(.98); transition: transform .25s ease, opacity .25s ease;
}
.upc-dp.is-open .upc-dp__dialog { opacity: 1; transform: none; }
.upc-dp.is-settled .upc-dp__dialog, .upc-dp.is-settled .upc-dp__backdrop { transition: none; opacity: 1; transform: none; }
.upc-dp__close {
  position: absolute; top: 10px; right: 12px; z-index: 3; width: 40px; height: 40px;
  border: 0; border-radius: 50%; background: rgba(255, 255, 255, .92); color: #004460;
  font-size: 26px; line-height: 1; cursor: pointer;
}
.upc-dp__close:focus-visible { outline: 3px solid #007299; outline-offset: 2px; }

/* Story: the photo fills the column; the words sit on it. */
.upc-dp__story {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end;
  min-height: 0; overflow: hidden; padding: 24px; background: #004460; color: #fff;
}
.upc-dp__story-img { position: absolute; inset: 0; background-size: cover; background-position: right center; }
.upc-dp__story-img::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(0, 30, 45, 0) 0%, rgba(0, 30, 45, 0) 45%, rgba(0, 30, 45, .82) 75%, rgba(0, 30, 45, .94) 100%);
}
.upc-dp__story-body { position: relative; z-index: 1; }
.upc-dp__story-body { margin-top: auto; text-shadow: 0 1px 12px rgba(0, 0, 0, .35); }
.upc-dp__title { margin: 0 0 8px; color: #fff; font-family: 'Poppins', Helvetica, Arial, sans-serif; font-size: 28px; font-weight: 700; line-height: 1.15; }
.upc-dp__intro { margin: 0 0 12px; font-size: 15px; line-height: 1.5; opacity: .95; }
.upc-dp__stat { margin: 0; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, .25); font-size: 13.5px; font-weight: 600; }

.upc-dp__form { position: relative; display: flex; flex-direction: column; min-height: 0; }
.upc-dp__frame { display: block; flex: 1 1 auto; width: 100%; height: 100%; min-height: 0; border: 0; }
.upc-dp__busy, .upc-dp__fallback { margin: 0; padding: 10px 16px; background: #fff6e8; color: #004460; font-size: 14px; }

@media (max-width: 760px) {
  .upc-dp { padding: 0; align-items: stretch; }
  .upc-dp__dialog { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); width: 100%; height: 100vh; height: 100dvh; border-radius: 0; }
  .upc-dp__story { min-height: 140px; padding: 16px 64px 14px 18px; }
  .upc-dp__intro, .upc-dp__stat { display: none; }
  .upc-dp__title { margin: 0; font-size: 21px; }
}
@media (prefers-reduced-motion: reduce) {
  .upc-dp__dialog, .upc-dp__backdrop { transition: none; }
}
