/* PGX Chatbot Widget
 *
 * Design ref: ~/Downloads/design_handoff_pgx_chatbot/README.md
 *
 * Self-contained styles — namespace prefix `pgxc-` to avoid clashes with
 * the landing page. Inherits the brand tokens already set on :root by
 * the landing page (--cream, --aubergine, --pink, etc.); falls back to
 * literal hex values when used outside the landing page context.
 */

:root {
  --pgxc-cream: var(--cream, #fef0e8);
  --pgxc-aubergine: var(--aubergine, #2d1f2a);
  --pgxc-pink: var(--pink, #ff5577);
  --pgxc-pink-soft: var(--pink-soft, #ff9bb2);
  --pgxc-petal: var(--petal, #ffd4d8);
  --pgxc-mint: var(--mint, #b8e3cc);
  --pgxc-sky: var(--sky, #c8d8e8);
  --pgxc-buttercream: var(--buttercream, #fae8d0);
  --pgxc-fg-muted: rgba(45, 31, 42, 0.6);
  --pgxc-fg-faint: rgba(45, 31, 42, 0.5);
  --pgxc-fg-subtle: rgba(45, 31, 42, 0.08);
  --pgxc-divider: rgba(45, 31, 42, 0.08);
  --pgxc-card-bg: #ffffff;

  --pgxc-f-display: "Anton", "Impact", sans-serif;
  --pgxc-f-body: "Manrope", "Helvetica Neue", sans-serif;
  --pgxc-f-ui: "Archivo", "Helvetica Neue", sans-serif;
  --pgxc-f-mono: "Geist Mono", "JetBrains Mono", monospace;

  --pgxc-ease: cubic-bezier(0.2, 0, 0, 1);
}

/* ─── Launcher (pill) ──────────────────────────────────────────────── */

.pgxc-launcher {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9998;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px 12px 12px;
  background: var(--pgxc-aubergine);
  border: none;
  border-radius: 100px;
  cursor: pointer;
  box-shadow: 0 8px 28px rgba(45, 31, 42, 0.18);
  transition: transform 180ms var(--pgxc-ease), box-shadow 180ms var(--pgxc-ease);
  font-family: var(--pgxc-f-display);
  color: var(--pgxc-cream);
}
.pgxc-launcher:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(45, 31, 42, 0.25);
}
.pgxc-launcher:focus-visible {
  outline: 2px solid var(--pgxc-pink);
  outline-offset: 4px;
}
.pgxc-launcher-mark {
  position: relative;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 50%;
}
.pgxc-launcher-mark svg {
  width: 100%;
  height: 100%;
  display: block;
}
.pgxc-launcher-dot {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 10px;
  height: 10px;
  background: var(--pgxc-pink);
  border: 2px solid var(--pgxc-cream);
  border-radius: 50%;
}
.pgxc-launcher-label {
  font-size: 18px;
  line-height: 1;
  letter-spacing: 0.02em;
  padding-right: 4px;
}
.pgxc-launcher-label .x { color: var(--pgxc-pink); }
.pgxc-launcher-label .dot { color: var(--pgxc-pink); }

.pgxc-launcher.pgxc-hide {
  display: none;
}

@media (max-width: 768px) {
  .pgxc-launcher {
    bottom: 16px;
    right: 16px;
    padding: 10px 16px 10px 10px;
  }
  .pgxc-launcher-label {
    font-size: 16px;
  }
}

/* ─── Panel ────────────────────────────────────────────────────────── */

.pgxc-panel {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 392px;
  height: 600px;
  max-height: calc(100vh - 48px);
  z-index: 9999;
  background: var(--pgxc-cream);
  border: 1.5px solid var(--pgxc-aubergine);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(45, 31, 42, 0.25);
  font-family: var(--pgxc-f-body);
  color: var(--pgxc-aubergine);
  transform: translateY(20px);
  opacity: 0;
  transition: transform 300ms var(--pgxc-ease), opacity 300ms var(--pgxc-ease);
  pointer-events: none;
}
.pgxc-panel.pgxc-open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

@media (max-width: 768px) {
  .pgxc-panel {
    bottom: 0;
    right: 0;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
    border: none;
  }
}

/* ─── Header ──────────────────────────────────────────────────────── */

.pgxc-header {
  background: var(--pgxc-aubergine);
  color: var(--pgxc-cream);
  padding: 14px 18px 12px;
  flex-shrink: 0;
}
.pgxc-header-meta {
  display: flex;
  justify-content: space-between;
  font-family: var(--pgxc-f-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.65;
  margin-bottom: 12px;
}
.pgxc-header-meta .pgxc-status-dot {
  color: var(--pgxc-pink);
  margin-right: 4px;
}
.pgxc-header-body {
  display: flex;
  align-items: center;
  gap: 12px;
}
.pgxc-header-avatar {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}
.pgxc-header-avatar svg { width: 100%; height: 100%; display: block; }
.pgxc-header-text { flex: 1; min-width: 0; }
.pgxc-header-brand {
  font-family: var(--pgxc-f-display);
  font-size: 22px;
  line-height: 1;
  letter-spacing: 0.01em;
  margin-bottom: 4px;
}
.pgxc-header-brand .x { color: var(--pgxc-pink); }
.pgxc-header-sub {
  font-family: var(--pgxc-f-ui);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.6;
}
.pgxc-close {
  background: none;
  border: none;
  color: var(--pgxc-cream);
  font-size: 24px;
  cursor: pointer;
  padding: 4px 8px;
  opacity: 0.65;
  transition: opacity 150ms var(--pgxc-ease);
  font-family: var(--pgxc-f-display);
}
.pgxc-close:hover { opacity: 1; }
.pgxc-close:focus-visible { outline: 1px solid var(--pgxc-pink); outline-offset: 2px; }

/* ─── Body container ──────────────────────────────────────────────── */

.pgxc-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 24px 28px 20px;
  scrollbar-width: thin;
  scrollbar-color: var(--pgxc-fg-faint) transparent;
  position: relative;
}
.pgxc-body::-webkit-scrollbar { width: 6px; }
.pgxc-body::-webkit-scrollbar-thumb { background: var(--pgxc-fg-faint); border-radius: 3px; }

@media (max-width: 768px) {
  .pgxc-body { padding: 24px 22px 16px; }
}

/* ─── Boot screen (Aperture Bloom) ────────────────────────────────── */

.pgxc-boot {
  position: absolute;
  inset: 0;
  margin-top: 84px; /* below header */
  background: linear-gradient(160deg, var(--pgxc-cream) 0%, var(--pgxc-petal) 55%, var(--pgxc-sky) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  transition: opacity 300ms var(--pgxc-ease);
}
.pgxc-boot.pgxc-fade-out { opacity: 0; pointer-events: none; }

.pgxc-bloom { width: 120px; height: 120px; }
.pgxc-bloom svg { width: 100%; height: 100%; display: block; overflow: visible; }
.pgxc-bloom-dots { display: flex; gap: 10px; }
.pgxc-bloom-dot { width: 12px; height: 12px; transform-origin: 50% 50%; }
.pgxc-bloom-dot svg { width: 100%; height: 100%; display: block; }

.pgxc-boot-headline {
  font-family: var(--pgxc-f-display);
  font-size: 40px;
  line-height: 0.9;
  letter-spacing: 0.01em;
  margin: 4px 0 0;
}
.pgxc-boot-headline .dot { color: var(--pgxc-pink); }
.pgxc-boot-meta {
  font-family: var(--pgxc-f-mono);
  font-size: 10px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--pgxc-fg-muted);
}
.pgxc-boot-meta .pgxc-pink { color: var(--pgxc-pink); opacity: 1; }

/* ─── Welcome screen ──────────────────────────────────────────────── */

.pgxc-welcome { padding-bottom: 8px; }

.pgxc-welcome-eyebrow {
  font-family: var(--pgxc-f-ui);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.55;
  margin-bottom: 12px;
}
.pgxc-welcome-headline {
  font-family: var(--pgxc-f-display);
  font-size: 64px;
  line-height: 0.86;
  letter-spacing: 0.01em;
  margin: 0 0 16px;
  text-transform: uppercase;
}
.pgxc-welcome-headline .pgxc-pink { color: var(--pgxc-pink); }
.pgxc-welcome-copy {
  font-size: 14.5px;
  line-height: 1.45;
  margin: 0 0 22px;
  max-width: 92%;
}
.pgxc-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.pgxc-welcome-anchor {
  margin: 28px 0 4px;
  font-family: "Caveat", cursive;
  font-size: 17px;
  line-height: 1.35;
  text-align: center;
  color: var(--pgxc-aubergine);
  opacity: 0.7;
  letter-spacing: 0.01em;
}
.pgxc-welcome-anchor .pgxc-pink {
  color: var(--pgxc-pink);
  opacity: 1;
}
.pgxc-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: transparent;
  color: var(--pgxc-aubergine);
  border: 1.5px solid var(--pgxc-aubergine);
  border-radius: 100px;
  font-family: var(--pgxc-f-ui);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 150ms var(--pgxc-ease), color 150ms var(--pgxc-ease);
  white-space: nowrap;
}
.pgxc-pill:hover {
  background: var(--pgxc-aubergine);
  color: var(--pgxc-cream);
}
.pgxc-pill:focus-visible {
  outline: 2px solid var(--pgxc-pink);
  outline-offset: 2px;
}

@media (max-width: 768px) {
  .pgxc-welcome-headline { font-size: 56px; }
}

/* ─── Conversation ────────────────────────────────────────────────── */

.pgxc-conversation { display: flex; flex-direction: column; gap: 14px; }

.pgxc-msg-row {
  display: flex;
  gap: 8px;
  max-width: 100%;
}
.pgxc-msg-row.pgxc-user { justify-content: flex-end; }
.pgxc-msg-avatar {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  margin-top: 2px;
}
.pgxc-msg-avatar svg { width: 100%; height: 100%; display: block; }

.pgxc-bubble {
  max-width: 80%;
  padding: 12px 14px;
  font-size: 14.5px;
  line-height: 1.5;
  border-radius: 18px;
  word-wrap: break-word;
  /* Preserve newlines from the bot's streamed output so multi-line
     answers (lists, paragraphs) render with visible structure. */
  white-space: pre-wrap;
}
.pgxc-bubble strong {
  font-weight: 700;
}
.pgxc-bubble-bot {
  background: var(--pgxc-card-bg);
  border: 1.5px solid var(--pgxc-aubergine);
  border-bottom-left-radius: 4px;
}
.pgxc-bubble-user {
  background: var(--pgxc-aubergine);
  color: var(--pgxc-cream);
  border-bottom-right-radius: 4px;
}
.pgxc-bubble-thinking {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
}
.pgxc-bubble-thinking .pgxc-thinking-bloom {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}
.pgxc-bubble-thinking .pgxc-thinking-text {
  font-family: var(--pgxc-f-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--pgxc-fg-muted);
}
.pgxc-bubble-thinking .pgxc-thinking-text .pgxc-pink { color: var(--pgxc-pink); }

.pgxc-bubble a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.pgxc-bubble a:hover { color: var(--pgxc-pink); }
.pgxc-bubble-bot strong { font-weight: 700; }

/* Inline card — structured visual element rendered directly inside a
 * bot bubble. Used for shipping (truck icon + region/time pairs). No
 * click target; the card IS the answer. */
.pgxc-card {
  margin: 8px 0 2px;
  padding: 14px 16px;
  background: var(--pgxc-cream);
  border: 1.5px solid var(--pgxc-aubergine);
  border-radius: 14px;
}
.pgxc-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--pgxc-divider);
}
.pgxc-card-icon {
  width: 32px;
  height: 24px;
  color: var(--pgxc-aubergine);
  flex-shrink: 0;
}
.pgxc-card-label {
  font-family: var(--pgxc-f-display);
  font-size: 16px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--pgxc-aubergine);
  line-height: 1;
}
.pgxc-card-body {
  display: flex;
  flex-direction: column;
}
.pgxc-card-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid var(--pgxc-divider);
}
.pgxc-card-row:last-child { border-bottom: none; padding-bottom: 0; }
.pgxc-card-row:first-child { padding-top: 0; }
.pgxc-card-region {
  font-family: var(--pgxc-f-body);
  font-size: 13.5px;
  color: var(--pgxc-aubergine);
}
.pgxc-card-time {
  font-family: var(--pgxc-f-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--pgxc-aubergine);
  white-space: nowrap;
}

/* How-it-works card — Polaroid Scrapbook layout (per spec 2026-05-12).
 *
 * Alternating-left-right rhythm of 3 polaroids with Caveat captions,
 * Anton numeral + uppercase title as one typographic atom, mint washi-tape
 * accents, paper-grain BG, dashed-divider closer with handwritten tagline
 * "see. scan. spark." Tap a polaroid → opens .pgxc-hw-lightbox inside
 * .pgxc-body (panel-scoped, not page-scoped).
 *
 * The card breaks out of the standard bot-bubble framing — the bubble
 * becomes a transparent full-width container so the card has room.
 */
/* Layout overrides driven by the .pgxc-row-fullwidth / .pgxc-bubble-fullwidth
 * classes that JS adds when a wide card (e.g. how-it-works) is rendered. */
.pgxc-row-fullwidth { align-items: stretch; }
.pgxc-row-fullwidth .pgxc-msg-avatar { display: none; }
.pgxc-bubble-fullwidth {
  max-width: 100% !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  white-space: normal !important;
}

.pgxc-card-howitworks {
  margin: 4px 0 2px;
  padding: 22px 20px 24px;
  white-space: normal;
  background:
    radial-gradient(120% 70% at 50% 0%, var(--pgxc-buttercream), transparent 50%),
    var(--pgxc-cream);
  border-radius: 16px;
  position: relative;
  overflow: hidden;
}
.pgxc-card-howitworks::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(45, 31, 42, 0.018) 0.5px, transparent 1px),
    radial-gradient(circle at 70% 60%, rgba(45, 31, 42, 0.018) 0.5px, transparent 1px);
  background-size: 7px 9px, 11px 13px;
  pointer-events: none;
  opacity: 0.5;
}
.pgxc-card-howitworks > * { position: relative; z-index: 1; }
.pgxc-card-howitworks.pgxc-hw-dimmed {
  filter: brightness(0.5) saturate(0.8);
  transition: filter 250ms var(--pgxc-ease);
}

.pgxc-hw-eyebrow {
  font-family: var(--pgxc-f-ui);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--pgxc-fg-muted);
  margin-bottom: 8px;
}

.pgxc-hw-headline {
  font-family: var(--pgxc-f-display);
  font-weight: 400;
  font-size: 38px;
  line-height: 0.88;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--pgxc-aubergine);
  margin: 0 0 6px;
}
.pgxc-hw-headline .pgxc-hw-pink { color: var(--pgxc-pink); }

.pgxc-hw-scribble {
  font-family: "Caveat", cursive;
  font-weight: 600;
  font-size: 20px;
  color: var(--pgxc-pink);
  margin: 0 0 24px;
  display: inline-block;
  transform: rotate(-2deg);
}

.pgxc-hw-steps { display: block; }
.pgxc-hw-step {
  display: grid;
  grid-template-columns: 158px 1fr;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 26px;
}
.pgxc-hw-step:nth-of-type(even) { grid-template-columns: 1fr 158px; }
.pgxc-hw-step:nth-of-type(even) .pgxc-hw-polaroid { order: 2; }
.pgxc-hw-step:nth-of-type(even) .pgxc-hw-copy { order: 1; text-align: right; }
.pgxc-hw-step:nth-of-type(even) .pgxc-hw-stepnum-row { justify-content: flex-end; }

.pgxc-hw-polaroid {
  background: #fff;
  padding: 8px 8px 34px;
  border: none;
  box-shadow:
    0 1px 0 rgba(45, 31, 42, 0.1),
    0 10px 24px -10px rgba(45, 31, 42, 0.4);
  position: relative;
  cursor: zoom-in;
  width: 158px;
  font: inherit;
  color: inherit;
  display: block;
  text-align: center;
  transition: transform 180ms var(--pgxc-ease);
}
.pgxc-hw-step:nth-of-type(1) .pgxc-hw-polaroid { transform: rotate(-4deg); }
.pgxc-hw-step:nth-of-type(2) .pgxc-hw-polaroid { transform: rotate(3deg); }
.pgxc-hw-step:nth-of-type(3) .pgxc-hw-polaroid { transform: rotate(-2deg); }
@media (hover: hover) {
  .pgxc-hw-polaroid:hover { transform: rotate(0deg) scale(1.04); }
}
.pgxc-hw-polaroid:focus-visible {
  outline: 2px solid var(--pgxc-pink);
  outline-offset: 4px;
}

.pgxc-hw-tape {
  position: absolute;
  top: -8px;
  width: 40px;
  height: 14px;
  background: rgba(184, 227, 204, 0.78);
  box-shadow: 0 1px 2px rgba(45, 31, 42, 0.1);
}
.pgxc-hw-tape-left  { left: -6px;  transform: rotate(-8deg); }
.pgxc-hw-tape-right { right: -6px; transform: rotate(7deg); }

.pgxc-hw-polaroid .pgxc-hw-img {
  display: block;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--pgxc-petal);
}
.pgxc-hw-polaroid .pgxc-hw-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pgxc-hw-polaroid .pgxc-hw-cap {
  position: absolute;
  bottom: 7px;
  left: 0;
  right: 0;
  text-align: center;
  font-family: "Caveat", cursive;
  font-weight: 600;
  font-size: 18px;
  color: var(--pgxc-aubergine);
  line-height: 1;
}

.pgxc-hw-copy { padding-top: 6px; min-width: 0; }
.pgxc-hw-stepnum-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 4px;
}
.pgxc-hw-stepnum {
  font-family: var(--pgxc-f-display);
  font-weight: 400;
  font-size: 44px;
  line-height: 0.85;
  color: var(--pgxc-pink);
}
.pgxc-hw-step-title {
  font-family: var(--pgxc-f-display);
  font-weight: 400;
  font-size: 22px;
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--pgxc-aubergine);
}
.pgxc-hw-body {
  font-family: var(--pgxc-f-body);
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--pgxc-aubergine);
}

.pgxc-hw-closer {
  margin-top: 4px;
  padding-top: 18px;
  border-top: 1px dashed rgba(45, 31, 42, 0.18);
  text-align: center;
  font-family: "Caveat", cursive;
  font-weight: 600;
  font-size: 24px;
  color: var(--pgxc-pink);
  line-height: 1;
  transform: rotate(-1deg);
}

@media (prefers-reduced-motion: reduce) {
  .pgxc-card-howitworks.pgxc-hw-dimmed { transition: none; }
  .pgxc-hw-polaroid { transition: none; }
}

/* Action chip — visible call-to-action inside a bot bubble, e.g.
 * „Größentabelle ansehen →". Clickable, triggers a modal. */
.pgxc-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 0;
  padding: 8px 14px 8px 14px;
  background: var(--pgxc-aubergine);
  color: var(--pgxc-cream);
  border: none;
  border-radius: 100px;
  font-family: var(--pgxc-f-ui);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 150ms var(--pgxc-ease), box-shadow 150ms var(--pgxc-ease);
}
.pgxc-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(45, 31, 42, 0.18);
}
.pgxc-action-arrow {
  color: var(--pgxc-pink);
  font-weight: 700;
}

/* Modal — overlays the whole viewport with a backdrop. Used for
 * size-chart and other richer-than-text responses the bot can request. */
.pgxc-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(45, 31, 42, 0.45);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  transition: opacity 220ms var(--pgxc-ease);
}
.pgxc-modal-backdrop.pgxc-modal-in {
  opacity: 1;
}
.pgxc-modal {
  background: var(--pgxc-cream);
  border: 1.5px solid var(--pgxc-aubergine);
  border-radius: 16px;
  width: 100%;
  max-width: 560px;
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(45, 31, 42, 0.35);
  transform: translateY(12px);
  transition: transform 220ms var(--pgxc-ease);
}
.pgxc-modal-backdrop.pgxc-modal-in .pgxc-modal {
  transform: translateY(0);
}
.pgxc-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 20px 14px;
  border-bottom: 1px solid var(--pgxc-divider);
}
.pgxc-modal-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}
.pgxc-modal-mark {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  display: block;
}
.pgxc-modal-mark svg { width: 100%; height: 100%; display: block; }
.pgxc-modal-wordmark {
  font-family: var(--pgxc-f-display);
  font-size: 22px;
  line-height: 1;
  letter-spacing: 0.01em;
  color: var(--pgxc-aubergine);
}
.pgxc-modal-wordmark .x { color: var(--pgxc-pink); }
.pgxc-modal-sep {
  color: var(--pgxc-pink);
  font-size: 18px;
  line-height: 1;
  opacity: 0.85;
}
.pgxc-modal-title {
  margin: 0;
  font-family: var(--pgxc-f-display);
  font-size: 22px;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  line-height: 1;
  color: var(--pgxc-aubergine);
}

@media (max-width: 540px) {
  .pgxc-modal-title { font-size: 20px; }
  .pgxc-modal-wordmark { font-size: 20px; }
}
.pgxc-modal-close {
  background: none;
  border: none;
  font-family: var(--pgxc-f-display);
  font-size: 28px;
  line-height: 1;
  color: var(--pgxc-aubergine);
  cursor: pointer;
  padding: 0 4px;
  opacity: 0.65;
  transition: opacity 150ms var(--pgxc-ease);
}
.pgxc-modal-close:hover { opacity: 1; }

.pgxc-modal-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--pgxc-divider);
  background: var(--pgxc-cream);
}
.pgxc-st-tab {
  flex: 1;
  padding: 12px 16px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  font-family: var(--pgxc-f-ui);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--pgxc-fg-muted);
  cursor: pointer;
  transition: color 150ms var(--pgxc-ease), border-color 150ms var(--pgxc-ease);
}
.pgxc-st-tab-active {
  color: var(--pgxc-aubergine);
  border-bottom-color: var(--pgxc-pink);
}
.pgxc-st-tab:hover { color: var(--pgxc-aubergine); }

.pgxc-modal-body {
  padding: 20px 24px 26px;
  overflow-y: auto;
}
.pgxc-st-title {
  font-family: var(--pgxc-f-display);
  font-size: 18px;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.pgxc-st-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 14px;
}
.pgxc-st-table th,
.pgxc-st-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--pgxc-divider);
  font-size: 14px;
}
.pgxc-st-table th {
  font-family: var(--pgxc-f-ui);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--pgxc-fg-muted);
  background: rgba(45, 31, 42, 0.03);
}
.pgxc-st-table .pgxc-tab-k {
  font-weight: 700;
  font-family: var(--pgxc-f-ui);
  letter-spacing: 0.04em;
}
.pgxc-st-note {
  font-family: var(--pgxc-f-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--pgxc-fg-muted);
  line-height: 1.5;
}

@media (max-width: 540px) {
  .pgxc-modal-backdrop { padding: 0; }
  .pgxc-modal {
    border-radius: 0;
    border: none;
    max-width: 100%;
    max-height: 100vh;
    height: 100vh;
    height: 100dvh;
  }
}

/* Bot bubble keeps a tiny eyebrow at the top of the first message */
.pgxc-bubble-bot .pgxc-bubble-eyebrow {
  display: block;
  font-family: var(--pgxc-f-display);
  font-size: 13px;
  letter-spacing: 0.01em;
  margin-bottom: 4px;
  text-transform: uppercase;
}
.pgxc-bubble-bot .pgxc-bubble-eyebrow .pgxc-pink { color: var(--pgxc-pink); }

/* ─── Composer ───────────────────────────────────────────────────── */

.pgxc-composer-wrap {
  flex-shrink: 0;
  border-top: 1px solid var(--pgxc-divider);
  padding: 12px 18px 8px;
  background: var(--pgxc-cream);
}
.pgxc-composer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 8px 8px 16px;
  background: white;
  border: 1.5px solid var(--pgxc-aubergine);
  border-radius: 100px;
  transition: border-color 150ms var(--pgxc-ease);
}
.pgxc-composer:focus-within {
  border-color: var(--pgxc-pink);
}
.pgxc-composer-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--pgxc-f-body);
  font-size: 14.5px;
  color: var(--pgxc-aubergine);
  padding: 6px 0;
}
.pgxc-composer-input::placeholder {
  color: var(--pgxc-fg-muted);
  font-family: var(--pgxc-f-ui);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.pgxc-send {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--pgxc-pink);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 150ms var(--pgxc-ease), opacity 150ms var(--pgxc-ease);
}
.pgxc-send:hover { transform: scale(1.05); }
.pgxc-send:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.pgxc-send:disabled:hover { transform: none; }
.pgxc-send svg { width: 16px; height: 16px; }

.pgxc-footer {
  margin-top: 8px;
  text-align: center;
  font-family: var(--pgxc-f-mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.5;
  user-select: none;
}

@media (prefers-reduced-motion: reduce) {
  .pgxc-panel,
  .pgxc-launcher,
  .pgxc-send {
    transition: none;
  }
}

/* ─── How-it-works lightbox ───────────────────────────────────────── */

.pgxc-hw-lightbox {
  position: absolute;
  inset: 0;
  background: rgba(45, 31, 42, 0.82);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms var(--pgxc-ease);
  z-index: 5;
}
.pgxc-hw-lightbox.pgxc-hw-lb-in {
  opacity: 1;
  pointer-events: auto;
}

.pgxc-hw-lb-counter {
  position: absolute;
  top: 22px;
  left: 22px;
  font-family: var(--pgxc-f-ui);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--pgxc-cream);
  z-index: 3;
}
.pgxc-hw-lb-counter .pgxc-hw-pink { color: var(--pgxc-pink); }

.pgxc-hw-lb-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--pgxc-cream);
  color: var(--pgxc-aubergine);
  border: none;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  padding: 0;
}
.pgxc-hw-lb-close:focus-visible {
  outline: 2px solid var(--pgxc-pink);
  outline-offset: 3px;
}

.pgxc-hw-lb-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(254, 240, 232, 0.92);
  color: var(--pgxc-aubergine);
  border: none;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.pgxc-hw-lb-arrow:hover { background: var(--pgxc-cream); }
.pgxc-hw-lb-arrow:focus-visible {
  outline: 2px solid var(--pgxc-pink);
  outline-offset: 3px;
}
.pgxc-hw-lb-prev { left: 12px; }
.pgxc-hw-lb-next { right: 12px; }

.pgxc-hw-lb-polaroid {
  background: #fff;
  padding: 14px 14px 56px;
  box-shadow: 0 30px 60px -16px rgba(0, 0, 0, 0.6);
  transform: rotate(2deg);
  max-width: 290px;
  width: 86%;
  position: relative;
  transition: transform 250ms var(--pgxc-ease);
}
.pgxc-hw-lb-polaroid .pgxc-hw-img {
  display: block;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--pgxc-petal);
}
.pgxc-hw-lb-polaroid .pgxc-hw-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pgxc-hw-lb-polaroid .pgxc-hw-cap {
  position: absolute;
  bottom: 14px;
  left: 0;
  right: 0;
  text-align: center;
  font-family: "Caveat", cursive;
  font-weight: 600;
  font-size: 26px;
  color: var(--pgxc-aubergine);
  line-height: 1;
}

@media (prefers-reduced-motion: reduce) {
  .pgxc-hw-lightbox { transition: none; }
  .pgxc-hw-lb-polaroid { transition: none; }
}
