/* Website chat widget. Brand: gold #c5a059, ink #1a1a1a. Loaded only while a chatbot agent is live. */
.aspiro-chat, .aspiro-chat * { box-sizing: border-box; }
.aspiro-chat { --ac-gold: #c5a059; --ac-gold-dark: #a8853f; --ac-ink: #1a1a1a; --ac-muted: #6b6b6b; --ac-line: #ece6da; --ac-bg: #faf8f4; font: 14px/1.5 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif; color: var(--ac-ink); }

.aspiro-chat-bubble { position: fixed; right: 64px; bottom: 76px; z-index: 9990; width: 58px; height: 58px; border: 0; border-radius: 50%; background: var(--ac-gold); color: #fff; box-shadow: 0 8px 24px rgba(0,0,0,.22); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: transform .18s ease, background .18s ease; }
.aspiro-chat-bubble:hover { transform: translateY(-2px); background: var(--ac-gold-dark); }
.aspiro-chat-bubble:focus-visible { outline: 3px solid var(--ac-ink); outline-offset: 3px; }
.aspiro-chat-bubble svg { width: 28px; height: 28px; }
.aspiro-chat-dot { position: absolute; top: 4px; right: 4px; width: 14px; height: 14px; border-radius: 50%; background: #d93b3b; border: 2px solid #fff; display: none; }
.aspiro-chat-bubble.has-unread .aspiro-chat-dot { display: block; }

.aspiro-chat-panel { position: fixed; right: 64px; bottom: 146px; z-index: 10002; width: 370px; height: min(600px, calc(100vh - 176px)); background: #fff; border-radius: 18px; box-shadow: 0 18px 50px rgba(0,0,0,.25); display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--ac-line); }
.aspiro-chat-panel[hidden] { display: none; }
.aspiro-chat-head { background: var(--ac-ink); color: #fff; padding: 14px 16px; display: flex; align-items: center; gap: 12px; }
.aspiro-chat-avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--ac-gold); color: var(--ac-ink); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 15px; flex: 0 0 auto; }
.aspiro-chat-title { flex: 1; min-width: 0; }
.aspiro-chat-title strong { display: block; font-size: 15px; }
.aspiro-chat-title span { font-size: 12px; color: #d4b56e; }
.aspiro-chat-close { background: transparent; border: 0; color: #fff; width: 36px; height: 36px; border-radius: 50%; cursor: pointer; font-size: 22px; line-height: 1; }
.aspiro-chat-close:hover, .aspiro-chat-close:focus-visible { background: rgba(255,255,255,.12); outline: none; }

.aspiro-chat-log { flex: 1; overflow-y: auto; padding: 16px 14px 8px; background: var(--ac-bg); display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; }
.aspiro-chat-msg { max-width: 85%; padding: 9px 13px; border-radius: 16px; white-space: pre-wrap; word-wrap: break-word; overflow-wrap: anywhere; }
.aspiro-chat-msg.bot { align-self: flex-start; background: #fff; border: 1px solid var(--ac-line); border-bottom-left-radius: 4px; }
.aspiro-chat-msg.me { align-self: flex-end; background: var(--ac-gold); color: #fff; border-bottom-right-radius: 4px; }
.aspiro-chat-msg.note { align-self: center; max-width: 92%; background: transparent; color: var(--ac-muted); font-size: 12px; text-align: center; padding: 2px 8px; }

.aspiro-chat-options { align-self: flex-start; display: flex; flex-direction: column; gap: 6px; max-width: 85%; }
.aspiro-chat-options button, .aspiro-chat-quick button { text-align: left; background: #fff; border: 1px solid var(--ac-gold); color: var(--ac-ink); border-radius: 12px; padding: 7px 12px; font: inherit; cursor: pointer; }
.aspiro-chat-options button:hover, .aspiro-chat-quick button:hover, .aspiro-chat-options button:focus-visible, .aspiro-chat-quick button:focus-visible { background: #fbf4e6; outline: none; }
.aspiro-chat-options button b { color: var(--ac-gold-dark); margin-right: 4px; }
.aspiro-chat-quick { display: flex; flex-wrap: wrap; gap: 6px; align-self: flex-start; }
.aspiro-chat-quick-label { font-size: 12px; color: var(--ac-muted); align-self: flex-start; margin-top: 2px; }
.aspiro-chat-quick button { border-radius: 999px; font-size: 13px; padding: 5px 12px; border-color: var(--ac-line); }

.aspiro-chat-card { align-self: stretch; background: #fff; border: 1px solid var(--ac-gold); border-radius: 14px; padding: 12px 14px; }
.aspiro-chat-card h4 { margin: 0 0 8px; font-size: 14px; }
.aspiro-chat-card dl { margin: 0 0 10px; display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; font-size: 13px; }
.aspiro-chat-card dt { color: var(--ac-muted); }
.aspiro-chat-card dd { margin: 0; }
.aspiro-chat-card button { width: 100%; border: 0; border-radius: 10px; background: var(--ac-gold); color: #fff; font: inherit; font-weight: 700; padding: 10px; cursor: pointer; }
.aspiro-chat-card button:hover { background: var(--ac-gold-dark); }
.aspiro-chat-card button:disabled { opacity: .6; cursor: default; }
.aspiro-chat-card small { display: block; margin-top: 6px; color: var(--ac-muted); font-size: 11.5px; }

.aspiro-chat-typing { align-self: flex-start; background: #fff; border: 1px solid var(--ac-line); border-radius: 16px; border-bottom-left-radius: 4px; padding: 11px 14px; display: flex; gap: 4px; }
.aspiro-chat-typing i { width: 7px; height: 7px; border-radius: 50%; background: #c9bfae; animation: aspiro-chat-blink 1.2s infinite ease-in-out; }
.aspiro-chat-typing i:nth-child(2) { animation-delay: .2s; }
.aspiro-chat-typing i:nth-child(3) { animation-delay: .4s; }
@keyframes aspiro-chat-blink { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }

.aspiro-chat-form { border-top: 1px solid var(--ac-line); padding: 10px 10px 6px; background: #fff; }
.aspiro-chat-row { display: flex; gap: 8px; align-items: flex-end; }
.aspiro-chat-input { flex: 1; resize: none; border: 1px solid var(--ac-line); border-radius: 12px; padding: 9px 12px; font: inherit; max-height: 110px; min-height: 40px; color: var(--ac-ink); background: #fff; }
.aspiro-chat-input:focus { outline: none; border-color: var(--ac-gold); }
.aspiro-chat-send { width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--ac-gold); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.aspiro-chat-send:disabled { opacity: .5; cursor: default; }
.aspiro-chat-send svg { width: 18px; height: 18px; }
.aspiro-chat-privacy { margin: 6px 4px 0; font-size: 11px; color: var(--ac-muted); }
.aspiro-chat-privacy a { color: inherit; text-decoration: underline; }
.aspiro-chat-trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

@media (max-width: 520px) {
  .aspiro-chat-panel { right: 0; bottom: 0; width: 100%; height: 100%; height: 100dvh; border-radius: 0; border: 0; }
  .aspiro-chat-bubble { right: 16px; bottom: 32px; }
  .aspiro-chat-input { font-size: 16px; } /* stops iOS zooming into the field */
}
@media (prefers-reduced-motion: reduce) { .aspiro-chat-bubble, .aspiro-chat-typing i { transition: none; animation: none; } }
@media print { .aspiro-chat { display: none !important; } }
