/* ============================================================================
   T643: the coupon pop-up on the blood panel pages (app/js/panel-popup.js), for a visitor who is not signed in.
   The standard's tokens only (design-system/css/tokens.css), the 8 px grid, nothing moves on hover (a colour changes,
   never a size or a place), every control 44 px under a finger. A card in the middle at a desk; a sheet from the
   bottom on a phone, as wide as the screen, never wider.
   ========================================================================== */
.pc-scrim { position: fixed; inset: 0; z-index: 120; display: flex; align-items: center; justify-content: center;
  padding: var(--cx-s-4); background: rgba(20, 48, 47, .5); }
.pc-card { position: relative; box-sizing: border-box; width: 100%; max-width: 480px; max-height: calc(100vh - 32px); overflow: auto;
  padding: var(--cx-s-6) var(--cx-s-5) var(--cx-s-5); background: var(--cx-surface); border-radius: var(--cx-r);
  box-shadow: 0 22px 60px rgba(20, 48, 47, .16), 0 6px 18px rgba(20, 48, 47, .08); color: var(--cx-ink); font-family: var(--font); }
.pc-x { position: absolute; top: var(--cx-s-2); right: var(--cx-s-2); display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; padding: 0; border: 0; border-radius: var(--cx-r-pill); background: transparent; color: var(--cx-ink-2);
  cursor: pointer; transition: background .14s ease, color .14s ease; }
.pc-x:hover { background: var(--cx-raised); color: var(--cx-ink); }
.pc-x:focus-visible { outline: 2px solid var(--cx-primary); outline-offset: 2px; }
.pc-x svg { width: 20px; height: 20px; }
.pc-kicker { display: inline-block; margin: 0 0 var(--cx-s-2); padding: 4px 12px; border-radius: var(--cx-r-pill);
  background: var(--cx-primary-wash); color: var(--cx-primary); font-size: var(--cx-t-label); font-weight: var(--cx-w-label);
  letter-spacing: var(--cx-ls-label); text-transform: uppercase; line-height: 16px; }
.pc-h { margin: 0 0 var(--cx-s-2); padding-right: var(--cx-s-6); font-size: 22px; font-weight: 600; line-height: 1.25; color: var(--cx-ink); }
.pc-h:focus { outline: none; }
.pc-p { margin: 0 0 var(--cx-s-4); color: var(--cx-ink-2); font-size: var(--cx-t-body); line-height: var(--cx-lh-body); }
.pc-form { display: grid; gap: var(--cx-s-3); grid-template-columns: minmax(0, 1fr); }
.pc-field { display: grid; gap: 4px; min-width: 0; }
.pc-field label { font-size: var(--cx-t-small); font-weight: 600; color: var(--cx-ink); }
.pc-field input { box-sizing: border-box; width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid var(--cx-edge);
  border-radius: var(--cx-r-sm); background: var(--cx-surface); color: var(--cx-ink); font-family: inherit; font-size: 16px; line-height: 1.4; }
.pc-field input:focus { outline: 2px solid var(--cx-primary); outline-offset: 1px; border-color: var(--cx-primary); }
.pc-field input[aria-invalid="true"] { border-color: var(--cx-danger); }
.pc-consent { display: flex; gap: var(--cx-s-2); align-items: flex-start; margin: 0; min-height: 44px; color: var(--cx-ink-2);
  font-size: var(--cx-t-small); line-height: var(--cx-lh-small); cursor: pointer; }
.pc-consent input { flex: none; width: 20px; height: 20px; margin: 2px 0 0; }
.pc-consent.is-wrong { color: var(--cx-danger); }
.pc-privacy { margin: -8px 0 0 28px; font-size: var(--cx-t-small); }
.pc-privacy a { display: inline-flex; align-items: center; min-height: 32px; color: var(--cx-primary); font-weight: 600; text-decoration: underline; }
.pc-cap:empty { display: none; }
.pc-send { width: 100%; min-height: 48px; font-size: var(--cx-t-body); }
.pc-err { min-height: 20px; margin: 0; color: var(--cx-danger); font-size: var(--cx-t-small); line-height: var(--cx-lh-small); }
.pc-err:empty { min-height: 0; }
.pc-done { display: grid; gap: var(--cx-s-2); justify-items: start; }
/* a step the pop-up is not on is not drawn: a class that sets display would otherwise beat the hidden attribute */
.pc-scrim [hidden] { display: none !important; }
.pc-done__mark { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; margin-bottom: var(--cx-s-2);
  border-radius: 50%; background: var(--cx-ok-wash); color: var(--cx-ok); }
.pc-done__mark svg { width: 24px; height: 24px; }
.pc-done .pc-p { margin-bottom: var(--cx-s-2); }
.pc-done .cx-btn { width: 100%; min-height: 48px; font-size: var(--cx-t-body); }
html.pc-open, html.pc-open body { overflow: hidden; }

@media (max-width: 560px) {
  .pc-scrim { align-items: flex-end; padding: 0; }
  .pc-card { max-width: none; max-height: calc(100vh - 24px); padding: var(--cx-s-5) var(--cx-s-4) var(--cx-s-4);
    border-radius: var(--cx-r) var(--cx-r) 0 0; padding-bottom: calc(var(--cx-s-4) + env(safe-area-inset-bottom, 0px)); }
  .pc-h { font-size: 20px; }
  .pc-privacy { margin-top: -4px; }
  .pc-privacy a { min-height: 44px; }
}
@media (prefers-reduced-motion: no-preference) {
  .pc-scrim { animation: pc-fade .2s ease-out; }
}
@keyframes pc-fade { from { opacity: 0; } to { opacity: 1; } }
