#product-adviser { --adviser-ink: #18303d; --adviser-blue: #00566a; --adviser-line: #d6e2e6; }
#product-adviser button { font: inherit; cursor: pointer; }
#product-adviser button:disabled { cursor: wait; opacity: .58; }
#product-adviser [hidden] { display: none; }
.adviser-launch {
  position: fixed; z-index: 20; right: max(1rem, env(safe-area-inset-right)); bottom: max(1rem, env(safe-area-inset-bottom));
  min-height: 44px; padding: .7rem 1.05rem; border: 0; border-radius: 1.6rem;
  background: var(--adviser-blue); color: #fff; box-shadow: 0 5px 20px #1026313b;
}
#product-adviser dialog {
  position: fixed; inset: auto 1rem 1rem auto; margin: 0; width: min(29rem, calc(100% - 2rem));
  max-height: min(39rem, calc(100dvh - 2rem)); padding: 1rem; box-sizing: border-box;
  border: 1px solid var(--adviser-line); border-radius: 1.1rem; background: #fff; color: var(--adviser-ink);
}
#product-adviser dialog[open] { display: flex; flex-direction: column; gap: .6rem; }
#product-adviser dialog::backdrop { background: #0e243355; }
#product-adviser header, #product-adviser form, .adviser-actions { display: flex; align-items: center; gap: .55rem; }
#product-adviser header { justify-content: space-between; }
#product-adviser h2 { margin: 0; font-size: 1.2rem; }
#product-adviser dialog button { min-height: 44px; border: 1px solid var(--adviser-line); border-radius: .55rem; padding: .4rem .72rem; background: #eef5f7; color: var(--adviser-ink); }
#product-adviser [data-close] { min-width: 44px; font-size: 1.3rem; }
#product-adviser form button { background: var(--adviser-blue); color: #fff; }
.adviser-help, .adviser-status, .adviser-contact { margin: 0; font-size: .88rem; }
.adviser-messages { overflow-y: auto; overscroll-behavior: contain; min-height: 4rem; flex: 1 1 14rem; border-top: 1px solid var(--adviser-line); }
.adviser-messages p { margin: .55rem .35rem .55rem 0; padding: .55rem .7rem; border-radius: .55rem; background: #eef5f7; }
.adviser-messages p[data-source="user"] { background: #f3f5f6; }
.adviser-messages strong { display: block; font-size: .82rem; }
.adviser-messages span { display: block; white-space: pre-wrap; overflow-wrap: anywhere; }
.adviser-messages a, .adviser-contact { color: #00566a; text-decoration: underline; }
#product-adviser input { min-width: 0; flex: 1; min-height: 44px; padding: .5rem; border: 1px solid #a8bdc4; border-radius: .5rem; font: inherit; font-size: 1rem; }
@media (max-width: 520px) {
  #product-adviser dialog { inset: auto 0 0; width: 100%; max-width: none; max-height: 92dvh; border-radius: 1rem 1rem 0 0; padding-bottom: max(1rem, env(safe-area-inset-bottom)); }
}
