.rha-chat { --rha-accent: #1f3a5f; position: fixed; right: 20px; bottom: 20px; z-index: 99999; font: 15px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; color: #1d2327; }
.rha-chat * { box-sizing: border-box; }
.rha-launcher { width: 60px; height: 60px; border-radius: 50%; border: 0; background: var(--rha-accent); color: #fff; cursor: pointer; box-shadow: 0 6px 20px rgba(0,0,0,.25); display: flex; align-items: center; justify-content: center; }
.rha-launcher:hover { filter: brightness(1.1); }
.rha-panel { width: 370px; max-width: calc(100vw - 32px); height: 560px; max-height: calc(100vh - 40px); background: #fff; border-radius: 14px; box-shadow: 0 10px 40px rgba(0,0,0,.25); display: flex; flex-direction: column; overflow: hidden; }
.rha-panel[hidden], .rha-launcher[hidden] { display: none; }
.rha-head { background: var(--rha-accent); color: #fff; padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; }
.rha-title { font-weight: 600; }
.rha-close { background: none; border: 0; color: #fff; font-size: 26px; line-height: 1; cursor: pointer; padding: 0 4px; }
.rha-list { flex: 1; overflow-y: auto; padding: 14px; background: #f6f7f9; display: flex; flex-direction: column; gap: 8px; }
.rha-msg { max-width: 85%; padding: 9px 12px; border-radius: 14px; white-space: normal; word-wrap: break-word; }
.rha-bot { background: #fff; border: 1px solid #e3e5e8; align-self: flex-start; border-bottom-left-radius: 4px; }
.rha-user { background: var(--rha-accent); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.rha-msg a { color: inherit; text-decoration: underline; }
.rha-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid #e3e5e8; }
.rha-input { flex: 1; resize: none; border: 1px solid #c9ccd1; border-radius: 10px; padding: 9px 10px; font: inherit; max-height: 120px; }
.rha-input:focus { outline: 2px solid var(--rha-accent); outline-offset: -1px; }
.rha-send { background: var(--rha-accent); color: #fff; border: 0; border-radius: 10px; padding: 0 16px; font-weight: 600; cursor: pointer; }
.rha-send:disabled { opacity: .5; cursor: default; }
.rha-note { font-size: 11px; color: #6b7280; text-align: center; padding: 0 10px 8px; }
.rha-typing span { display: inline-block; width: 7px; height: 7px; margin: 0 2px; border-radius: 50%; background: #9aa0a6; animation: rha-b 1.2s infinite; }
.rha-typing span:nth-child(2) { animation-delay: .2s; }
.rha-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes rha-b { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }
@media (max-width: 480px) { .rha-chat { right: 12px; bottom: 12px; } .rha-panel { height: calc(100vh - 24px); } }
.rha-signup { max-width: 460px; display: grid; gap: 10px; font: 15px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
.rha-signup label { display: grid; gap: 4px; font-weight: 600; font-size: 14px; }
.rha-signup input, .rha-signup textarea, .rha-signup select { border: 1px solid #c9ccd1; border-radius: 8px; padding: 10px; font: inherit; font-weight: 400; }
.rha-signup button { background: #1f3a5f; color: #fff; border: 0; border-radius: 8px; padding: 12px; font-weight: 600; cursor: pointer; }
.rha-signup button:disabled { opacity: .6; }
.rha-signup .rha-hp { position: absolute; left: -9999px; }
.rha-signup-fine { font-size: 12px; color: #6b7280; margin: 0; }
.rha-signup-msg { margin: 0; min-height: 1.2em; }
/* Guard against theme button styles (Astra adds large padding to every button). */
.rha-chat button { margin: 0; min-width: 0; min-height: 0; text-transform: none; letter-spacing: normal; line-height: 1; box-shadow: none; }
.rha-chat .rha-launcher { width: 60px; height: 60px; padding: 0; border-radius: 50%; box-shadow: 0 6px 20px rgba(0,0,0,.25); }
.rha-chat .rha-launcher svg { flex: 0 0 28px; width: 28px; height: 28px; display: block; }
.rha-chat .rha-launcher svg path { fill: #fff; }
.rha-chat .rha-close { padding: 0 4px; background: none; font-size: 26px; }
.rha-chat .rha-send { padding: 0 16px; border-radius: 10px; font-size: 15px; }
.rha-chat .rha-launcher:focus, .rha-chat .rha-close:focus, .rha-chat .rha-send:focus { outline: 2px solid #fff; outline-offset: 2px; }
.rha-signup button { padding: 12px; min-width: 0; }
