/* pillow-advisor.css - mpro-chat assistant + on-page pillow finder. Mobile-first.
   Uses the mattresscenter theme CSS variables with safe fallbacks. F38/honest: presentation only. */
:root { --mpa-gold: var(--gold, #b8893b); --mpa-text: var(--text, #1a1a1a); --mpa-muted: var(--muted, #6b6b6b);
  --mpa-surface: var(--surface, #fff); --mpa-surface2: var(--surface-2, #f5f3ef); --mpa-border: var(--border, #e4e0d8);
  --mpa-radius: var(--radius, 14px); }

/* ---- floating launcher ---- */
/* Bottom-LEFT: the bottom-right corner already holds WhatsApp "Chat", the scroll-top button and the
   Complianz "manage consent" tab. Anchoring the finder launcher left keeps the product CTA in its own
   clear space (the zone the retired #mc-quiz-launcher used) and never overlaps the consent control. */
#mpa-chat-root { position: fixed; left: 16px; right: auto; bottom: 16px; z-index: 99990; font-family: inherit; }
#mpa-launcher { display: inline-flex; align-items: center; gap: 8px; border: 0; cursor: pointer;
  background: var(--mpa-gold); color: #fff; font-weight: 700; font-size: 14px; line-height: 1;
  padding: 14px 18px; border-radius: 999px; box-shadow: 0 8px 24px rgba(0,0,0,.18); transition: transform .15s ease, box-shadow .15s ease; }
#mpa-launcher:hover { transform: translateY(-1px); box-shadow: 0 10px 28px rgba(0,0,0,.24); }
#mpa-launcher:focus-visible { outline: 3px solid var(--mpa-gold); outline-offset: 2px; }
.mpa-launcher__icon { font-size: 18px; }

/* ---- chat panel ---- */
/* CRITICAL: the panel toggles via the HTML `hidden` attribute (JS sets panel.hidden=true/false).
   Because the base rule below sets `display:flex`, it OVERRIDES the UA `[hidden]{display:none}`
   rule (id+attr specificity beats id-only), so the panel must explicitly honor `hidden` here -
   otherwise it renders OPEN on every page load. Do not remove. */
#mpa-panel[hidden] { display: none !important; }
#mpa-panel { position: fixed; left: 16px; right: auto; bottom: 80px; width: min(380px, calc(100vw - 32px));
  max-height: min(78vh, 620px); overflow-y: auto; background: var(--mpa-surface); color: var(--mpa-text);
  border: 1px solid var(--mpa-border); border-radius: var(--mpa-radius); box-shadow: 0 18px 50px rgba(0,0,0,.28);
  display: flex; flex-direction: column; }
.mpa-panel__head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px;
  border-bottom: 1px solid var(--mpa-border); font-weight: 700; }
.mpa-close { background: none; border: 0; font-size: 24px; line-height: 1; cursor: pointer; color: var(--mpa-muted); }
.mpa-panel__body { padding: 16px; }
.mpa-panel__foot { padding: 10px 16px; border-top: 1px solid var(--mpa-border); text-align: center; }
.mpa-panel__foot a { font-size: 12px; color: var(--mpa-muted); text-decoration: underline; }

/* ---- inline finder ---- */
.mpa-finder { background: var(--mpa-surface2); border: 1px solid var(--mpa-border); border-radius: var(--mpa-radius);
  padding: 20px; margin: 24px 0; }
.mpa-finder__title { font-family: var(--font-head, inherit); font-size: 1.3rem; margin: 0 0 6px; }
.mpa-finder__sub { color: var(--mpa-muted); font-size: 13px; margin: 0 0 16px; }

/* ---- question flow ---- */
.mpa-progress { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--mpa-muted); margin-bottom: 8px; }
.mpa-q { font-size: 16px; font-weight: 600; margin: 0 0 14px; }
.mpa-opts { display: grid; gap: 10px; }
.mpa-opt { text-align: left; background: var(--mpa-surface); border: 1px solid var(--mpa-border); color: var(--mpa-text);
  border-radius: 12px; padding: 13px 15px; font-size: 14px; cursor: pointer; transition: border-color .12s ease, background .12s ease; }
.mpa-opt:hover { border-color: var(--mpa-gold); background: var(--mpa-surface2); }
.mpa-opt:focus-visible { outline: 2px solid var(--mpa-gold); outline-offset: 1px; }

/* ---- results ---- */
.mpa-headline { font-size: 14px; color: var(--mpa-muted); margin: 0 0 14px; }
.mpa-cards { display: grid; gap: 14px; }
.mpa-card { border: 1px solid var(--mpa-border); border-radius: 12px; overflow: hidden; background: var(--mpa-surface); }
.mpa-card.is-top { border-color: var(--mpa-gold); box-shadow: 0 0 0 1px var(--mpa-gold) inset; }
.mpa-card__img { width: 100%; height: 130px; object-fit: cover; display: block; }
.mpa-card__body { padding: 14px; }
.mpa-card__head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.mpa-badge { background: var(--mpa-gold); color: #fff; font-size: 10px; font-weight: 700; letter-spacing: .05em;
  text-transform: uppercase; padding: 3px 8px; border-radius: 999px; }
.mpa-card__name { font-weight: 700; font-size: 15px; }
.mpa-card__price { font-family: var(--font-head, inherit); font-size: 1.4rem; margin: 2px 0 10px; }
.mpa-card__reasons { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 6px; }
.mpa-card__reasons li { font-size: 13px; color: var(--mpa-muted); padding-left: 18px; position: relative; line-height: 1.45; }
.mpa-card__reasons li::before { content: "✓"; position: absolute; left: 0; color: var(--mpa-gold); font-weight: 700; }
.mpa-card__cta { display: flex; gap: 8px; }
.mpa-btn { flex: 1; text-align: center; text-decoration: none; font-size: 13px; font-weight: 600; padding: 11px 12px;
  border-radius: 10px; cursor: pointer; border: 1px solid var(--mpa-gold); }
.mpa-btn--ghost { background: transparent; color: var(--mpa-text); }
.mpa-btn--solid { background: var(--mpa-gold); color: #fff; }
.mpa-btn:hover { opacity: .92; }
.mpa-restart { margin-top: 14px; background: none; border: 0; color: var(--mpa-muted); font-size: 13px; text-decoration: underline; cursor: pointer; }
.mpa-empty { color: var(--mpa-muted); font-size: 14px; }

@media (max-width: 480px) {
  #mpa-launcher .mpa-launcher__txt { display: none; }
  #mpa-launcher { padding: 14px; }
  #mpa-panel { right: 10px; left: 10px; width: auto; bottom: 76px; }
}

/* ---- expert-advisor: honest expectations + think-ahead (return-preventing) ---- */
.mpa-card__line { font-size: 13px; margin: 8px 0 0; color: var(--mpa-text); line-height: 1.45; }
.mpa-card__not, .mpa-card__not strong { color: #8a5a00; }
/* Honest fit caveat: calm/trustworthy slate (a heads-up, NOT an amber warning) - return-preventer. */
.mpa-card__caveat, .mpa-card__caveat strong { color: #3f5d6c; }
.mpa-card__expect { font-size: 12.5px; margin: 8px 0 0; color: var(--mpa-muted); line-height: 1.5; }
.mpa-warm-note { font-size: 13px; background: var(--mpa-surface2); border: 1px solid var(--mpa-border); border-radius: 10px; padding: 10px 12px; margin: 0 0 14px; color: var(--mpa-text); line-height: 1.5; }
.mpa-thinkahead { margin: 18px 0 4px; border-top: 1px solid var(--mpa-border); padding-top: 14px; }
.mpa-thinkahead__title { font-weight: 700; font-size: 13px; margin: 0 0 8px; color: var(--mpa-text); }
.mpa-thinkahead ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.mpa-thinkahead li { font-size: 12.5px; color: var(--mpa-muted); line-height: 1.5; padding-left: 16px; position: relative; }
.mpa-thinkahead li::before { content: "\2192"; position: absolute; left: 0; color: var(--mpa-gold); }
.mpa-unsure { margin: 16px 0 4px; background: var(--mpa-surface2); border: 1px solid var(--mpa-border); border-radius: var(--mpa-radius); padding: 14px 16px; }
.mpa-unsure__title { font-weight: 700; font-size: 14px; margin: 0 0 6px; color: var(--mpa-text); }
.mpa-unsure p { font-size: 13px; color: var(--mpa-muted); margin: 0 0 10px; line-height: 1.5; }
.mpa-unsure .mpa-btn { display: inline-block; flex: none; text-decoration: none; }
