:root {
  --rc-chat-ink: #1c1a17;
  --rc-chat-walnut: #4a3524;
  --rc-chat-walnut-deep: #2a1d16;
  --rc-chat-oak: #c69a5b;
  --rc-chat-plaster: #f6f0e6;
  --rc-chat-linen: #e8dece;
}

.rc-chat { position: fixed; z-index: 115; right: 1rem; bottom: max(5.25rem, calc(env(safe-area-inset-bottom) + 4.25rem)); font-family: Inter, ui-sans-serif, system-ui, sans-serif; color: var(--rc-chat-ink); }
.rc-chat *, .rc-chat *::before, .rc-chat *::after { box-sizing: border-box; }
.rc-chat__launcher { position: relative; display: inline-flex; min-height: 3.9rem; align-items: center; gap: .7rem; overflow: hidden; border: 1px solid rgba(198,154,91,.75); border-radius: 999px; background: repeating-linear-gradient(101deg, transparent 0 7px, rgba(198,154,91,.14) 7px 8px, transparent 8px 17px), linear-gradient(120deg, #322018, #5c3d28 52%, #342018); box-shadow: 0 14px 40px rgba(28,26,23,.38), inset 0 1px rgba(255,255,255,.12); color: var(--rc-chat-plaster); cursor: pointer; padding: .55rem 1rem .55rem .65rem; transition: transform 180ms ease, box-shadow 180ms ease; pointer-events: auto; }
.rc-chat__launcher:hover { transform: translateY(-2px); box-shadow: 0 18px 44px rgba(28,26,23,.48), inset 0 1px rgba(255,255,255,.16); }
.rc-chat__launcher:focus-visible, .rc-chat button:focus-visible, .rc-chat input:focus-visible, .rc-chat textarea:focus-visible, .rc-chat a:focus-visible { outline: 2px solid var(--rc-chat-oak); outline-offset: 3px; }
.rc-chat__launcher svg { width: 2.2rem; height: 2.2rem; border: 1px solid rgba(246,240,230,.38); border-radius: 50%; padding: .45rem; }
.rc-chat__launcher span { background: #3c261c; color: var(--rc-chat-plaster); font-size: .69rem; font-weight: 700; letter-spacing: .115em; padding: .2rem .35rem; text-transform: uppercase; white-space: nowrap; }
.rc-chat__panel { position: absolute; right: 0; bottom: 4.7rem; display: flex; width: min(24rem, calc(100vw - 2rem)); max-height: min(39rem, calc(100vh - 8rem)); flex-direction: column; overflow: hidden; border: 1px solid rgba(74,53,36,.55); background: var(--rc-chat-plaster); box-shadow: 0 28px 90px rgba(28,26,23,.42); }
.rc-chat__header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-top: 3px solid var(--rc-chat-oak); border-bottom: 1px solid rgba(74,53,36,.3); background: var(--rc-chat-walnut-deep); color: var(--rc-chat-plaster); padding: 1rem 1.1rem .95rem; }
.rc-chat__eyebrow { margin: 0; color: #654521; font-size: .63rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; }
.rc-chat__header .rc-chat__eyebrow { color: var(--rc-chat-oak); }
.rc-chat__header h2, .rc-chat__lead h3 { margin: .23rem 0 0; font-family: "Cormorant Garamond", Georgia, serif; font-size: 1.65rem; font-weight: 600; line-height: 1; }
.rc-chat__close { display: inline-grid; width: 2.6rem; height: 2.6rem; place-items: center; border: 0; background: transparent; color: var(--rc-chat-plaster); cursor: pointer; }
.rc-chat__close svg { width: 1.2rem; height: 1.2rem; }
.rc-chat__scroll { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 1rem; }
.rc-chat__messages { display: flex; flex-direction: column; gap: .7rem; }
.rc-chat__message { max-width: 92%; margin: 0; padding: .72rem .82rem; font-size: .84rem; line-height: 1.5; white-space: pre-wrap; }
.rc-chat__message--assistant { align-self: flex-start; border: 1px solid rgba(74,53,36,.22); background: #fffaf1; }
.rc-chat__message--user { align-self: flex-end; background: var(--rc-chat-walnut); color: var(--rc-chat-plaster); }
.rc-chat__typing { color: rgba(28,26,23,.66); font-style: italic; }
.rc-chat__quick { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: 1rem; }
.rc-chat__quick button, .rc-chat__choices button, .rc-chat__secondary { border: 1px solid rgba(74,53,36,.4); background: transparent; color: var(--rc-chat-walnut); cursor: pointer; font: inherit; font-size: .73rem; font-weight: 650; line-height: 1.25; padding: .5rem .6rem; text-align: left; }
.rc-chat__quick button:hover, .rc-chat__choices button:hover, .rc-chat__choices button[aria-pressed="true"], .rc-chat__secondary:hover { border-color: var(--rc-chat-walnut); background: var(--rc-chat-linen); }
.rc-chat__quick button:disabled, .rc-chat__primary:disabled, .rc-chat__secondary:disabled { cursor: not-allowed; opacity: .55; }
.rc-chat__lead-cta { display: flex; width: 100%; align-items: center; justify-content: space-between; margin-top: 1rem; border: 1px solid var(--rc-chat-walnut); background: var(--rc-chat-walnut); color: var(--rc-chat-plaster); cursor: pointer; font: inherit; font-size: .72rem; font-weight: 700; letter-spacing: .12em; padding: .78rem .85rem; text-transform: uppercase; }
.rc-chat__lead-cta:hover, .rc-chat__primary:hover { background: var(--rc-chat-walnut-deep); }
.rc-chat__privacy { margin: .8rem 0 0; color: rgba(28,26,23,.62); font-size: .68rem; line-height: 1.45; }
.rc-chat__privacy a, .rc-chat__lead a { color: inherit; text-decoration-color: rgba(74,53,36,.5); text-underline-offset: 3px; }
.rc-chat__composer { display: flex; gap: .55rem; border-top: 1px solid rgba(74,53,36,.25); background: #fffaf1; padding: .75rem; }
.rc-chat__composer input, .rc-chat__lead input, .rc-chat__lead textarea { min-width: 0; width: 100%; border: 1px solid rgba(74,53,36,.45); border-radius: 0; background: #fffdfa; color: var(--rc-chat-ink); font: inherit; font-size: .86rem; line-height: 1.4; padding: .68rem .7rem; }
.rc-chat__lead textarea { resize: vertical; }
.rc-chat__composer button { display: inline-grid; width: 2.7rem; flex: 0 0 2.7rem; place-items: center; border: 0; background: var(--rc-chat-walnut); color: var(--rc-chat-plaster); cursor: pointer; }
.rc-chat__composer button svg { width: 1.05rem; height: 1.05rem; }
.rc-chat__lead { display: flex; flex-direction: column; gap: .85rem; }
.rc-chat__lead > p:not(.rc-chat__eyebrow) { margin: 0; color: rgba(28,26,23,.72); font-size: .82rem; line-height: 1.5; }
.rc-chat__question { color: var(--rc-chat-ink); font-size: .88rem; font-weight: 700; line-height: 1.4; }
.rc-chat__choices { display: flex; flex-wrap: wrap; gap: .5rem; }
.rc-chat__choices button { flex: 1 1 45%; min-height: 2.6rem; }
.rc-chat__primary { border: 1px solid var(--rc-chat-walnut); background: var(--rc-chat-walnut); color: var(--rc-chat-plaster); cursor: pointer; font: inherit; font-size: .73rem; font-weight: 700; letter-spacing: .1em; padding: .67rem .8rem; text-transform: uppercase; }
.rc-chat__actions { display: flex; flex-wrap: wrap; gap: .55rem; align-items: center; justify-content: flex-end; margin-top: .15rem; }
.rc-chat__actions .rc-chat__secondary { margin-right: auto; }
.rc-chat__error { margin: .65rem .85rem .85rem; color: #8f1d1d; font-size: .76rem; line-height: 1.4; }
.rc-chat__lead .rc-chat__error { margin: 0; }
.rc-chat__review { margin: 0; border-top: 1px solid rgba(74,53,36,.25); padding: 0; list-style: none; }
.rc-chat__review > li { position: relative; border-bottom: 1px solid rgba(74,53,36,.18); padding: .58rem 4rem .58rem 0; }
.rc-chat__review-label { display: block; color: var(--rc-chat-walnut); font-size: .61rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.rc-chat__review-value { display: block; margin-top: .18rem; font-size: .79rem; line-height: 1.35; overflow-wrap: anywhere; white-space: pre-wrap; }
.rc-chat__review button { position: absolute; top: .7rem; right: 0; border: 0; background: transparent; color: var(--rc-chat-walnut); cursor: pointer; font: inherit; font-size: .68rem; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.rc-chat__honeypot { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 767px) {
  /* Icon-only launcher on mobile — the full text pill was oversized for a
     phone screen. Sized to match the call-row's own 3rem (48px) circles so
     the trio (phone / ROB / chat) reads as one row when portaled into
     #rc-chat-slot below. */
  .rc-chat__launcher { min-height: 3rem; width: 3rem; padding: 0; justify-content: center; gap: 0; }
  .rc-chat__launcher span { display: none; }
  .rc-chat__launcher svg { width: 1.2rem; height: 1.2rem; padding: 0; border: none; }
  /* The homepage portals a copy of this launcher into CallPill's row (see
     Chatbot.tsx); hide the original fixed-position one so it isn't shown
     twice. Pages with no #rc-chat-slot (no `slotEl`, no `--portaled` class)
     keep the original in its default corner, just at the compact size above. */
  .rc-chat--portaled > .rc-chat__launcher { display: none; }
}
@media (min-width: 768px) { .rc-chat { right: 1.5rem; bottom: 1.5rem; } .rc-chat__panel { bottom: 4.8rem; width: min(25rem, calc(100vw - 3rem)); } }
@media (prefers-reduced-motion: reduce) { .rc-chat__launcher { transition: none; } .rc-chat__launcher:hover { transform: none; } }
