/* Ask DuneCross chat. Scoped to #ra-chat; resets theme button and input styles. */
#ra-chat { --ra-accent: #e9640e; --ra-top: 50%; --ra-ink: #1d1712; --ra-mute: #6f655c; --ra-bg: #fffaf5; --ra-line: #eadfd3; position: fixed; z-index: 99990; font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-size: 15px; line-height: 1.45; color: var(--ra-ink); }
#ra-chat *, #ra-chat *::before, #ra-chat *::after { box-sizing: border-box; }
#ra-chat button { font: inherit; letter-spacing: normal; text-transform: none; box-shadow: none; cursor: pointer; }
#ra-chat .screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
#ra-chat .ra-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }

/* The tab */
#ra-chat .ra-tab { position: fixed; top: var(--ra-top); display: flex; align-items: center; gap: 8px; margin: 0; padding: 16px 11px !important; border: 0 !important; background: var(--ra-accent) !important; color: #fff !important; font-size: 14px !important; font-weight: 700 !important; line-height: 1 !important; box-shadow: 0 8px 28px rgba(0,0,0,.28) !important; transition: padding .2s, filter .2s; }
#ra-chat .ra-tab:hover, #ra-chat .ra-tab:focus-visible { filter: brightness(1.08); }
#ra-chat .ra-tab:focus-visible { outline: 3px solid #fff; outline-offset: -5px; }
#ra-chat.is-vertical .ra-tab { writing-mode: vertical-rl; transform: translateY(-50%) rotate(180deg); }
#ra-chat.is-vertical.is-right .ra-tab { right: 0; border-radius: 0 12px 12px 0 !important; }
#ra-chat.is-vertical.is-left .ra-tab { left: 0; border-radius: 12px 0 0 12px !important; }
#ra-chat.is-vertical .ra-tab svg { transform: rotate(90deg); }
#ra-chat.is-vertical.is-right .ra-tab:hover { padding-bottom: 20px !important; }
#ra-chat.is-round .ra-tab { transform: translateY(-50%); width: 58px; height: 58px; justify-content: center; padding: 0 !important; border-radius: 50% !important; }
#ra-chat.is-round.is-right .ra-tab { right: 16px; }
#ra-chat.is-round.is-left .ra-tab { left: 16px; }
#ra-chat.is-round .ra-tab span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
#ra-chat.is-round .ra-tab svg { width: 26px; height: 26px; }
#ra-chat.is-open .ra-tab { opacity: 0; pointer-events: none; }

/* The window */
#ra-chat .ra-panel { position: fixed; bottom: 16px; width: min(380px, calc(100vw - 32px)); height: min(620px, calc(100vh - 32px)); display: flex; flex-direction: column; overflow: hidden; border-radius: 20px; background: var(--ra-bg); box-shadow: 0 24px 70px rgba(0,0,0,.35), 0 0 0 1px rgba(0,0,0,.06); animation: ra-in .25s cubic-bezier(.2,.9,.3,1.1); }
#ra-chat .ra-panel[hidden] { display: none; }
#ra-chat.is-right .ra-panel { right: 16px; }
#ra-chat.is-left .ra-panel { left: 16px; }
@keyframes ra-in { from { opacity: 0; transform: translateY(16px) scale(.97); } }
#ra-chat .ra-head { display: flex; align-items: center; gap: 10px; padding: 14px 14px 14px 16px; background: linear-gradient(135deg, var(--ra-accent), #8a3406); color: #fff; }
#ra-chat .ra-av { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.18); font-size: 20px; }
#ra-chat .ra-ht { flex: 1; min-width: 0; display: flex; flex-direction: column; }
#ra-chat .ra-ht strong { font-size: 16px; color: #fff; }
#ra-chat .ra-ht small { font-size: 12px; opacity: .85; }
#ra-chat .ra-x { width: 36px; height: 36px; margin: 0; padding: 0 !important; border: 0 !important; border-radius: 50% !important; background: rgba(255,255,255,.18) !important; color: #fff !important; font-size: 22px !important; line-height: 1 !important; }
#ra-chat .ra-x:hover { background: rgba(255,255,255,.3) !important; }

#ra-chat .ra-msgs { flex: 1; overflow-y: auto; padding: 16px 14px 8px; display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; }
#ra-chat .ra-m { display: flex; flex-direction: column; max-width: 88%; }
#ra-chat .ra-m.is-bot { align-self: flex-start; }
#ra-chat .ra-m.is-you { align-self: flex-end; align-items: flex-end; }
#ra-chat .ra-b { padding: 10px 13px; border-radius: 16px; background: #fff; border: 1px solid var(--ra-line); overflow-wrap: anywhere; }
#ra-chat .is-you .ra-b { background: var(--ra-accent); border-color: transparent; color: #fff; border-bottom-right-radius: 5px; }
#ra-chat .is-bot .ra-b { border-bottom-left-radius: 5px; }
#ra-chat .ra-b p { margin: 0 0 8px; }
#ra-chat .ra-b p:last-child { margin-bottom: 0; }
#ra-chat .ra-b ul, #ra-chat .ra-b ol { margin: 6px 0 8px; padding-left: 20px; }
#ra-chat .ra-b a { color: var(--ra-accent); font-weight: 600; }
#ra-chat .ra-b img { display: block; max-width: 100%; height: auto; margin: 6px 0; border-radius: 10px; }
#ra-chat .ra-b audio { display: block; width: 100%; margin: 6px 0; }
#ra-chat .ra-b video { display: block; width: 100%; margin: 6px 0; border-radius: 10px; background: #000; }
#ra-chat .ra-b .ra-embed, #ra-chat .ra-b .wp-video { position: relative; width: 100% !important; margin: 6px 0; }
#ra-chat .ra-b .ra-embed { aspect-ratio: 16 / 9; }
#ra-chat .ra-b .ra-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 10px; }
#ra-chat .ra-b iframe { max-width: 100%; border: 0; border-radius: 10px; }
#ra-chat .ra-m.is-ans { max-width: 94%; }
#ra-chat .ra-btns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
#ra-chat .ra-btn { display: inline-flex; align-items: center; min-height: 38px; padding: 0 14px; border-radius: 999px; background: var(--ra-accent); color: #fff !important; font-size: 14px; font-weight: 700; text-decoration: none !important; }
#ra-chat .ra-fb { display: flex; align-items: center; gap: 6px; margin-top: 4px; color: var(--ra-mute); font-size: 12.5px; }
#ra-chat .ra-fbb { width: 32px; height: 28px; margin: 0; padding: 0 !important; border: 1px solid var(--ra-line) !important; border-radius: 999px !important; background: #fff !important; font-size: 14px !important; line-height: 1 !important; color: inherit !important; }
#ra-chat .ra-fbb:hover { border-color: var(--ra-accent) !important; }
#ra-chat .ra-chips { display: flex; flex-wrap: wrap; gap: 6px; }
#ra-chat .ra-chip { margin: 0; padding: 8px 12px !important; border: 1px solid var(--ra-accent) !important; border-radius: 999px !important; background: #fff !important; color: var(--ra-accent) !important; font-size: 13.5px !important; font-weight: 600 !important; line-height: 1.25 !important; text-align: left; }
#ra-chat .ra-chip:hover { background: var(--ra-accent) !important; color: #fff !important; }
#ra-chat .ra-chip.is-none { border-style: dashed !important; color: var(--ra-mute) !important; border-color: var(--ra-mute) !important; }
#ra-chat .ra-chip.is-none:hover { color: #fff !important; background: var(--ra-mute) !important; }
#ra-chat .ra-typing .ra-b { display: flex; gap: 4px; padding: 13px 14px; }
#ra-chat .ra-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--ra-mute); opacity: .4; animation: ra-dot 1s infinite; }
#ra-chat .ra-typing i:nth-child(2) { animation-delay: .15s; }
#ra-chat .ra-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes ra-dot { 40% { opacity: 1; transform: translateY(-3px); } }

#ra-chat .ra-form, #ra-chat .ra-contact { display: flex; gap: 8px; margin: 0; }
#ra-chat .ra-form { padding: 10px 12px; border-top: 1px solid var(--ra-line); background: #fff; }
#ra-chat .ra-contact { align-self: stretch; padding: 4px 0; }
#ra-chat .ra-form input[type=text], #ra-chat .ra-contact input { flex: 1; min-width: 0; height: 44px; margin: 0; padding: 0 14px !important; border: 1px solid var(--ra-line) !important; border-radius: 999px !important; background: var(--ra-bg) !important; color: var(--ra-ink) !important; font: inherit; font-size: 15px !important; box-shadow: none !important; }
#ra-chat .ra-form input[type=text]:focus, #ra-chat .ra-contact input:focus { outline: none; border-color: var(--ra-accent) !important; }
#ra-chat .ra-send { display: grid; place-items: center; width: 44px; height: 44px; margin: 0; padding: 0 !important; border: 0 !important; border-radius: 50% !important; background: var(--ra-accent) !important; color: #fff !important; }
#ra-chat .ra-contact button { height: 44px; margin: 0; padding: 0 16px !important; border: 0 !important; border-radius: 999px !important; background: var(--ra-accent) !important; color: #fff !important; font-weight: 700 !important; font-size: 14px !important; }
#ra-chat .ra-contact button:disabled { opacity: .6; }
#ra-chat .ra-foot { display: flex; justify-content: space-between; gap: 10px; padding: 0 14px 10px; background: #fff; color: var(--ra-mute); font-size: 11.5px; }
#ra-chat .ra-foot a { color: #128c4b; font-weight: 700; white-space: nowrap; text-decoration: none; }

@media (max-width: 560px) {
	#ra-chat .ra-panel { inset: 0 !important; width: 100%; height: 100%; height: 100dvh; border-radius: 0; }
	#ra-chat.hide-mobile { display: none; }
	#ra-chat.is-vertical .ra-tab { padding: 13px 9px !important; font-size: 13px !important; }
}
@media (prefers-reduced-motion: reduce) {
	#ra-chat .ra-panel, #ra-chat .ra-typing i { animation: none; }
}
