/* AI Assistant chat - floating widget + full page. Uses the theme tokens from site_new.css. */
.hca-widget { position: fixed; right: 24px; bottom: 24px; z-index: 1049; }
.hca-widget.hca-left { right: auto; left: 24px; }

.hca-launcher {
  width: 56px; height: 56px; border-radius: 50%; border: none; cursor: pointer;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  color: #fff; font-size: 1.4rem; display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-lg); transition: transform var(--transition-base), box-shadow var(--transition-base);
}
.hca-launcher:hover { transform: translateY(-2px) scale(1.04); box-shadow: var(--shadow-xl); }
.hca-launcher:focus-visible, .hca-icon-btn:focus-visible, .hca-send:focus-visible, .hca-chip:focus-visible {
  outline: 3px solid var(--primary-light); outline-offset: 2px;
}
.hca-widget.hca-open .hca-launcher { display: none; }

.hca-panel {
  position: absolute; bottom: 0; right: 0;
  width: 400px; height: min(640px, calc(100vh - 110px));
  background: var(--bg-primary); border: 1px solid var(--border-color); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl); overflow: hidden; display: flex; flex-direction: column;
  animation: hca-pop var(--transition-base);
}
.hca-panel[hidden] { display: none; }
.hca-widget.hca-left .hca-panel { right: auto; left: 0; }
@keyframes hca-pop { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }

.hca-page { max-width: 880px; margin: 0 auto; height: calc(100vh - 220px); min-height: 460px; }
.hca-page .hca-chat { border: 1px solid var(--border-color); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }

.hca-chat { display: flex; flex-direction: column; height: 100%; background: var(--bg-primary); min-height: 0; }

.hca-header {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; color: #fff;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
}
.hca-avatar { width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.2); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0; }
.hca-titles { flex: 1; min-width: 0; }
.hca-title { font-weight: 600; line-height: 1.2; }
.hca-subtitle { font-size: .78rem; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hca-actions { display: flex; gap: 4px; }
.hca-icon-btn {
  width: 32px; height: 32px; border: none; border-radius: var(--radius-sm); background: transparent; color: #fff;
  display: flex; align-items: center; justify-content: center; cursor: pointer; text-decoration: none; transition: background var(--transition-fast);
}
.hca-icon-btn:hover { background: rgba(255,255,255,.2); color: #fff; }

.hca-messages { flex: 1; min-height: 0; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: var(--bg-secondary); overscroll-behavior: contain; }
.hca-welcome { margin: auto; text-align: center; padding: 16px; color: var(--text-secondary); }
.hca-welcome-title { font-weight: 600; color: var(--text-primary); margin-bottom: 4px; }
.hca-welcome-text { font-size: .875rem; }

.hca-row { display: flex; }
.hca-user { justify-content: flex-end; }
.hca-bubble { max-width: 86%; padding: 10px 14px; border-radius: var(--radius-md); font-size: .92rem; line-height: 1.5; overflow-wrap: anywhere; word-break: break-word; }
.hca-user .hca-bubble { background: var(--primary-color); color: #fff; border-bottom-right-radius: 4px; white-space: pre-wrap; }
.hca-assistant .hca-bubble { background: var(--bg-primary); color: var(--text-primary); border: 1px solid var(--border-color); border-bottom-left-radius: 4px; }
.hca-error .hca-bubble { background: #FEF2F2; color: #991B1B; border: 1px solid #FECACA; border-bottom-left-radius: 4px; }
.hca-bubble p { margin: 0 0 .5em; } .hca-bubble p:last-child, .hca-bubble ul:last-child, .hca-bubble ol:last-child { margin-bottom: 0; }
.hca-bubble ul, .hca-bubble ol { margin: 0 0 .5em; padding-left: 1.25rem; }
.hca-retry { display: inline-block; margin-top: 6px; padding: 3px 12px; border: 1px solid currentColor; border-radius: var(--radius-full); background: transparent; color: inherit; font-size: .8rem; text-decoration: none; cursor: pointer; }
.hca-retry:hover { background: rgba(0,0,0,.05); color: inherit; }

.hca-typing .hca-bubble { display: flex; gap: 4px; padding: 14px; }
.hca-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--text-muted); animation: hca-dot 1.2s infinite ease-in-out; }
.hca-typing span:nth-child(2) { animation-delay: .15s; } .hca-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes hca-dot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

.hca-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 16px 0; background: var(--bg-secondary); }
.hca-chips[hidden] { display: none; }
.hca-chip { border: 1px solid var(--border-color); background: var(--bg-primary); color: var(--primary-dark); border-radius: var(--radius-full); padding: 6px 12px; font-size: .8rem; cursor: pointer; transition: background var(--transition-fast), border-color var(--transition-fast); }
.hca-chip:hover { background: var(--primary-soft); border-color: var(--primary-light); }

.hca-form { display: flex; align-items: flex-end; gap: 8px; padding: 12px 16px; background: var(--bg-secondary); }
.hca-input { flex: 1; resize: none; border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 9px 12px; font: inherit; font-size: .92rem; max-height: 120px; background: var(--bg-primary); color: var(--text-primary); }
.hca-input:focus { outline: none; border-color: var(--primary-light); box-shadow: 0 0 0 3px var(--primary-soft); }
.hca-input:disabled { background: var(--bg-tertiary); }
.hca-send { width: 40px; height: 40px; border: none; border-radius: var(--radius-md); background: var(--primary-color); color: #fff; cursor: pointer; flex-shrink: 0; transition: background var(--transition-fast), opacity var(--transition-fast); }
.hca-send:hover:not(:disabled) { background: var(--primary-dark); }
.hca-send:disabled { opacity: .5; cursor: not-allowed; }
.hca-footnote { text-align: center; font-size: .7rem; color: var(--text-muted); padding: 0 16px 8px; background: var(--bg-secondary); }

@media (max-width: 576px) {
  .hca-widget { right: 16px; bottom: 16px; }
  .hca-widget.hca-left { left: 16px; }
  .hca-panel { position: fixed; inset: 0; width: 100%; height: 100dvh; border: none; border-radius: 0; }
  .hca-page { height: calc(100dvh - 200px); }
}
@media (prefers-reduced-motion: reduce) {
  .hca-panel, .hca-launcher, .hca-typing span { animation: none; transition: none; }
}

/* ---- "Coming soon" state (receptionist assistant) ---- */
.hca-soon-badge {
    display: inline-block; margin-left: .4rem; padding: .05rem .4rem; border-radius: 999px;
    font-size: .625rem; font-weight: 700; letter-spacing: .03em; line-height: 1.4; text-transform: uppercase;
    background: #fef3c7; color: #92400e; vertical-align: middle;
}
.hca-soon-badge-lg { font-size: .75rem; padding: .15rem .65rem; margin: 0 0 .75rem; }
.hca-soon-item { position: relative; }
.hca-soon-item .bi-stars { opacity: .6; }
.hca-soon-dot { position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; border-radius: 50%; background: #f59e0b; border: 2px solid #fff; }
.hca-soon-page { display: flex; justify-content: center; padding: 2rem 1rem; }
.hca-soon-card { max-width: 480px; width: 100%; text-align: center; background: #fff; border: 1px solid #e2e8f0; border-radius: 16px; padding: 2rem 1.5rem; box-shadow: 0 4px 16px rgba(15,23,42,.06); }
.hca-soon-icon { width: 56px; height: 56px; margin: 0 auto 1rem; border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; color: #fff; background: linear-gradient(135deg,#6366f1,#8b5cf6); }
.hca-soon-title { font-size: 1.25rem; font-weight: 700; margin: 0 0 .75rem; }
.hca-soon-text { color: #475569; font-size: .9rem; margin-bottom: .75rem; }
