/* The Explore message card (see explore-nudge.js): a dark standalone card at
   the lower right, over everything (side cards included), so it never reads
   as part of the tool. The z-index clears the shared Feedback pill too,
   which sits in the same corner; the card is shown once and closes in one
   click. Its colors follow the tool's theme (data-theme on the root, else
   the system setting). A tool can lift the full-screen placement with
   --fpds-nudge-fs-bottom, for example above its own zoom control. Opened
   from the hub's capture button it takes the top right instead (is-top). */
:root { --fpds-nudge-bg: #1b2030; --fpds-nudge-ink: #f3f4f7; --fpds-nudge-line: transparent; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --fpds-nudge-bg: #283143; --fpds-nudge-ink: #f3f4f7; --fpds-nudge-line: #46536c; }
}
:root[data-theme="dark"] { --fpds-nudge-bg: #283143; --fpds-nudge-ink: #f3f4f7; --fpds-nudge-line: #46536c; }

.fpds-nudge {
  position: fixed; right: 16px; bottom: 16px; z-index: 2147483001;
  width: min(440px, calc(100vw - 32px)); padding: 20px; border-radius: 12px;
  background: var(--fpds-nudge-bg); color: var(--fpds-nudge-ink); border: 1px solid var(--fpds-nudge-line);
  box-shadow: 0 12px 32px rgba(15, 18, 28, .24), 0 1px 2px rgba(15, 18, 28, .12);
  /* Slides in from the screen edge it sits on, eased to a soft stop. */
  opacity: 0; transform: translateX(calc(100% + 24px));
  transition: opacity .35s ease-out, transform .55s cubic-bezier(.22, 1, .36, 1);
}
/* The shared dark-card form, set to the tools' type: a 600 heading on the
   4px grid and 4px-grid gaps. Scoped here so other placements keep theirs. */
.fpds-nudge .fp-newsletter[data-variant=dark-card] h3 { font-size: 16px; line-height: 24px; font-weight: 600; letter-spacing: 0; }
.fpds-nudge .fp-newsletter[data-variant=dark-card] .fp-newsletter-description { margin-top: 4px; font-size: 14px; line-height: 20px; }
.fpds-nudge .fp-newsletter[data-variant=dark-card] form { margin-top: 16px; }
/* In full screen the card lives inside the tool's full-screen element and
   takes the lower left, since an open side panel holds the right. */
.fpds-nudge.is-fs { right: auto; left: 16px; bottom: var(--fpds-nudge-fs-bottom, 16px); transform: translateX(calc(-100% - 24px)); }
/* Opened from the hub's capture button: the top right of the tool, right
   under the button in the hub's bar, sliding down from the top edge. */
.fpds-nudge.is-top { top: 8px; bottom: auto; transform: translateY(-16px); }
/* Its pointer: a square turned 45 degrees on the top edge, at the button's
   centre (--fpds-nudge-caret-x, set by the script), in the card's fill and
   border so it reads as part of the card in both themes. */
.fpds-nudge.has-caret::before {
  content: ""; position: absolute; top: -6px; left: calc(var(--fpds-nudge-caret-x, 50%) - 6px);
  width: 12px; height: 12px; transform: rotate(45deg); border-radius: 2px 0 0 0;
  background: var(--fpds-nudge-bg); border: 1px solid var(--fpds-nudge-line);
  border-right-color: transparent; border-bottom-color: transparent;
}
.fpds-nudge:focus { outline: none; }
.fpds-nudge[hidden] { display: none; }
.fpds-nudge.in { opacity: 1; transform: none; }
.fpds-nudge-close {
  position: absolute; top: 12px; right: 12px; width: 28px; height: 28px; padding: 0;
  display: grid; place-items: center; border: 0; border-radius: 8px;
  background: transparent; color: rgba(243, 244, 247, .72); cursor: pointer;
  transition: color .15s cubic-bezier(.22, 1, .36, 1), background-color .15s cubic-bezier(.22, 1, .36, 1);
}
.fpds-nudge-close svg { width: 16px; height: 16px; }
.fpds-nudge-close:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.fpds-nudge-close:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
/* The tool's optional preview (preview option) sits above the heading,
   clear of the close button. */
.fpds-nudge-preview { margin: 0 36px 16px 0; }
@media (prefers-reduced-motion: reduce) {
  .fpds-nudge, .fpds-nudge-close { transition: none; }
  .fpds-nudge, .fpds-nudge.is-fs, .fpds-nudge.is-top { transform: none; }
}
