/* Bravon's chat interaction, with Aeren's warm palette and original wing mark. */
:root.aeren-assistant-open { overflow: hidden; }
.aeren-assistant-open body { position: fixed; top: var(--aeren-page-top,0px); left: 0; width: 100%; overflow: hidden; }
.aeren-assistant { position: fixed; inset: 0; width: min(520px,calc(100% - 32px)); height: min(720px,calc(100dvh - 40px)); max-width: none; max-height: none; padding: 0; border: 1px solid #fff9; border-radius: 28px; color: #262024; background: #f5f1ef; box-shadow: 0 20px 70px #35222c30; overflow: hidden; }
.aeren-assistant[open] { display: flex; flex-direction: column; }
.aeren-assistant::backdrop { background: #3a263652; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.assistant-heading { display: flex; justify-content: space-between; align-items: center; flex: none; gap: 16px; min-height: 82px; padding: 16px 20px; border-bottom: 1px solid #6d525414; }
.assistant-identity { display: flex; align-items: center; gap: 11px; }
.assistant-mark { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(140deg,#e6c6d7,#f0d6c6); }
.assistant-mark .icon { width: 28px; height: 28px; }
.assistant-heading h2 { margin: 0; font-family: Sora,sans-serif; font-weight: 400; font-size: 15px; letter-spacing: -.5px; }
.assistant-heading p { margin: 5px 0 0; font-size: 11px; color: #817479; }
.assistant-close { display: grid; place-items: center; flex: none; width: 44px; height: 44px; background: transparent; border-radius: 50%; }
.assistant-close:hover { background: #e9dfde; }
.assistant-close:focus-visible { outline: 2px solid #9c858e; outline-offset: 2px; }
.assistant-log { position: relative; display: flex; flex-direction: column; flex: 1; min-height: 0; gap: 24px; overflow-y: auto; overflow-anchor: none; overscroll-behavior: contain; padding: 24px; scrollbar-width: none; }
.assistant-log::-webkit-scrollbar { display: none; }
.assistant-welcome { margin: auto 0; padding: 25px 0; text-align: center; }
.assistant-welcome > .icon { width: 38px; height: 38px; color: #96727f; margin-bottom: 24px; }
.assistant-welcome h3 { margin: 0 0 16px; font: 400 29px/1.2 Sora,sans-serif; letter-spacing: -1.5px; }
.assistant-welcome p { margin: 0; font-size: 13px; line-height: 1.8; color: #817479; }
.assistant-message { flex: none; margin: 0; min-width: 0; font-size: 15px; line-height: 1.65; overflow-wrap: anywhere; }
.assistant-message:last-child { margin-bottom: var(--chat-tail-space,0px); }
.assistant-message p { margin: 0; white-space: pre-wrap; }
.assistant-question { align-self: flex-end; max-width: 90%; padding: 11px 16px; border-radius: 22px 22px 5px 22px; background: #e9dfe2; }
.assistant-message.is-entering { opacity: 0; }
.assistant-answer { padding-inline: 2px; }
.assistant-answer.is-typing { font-size: 13px; color: #8c7a83; }
.assistant-controls { flex: none; min-width: 0; padding: 0 18px 16px; }
.assistant-starters { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 12px; }
.assistant-starters button { flex: 1; min-height: 44px; padding: 9px 11px; border: 1px solid #c5afb54a; background: #ffffff70; border-radius: 100px; font-size: 11px; white-space: nowrap; }
.assistant-starters button:hover { background: #fff; }
.assistant-controls:has(textarea:not(:placeholder-shown)) .assistant-starters { display: none; }
.assistant-composer { display: grid; grid-template-columns: minmax(0,1fr) 40px; align-items: end; gap: 10px; min-height: 58px; margin: 0; padding: 8px 9px 8px 18px; background: #e9e3e1; border-radius: 29px; }
.assistant-composer textarea { display: block; width: 100%; height: 40px; min-height: 40px; margin: 0; padding: 8px 0; border: 0; outline: 0; resize: none; color: inherit; background: transparent; font: 400 16px/24px Inter,sans-serif; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y; }
.assistant-composer textarea::placeholder { color: #998a90; opacity: 1; }
.assistant-composer:has(textarea:focus-visible) { outline: 1.5px solid #927480; outline-offset: 3px; }
.assistant-send { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; color: #fff; background: #30272c; border-radius: 50%; }
.assistant-send .icon-stop { display: none; }
.assistant-composer.is-replying .icon-stop { display: block; }
.assistant-composer.is-replying .icon-send { display: none; }
.assistant-note { margin: 11px 0 0; font-size: 9px; text-align: center; color: #8c7b82; line-height: 1.5; }
/* Inline mode sits inside the existing aircraft panel, without changing its geometry. */
.aviation-panel.has-inline-assistant .aircraft-sketch { opacity: 0; pointer-events: none; }
.aeren-assistant.is-inline { position: absolute; z-index: 1; inset: 0; width: 100%; height: 100%; margin: 0; padding-top: 78px; border: 0; border-radius: inherit; color: #edece3; background: #141713; box-shadow: none; }
.is-inline .assistant-heading { border-color: #ffffff0b; }
.is-inline .assistant-mark { background: #34382f; color: #dbd8c8; }
.is-inline .assistant-heading p,.is-inline .assistant-welcome p,.is-inline .assistant-note { color: #a4a799; }
.is-inline .assistant-welcome > .icon { color: #d0b5c2; }
.is-inline .assistant-question { background: #333a2e; }
.is-inline .assistant-starters button { background: #ffffff07; border-color: #ffffff15; }
.is-inline .assistant-starters button:hover,.is-inline .assistant-close:hover { background: #ffffff12; }
.is-inline .assistant-composer { background: #292e24; }
.is-inline .assistant-composer textarea::placeholder { color: #a1a393; }
.is-inline .assistant-send { background: #e5e2d6; color: #20251b; }
.is-inline .assistant-answer.is-typing { color: #a4a799; }
@media (min-width:761px) {
  /* Root overflow locks desktop scroll while keeping the pinned scene behind the blur. */
  .aeren-assistant-open body { position: static; top: auto; overflow: visible; }
  .aeren-assistant:not(.is-inline) { inset: auto 24px 24px auto; margin: 0; height: min(720px,calc(100dvh - 100px)); }
  .site-header { position: relative; margin-right: 0; }
  .site-header .mobile-ai-toggle { position: absolute; top: 10px; right: 12px; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; background: transparent; color: #51404b; border-radius: 50%; }
  .site-header .mobile-ai-toggle .icon { width: 22px; height: 22px; }
  .site-header .mobile-ai-toggle:hover { color: #89707f; }
  .site-header .mobile-ai-toggle:focus-visible { outline-color: #9c858e; }
}
@media (max-width:760px) {
  .aeren-assistant { top: var(--chat-viewport-top,0px); left: 0; right: 0; bottom: auto; margin: 0; width: 100%; height: var(--chat-viewport-height,100dvh); border: 0; border-radius: 0; }
  .assistant-heading { padding-top: max(15px,env(safe-area-inset-top)); }
  .assistant-controls { padding-bottom: max(16px,env(safe-area-inset-bottom)); }
  .aeren-assistant.has-chat-keyboard .assistant-controls { padding-bottom: 12px; }
}
@media (max-width:360px) { .assistant-log { padding: 20px; } .assistant-controls { padding-inline: 12px; } .assistant-starters button { padding-inline: 8px; font-size: 10px; } .assistant-note { font-size: 8px; } }
@media (max-height:540px) { .assistant-heading { min-height: 64px; padding-block: 10px; } .assistant-welcome { padding: 10px 0; } .assistant-welcome > .icon { width: 28px; height: 28px; margin-bottom: 12px; } .assistant-welcome h3 { font-size: 24px; } }
@media (prefers-reduced-motion:no-preference) {
  .aircraft-sketch { transition: opacity 280ms ease; }
  .aeren-assistant[open] { animation: assistant-reveal 380ms cubic-bezier(.2,.75,.2,1) both; }
  .aeren-assistant[open]::backdrop { animation: assistant-backdrop 380ms ease both; }
  @keyframes assistant-reveal { from { opacity: 0; transform: translate3d(0,28px,0); } to { opacity: 1; transform: translate3d(0,0,0); } }
  @keyframes assistant-backdrop { from { opacity: 0; } to { opacity: 1; } }
}

@media (min-width:761px) and (prefers-reduced-motion:no-preference) {
  .aeren-assistant[open]:not(.is-inline) { animation-name: assistant-side-reveal; }
  @keyframes assistant-side-reveal { from { opacity: 0; transform: translate3d(24px,0,0); } to { opacity: 1; transform: none; } }
}
