/* The AI receptionist launcher and its panel (src/shell/launcher.html), on every page but /contact.
   Values follow the Claude Design "Home with AI receptionist" artboard: a navy #182E45 pill and
   header, a white panel, cyan #009DD7 actions. The chat's own classes (rc-msg, rc-bubble, rc-md,
   rc-callbar and the rest) are the ones public/js/receptionist.js and public/js/voice-call.js draw;
   /contact styles the same classes for its navy panel in templates/contact/Contact.dc.html. */
.rc-dock [hidden] { display: none !important; }
.rc-dock { font-family: var(--font-sans); color: var(--brand-navy); }

/* ---------- the floating button ---------- */
.rc-launch {
  position: fixed; right: 20px; bottom: 20px; z-index: 80;
  display: flex; align-items: center; gap: 10px;
  background: #182E45; color: #fff; border: none; border-radius: 999px; padding: 7px 20px 7px 7px;
  font: 700 15px/1.2 var(--font-sans); cursor: pointer; box-shadow: 0 12px 32px rgba(24,46,69,0.35);
}
.rc-launch:hover { background: #0F2236; }
.rc-launch__avatar { position: relative; width: 40px; height: 40px; border-radius: 999px; background: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.rc-launch__avatar img { width: 28px; height: 28px; display: block; }
.rc-dot { position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 999px; background: #22C55E; border: 2px solid #182E45; }
.rc-launch__mic { display: none; }
.rc-dock[data-style="icon"] .rc-launch { width: 60px; height: 60px; padding: 0; justify-content: center; background: #009DD7; box-shadow: 0 12px 32px rgba(0,157,215,0.4); }
.rc-dock[data-style="icon"] .rc-launch:hover { background: #0089BD; }
.rc-dock[data-style="icon"] .rc-launch__avatar, .rc-dock[data-style="icon"] .rc-launch__label { display: none; }
.rc-dock[data-style="icon"] .rc-launch__mic { display: block; }

/* ---------- the panel ---------- */
.rc-panel {
  position: fixed; right: 16px; bottom: 16px; z-index: 80;
  width: 400px; max-width: calc(100vw - 32px); height: min(760px, calc(100vh - 32px)); max-height: calc(100vh - 32px);
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid #E5E7EB; border-radius: 20px; overflow: hidden;
  box-shadow: 0 24px 60px rgba(24,46,69,0.30); animation: rc-in 220ms ease-out;
}
@keyframes rc-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
/* only the log gives way when the viewport is short: the header and the box stay in view, so a
   focus inside the panel (the call's Start button) never scrolls the header away */
.rc-panel > * { flex: 0 0 auto; }
.rc-panel > .rc-log { flex: 1 1 auto; }
.rc-panel.is-voice .rc-chips, .rc-panel.is-voice .rc-fine { display: none; }
.rc-head { background: #182E45; color: #fff; padding: 14px 16px 12px 18px; display: grid; gap: 10px; flex-shrink: 0; }
.rc-head__row { display: flex; align-items: center; gap: 12px; }
.rc-head__row--tools { flex-wrap: wrap; gap: 8px; }
.rc-avatar { position: relative; width: 42px; height: 42px; border-radius: 999px; background: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.rc-avatar img { width: 30px; height: 30px; display: block; }
.rc-avatar .rc-dot { width: 12px; height: 12px; }
.rc-head__text { flex: 1; min-width: 0; }
.rc-head__title { font-size: 16px; font-weight: 700; }
.rc-head__sub { font-size: 12px; color: rgba(255,255,255,0.72); margin-top: 2px; }
.rc-close { width: 36px; height: 36px; flex-shrink: 0; border-radius: 999px; border: none; background: rgba(255,255,255,0.1); color: #fff; font-size: 20px; line-height: 1; cursor: pointer; }
.rc-close:hover { background: rgba(255,255,255,0.2); }
.rc-modes { display: flex; background: rgba(255,255,255,0.1); border-radius: 999px; padding: 4px; gap: 4px; }
.rc-mode { border: none; border-radius: 999px; padding: 7px 16px; font: 700 14px/1.2 var(--font-sans); cursor: pointer; background: transparent; color: #fff; }
.rc-mode[aria-pressed="true"] { background: #fff; color: #182E45; }
.rc-mode[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.rc-langs { display: flex; gap: 2px; padding: 3px; border: 1px solid rgba(255,255,255,0.3); border-radius: 999px; margin-left: auto; }
.rc-langs button { background: transparent; border: none; color: #fff; font: 700 12px/1.2 var(--font-sans); letter-spacing: 0.06em; padding: 6px 10px; border-radius: 999px; cursor: pointer; }
.rc-langs button:hover { background: rgba(255,255,255,0.1); }
.rc-langs button[aria-pressed="true"] { background: #4FC3E7; color: #182E45; }
.rc-langs button[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.rc-langs button[aria-disabled="true"]:not([aria-pressed="true"]):hover { background: transparent; }
.rc-newchat { background: none; border: none; padding: 6px 4px; color: rgba(255,255,255,0.78); font: 500 13px/1.2 var(--font-sans); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.rc-newchat:hover { color: #fff; }
.rc-head button:focus-visible { outline: 2px solid #4FC3E7; outline-offset: 2px; box-shadow: none; }

/* ---------- the chat ---------- */
.rc-disclosure { margin: 0; padding: 12px 20px; border-bottom: 1px solid #EEF0F3; font-size: 12px; line-height: 1.5; color: #6B7280; }
.rc-log { min-height: 120px; overflow-y: auto; padding: 14px 20px; display: flex; flex-direction: column; gap: 12px; overscroll-behavior: contain; scrollbar-width: thin; }
.rc-log:focus-visible { outline: 2px solid #009DD7; outline-offset: -2px; box-shadow: none; border-radius: 0; }
.rc-msg { display: flex; }
.rc-msg--user { justify-content: flex-end; }
.rc-bubble { max-width: 85%; padding: 12px 16px; font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; }
.rc-msg--bot .rc-bubble { background: #F2F4F8; color: #182E45; border-radius: 4px 16px 16px 16px; }
.rc-msg--user .rc-bubble { background: #009DD7; color: #fff; border-radius: 16px 4px 16px 16px; }
.rc-msg--user .rc-md p { white-space: pre-wrap; }
.rc-msg--notice .rc-bubble { background: #E6F6FC; border: 1px solid #B3E2F4; }
.rc-md p, .rc-md ul, .rc-md ol { margin: 0 0 10px; }
.rc-md ul, .rc-md ol { padding-left: 22px; }
.rc-md li { margin: 0 0 4px; }
.rc-md > :last-child { margin-bottom: 0; }
.rc-md strong { font-weight: 700; }
.rc-md a { color: #00759F; font-weight: 500; text-decoration: underline; text-underline-offset: 2px; }
.rc-md a:hover { color: #182E45; }
.rc-msg--user .rc-md a { color: #fff; }
.rc-again { margin-top: 10px; background: #009DD7; color: #fff; border: none; border-radius: 10px; padding: 9px 16px; font: 700 14px/1.2 var(--font-sans); cursor: pointer; }
.rc-again:hover { background: #0089BD; }
.rc-status { display: flex; align-items: center; gap: 10px; min-height: 20px; padding: 0 20px; font-size: 13px; color: #6B7280; }
.rc-status .rc-bars { display: none; align-items: flex-end; gap: 3px; height: 14px; }
.rc-status.is-on .rc-bars { display: inline-flex; }
.rc-bars span { display: block; width: 3px; height: 14px; border-radius: 2px; background: #009DD7; transform-origin: 50% 100%; animation: rc-bar 1s ease-in-out infinite; }
.rc-bars span:nth-child(2) { animation-delay: .15s; }
.rc-bars span:nth-child(3) { animation-delay: .3s; }
.rc-bars span:nth-child(4) { animation-delay: .45s; }
@keyframes rc-bar { 0%, 100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }
.rc-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 8px 20px 4px; }
.rc-chips button { border: 1px solid #B3E2F4; background: #E6F6FC; color: #00759F; border-radius: 999px; padding: 8px 14px; font: 500 14px/1.3 var(--font-sans); text-align: left; cursor: pointer; }
.rc-chips button:hover { background: #CCEEFA; }
.rc-chips button[disabled] { opacity: .5; cursor: default; background: #E6F6FC; }

/* ---------- the voice call (public/js/voice-call.js) ---------- */
.rc-callbar { margin: 10px 20px 0; border: 1px solid #B3E2F4; background: #E6F6FC; border-radius: 14px; padding: 12px 14px; font-size: 13px; line-height: 1.45; color: #182E45; --rc-level: 0; }
.rc-consent p { margin: 0 0 10px; }
.rc-consent-actions, .rc-call-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.rc-callbar button { font: 700 14px/1.2 var(--font-sans); border-radius: 10px; padding: 9px 16px; cursor: pointer; border: 1px solid transparent; }
.rc-cb-primary { background: #009DD7; color: #fff; }
.rc-cb-primary:hover { background: #0089BD; }
.rc-cb-quiet { background: transparent; color: #182E45; border-color: rgba(24,46,69,0.35) !important; }
.rc-cb-quiet:hover { background: rgba(24,46,69,0.06); }
.rc-cb-quiet[aria-pressed="true"] { background: #182E45; color: #fff; }
.rc-cb-end { background: #182E45; color: #fff; }
.rc-cb-end:hover { background: #0F2236; }
.rc-calllive { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.rc-call-dot { width: 12px; height: 12px; border-radius: 50%; background: #009DD7; box-shadow: 0 0 0 calc(var(--rc-level) * 10px) rgba(0,157,215,0.3); transition: box-shadow .08s linear; }
.rc-callbar[data-state="connecting"] .rc-call-dot, .rc-callbar[data-state="muted"] .rc-call-dot { background: #9CA3AF; box-shadow: none; }
.rc-call-state { font-weight: 700; flex: 1 1 auto; }
.rc-call-time { font-variant-numeric: tabular-nums; color: #6B7280; }
.rc-callbar.is-warning .rc-call-time { color: #182E45; font-weight: 700; }
.rc-call-heard { flex: 1 1 100%; color: #3F5266; font-size: 13px; min-height: 1.5em; }
.rc-note { margin: 8px 20px 0; font-size: 13px; line-height: 1.5; color: #00759F; }
.rc-note:empty { display: none; }

/* ---------- the box ---------- */
.rc-form { margin: 0; padding: 12px 20px 0; }
.rc-row { display: flex; align-items: flex-end; gap: 6px; background: #fff; border: 1px solid #D1D5DB; border-radius: 14px; padding: 6px 6px 6px 16px; }
.rc-row:focus-within { border-color: #009DD7; box-shadow: 0 0 0 3px rgba(0,157,215,0.25); }
.rc-callbtn, .rc-sendbtn { flex: none; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border: none; cursor: pointer; }
.rc-callbtn { border-radius: 10px; background: #E6F6FC; color: #00759F; }
.rc-callbtn:hover { background: #CCEEFA; }
.rc-sendbtn { border-radius: 10px; background: #009DD7; color: #fff; }
.rc-sendbtn:hover { background: #0089BD; }
.rc-sendbtn[disabled] { opacity: .5; cursor: not-allowed; background: #009DD7; }
#receptionist.is-busy .rc-sendbtn[disabled] { cursor: progress; }
.rc-row textarea { flex: 1; min-width: 0; box-sizing: border-box; padding: 10px 0; font: 16px/1.5 var(--font-sans); color: #182E45; border: none; border-radius: 0; background: transparent; resize: none; min-height: 92px; max-height: 160px; }
.rc-row textarea:focus, .rc-row textarea:focus-visible { outline: none; box-shadow: none; }
.rc-row textarea::placeholder { color: #6B7280; }
.rc-row textarea[disabled] { cursor: not-allowed; }
#receptionist.is-off .rc-row { opacity: .6; }
.rc-turnstile { margin: 10px 20px 0; }
.rc-turnstile:empty { display: none; }
.rc-fine { margin: 0; padding: 10px 20px 12px; font-size: 11px; line-height: 1.5; color: #6B7280; }
.rc-foot { padding: 12px 18px; border-top: 1px solid #E5E7EB; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13px; color: #6B7280; flex-shrink: 0; }
.rc-foot a { color: #009DD7; font-weight: 700; text-decoration: none; }
.rc-foot a:hover { color: #0089BD; }
#receptionist button:focus-visible { outline: 2px solid #009DD7; outline-offset: 2px; box-shadow: none; }

@media (max-width: 480px) {
  .rc-panel { right: 8px; left: 8px; bottom: 8px; width: auto; max-width: none; height: calc(100vh - 16px); height: calc(100dvh - 16px); max-height: none; border-radius: 16px; }
  .rc-log { min-height: 140px; }
  .rc-row textarea { min-height: 68px; }
  .rc-launch { right: 12px; bottom: 12px; }
  /* on a phone the pill drops its label (the button keeps its aria-label): at 193px wide it covered
     the first screen's buttons, such as the home search (2026-10-18 mobile audit) */
  .rc-dock:not([data-style="icon"]) .rc-launch { padding: 7px; gap: 0; }
  .rc-dock:not([data-style="icon"]) .rc-launch__label { display: none; }
}
/* the launcher stays out of the way while the phone menu is open; it sat on top of the menu's links */
body:has(#panel-mobile.is-open) .rc-launch { display: none; }
@media (max-height: 640px) {
  .rc-log { min-height: 100px; }
  .rc-row textarea { min-height: 44px; }
  .rc-fine { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .rc-panel { animation: none; }
  .rc-bars span { animation: none; transform: scaleY(.6); }
  .rc-call-dot { transition: none; box-shadow: none; }
}
