/* Ask X3 — the same vertical chat window on every X3 page. */
.x3ask { position: fixed; right: 20px; bottom: 20px; z-index: 90; font-family: var(--x3-font-body), system-ui, sans-serif; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; pointer-events: none; }
.x3ask > * { pointer-events: auto; }
.x3ask *, .x3ask *::before { box-sizing: border-box; }
.x3ask__bubble { display: inline-flex; align-items: center; gap: 9px; min-height: 52px; padding: 0 20px 0 16px; border: 0; border-radius: 999px; background: #00B2FD; color: #04121d; font: 800 15px/1 var(--x3-font-body), system-ui, sans-serif; cursor: pointer; box-shadow: 0 16px 40px -12px rgba(0,178,253,.75), 0 0 0 1px rgba(255,255,255,.12) inset; }
.x3ask__bubble:hover { background: #5AD1FF; }
.x3ask__bubble svg { width: 22px; height: 22px; }
.x3ask button:focus-visible, .x3ask textarea:focus-visible { outline: 2px solid #5AD1FF; outline-offset: 2px; }
.x3ask__window { width: min(400px, calc(100vw - 24px)); height: min(620px, calc(100vh - 110px)); display: flex; flex-direction: column; background: #05070a; border: 1px solid rgba(0,178,253,.45); border-top: 3px solid #00B2FD; border-radius: 6px 6px 18px 18px; box-shadow: 0 40px 100px -30px #000, 0 0 70px -30px rgba(0,178,253,.55); overflow: hidden; color: #F4F8FE; }
.x3ask__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 14px 14px 12px 16px; border-bottom: 1px solid #161b22; }
.x3ask__head strong { display: block; font: 900 18px/1.1 var(--x3-font-display), system-ui, sans-serif; color: #fff; }
.x3ask__head span { display: block; margin-top: 4px; font-size: 12.5px; color: #D3DFEE; }
.x3ask__close { width: 36px; height: 36px; flex: none; border: 1px solid #242c37; border-radius: 10px; background: transparent; color: #fff; font-size: 22px; line-height: 1; cursor: pointer; }
.x3ask__close:hover { border-color: #00B2FD; }
.x3ask__actions { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 12px; border-bottom: 1px solid #161b22; }
.x3ask__actions button { min-height: 32px; padding: 0 11px; border: 1px solid #242c37; border-radius: 999px; background: #0A0C10; color: #F4F8FE; font: 700 12px/1 var(--x3-font-body), system-ui, sans-serif; cursor: pointer; }
.x3ask__actions button:hover:not(:disabled) { border-color: #00B2FD; color: #5AD1FF; }
.x3ask__actions button:disabled, .x3ask__empty button:disabled { opacity: .55; cursor: default; }
.x3ask__thread { flex: 1; min-height: 0; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.x3ask__empty p { margin: 0 0 10px; font-size: 14px; line-height: 1.5; color: #D3DFEE; }
.x3ask__empty ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.x3ask__empty button { width: 100%; text-align: left; min-height: 40px; padding: 9px 12px; border: 1px solid #242c37; border-left: 3px solid #00B2FD; border-radius: 10px; background: #0A0C10; color: #F4F8FE; font: 500 13.5px/1.35 var(--x3-font-body), system-ui, sans-serif; cursor: pointer; }
.x3ask__empty button:hover:not(:disabled) { border-color: #00B2FD; }
.x3ask__msg { max-width: 92%; padding: 10px 13px; border-radius: 14px; font-size: 14px; line-height: 1.55; }
.x3ask__msg p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.x3ask__msg--user { align-self: flex-end; background: #00B2FD; color: #04121d; border-bottom-right-radius: 4px; font-weight: 600; }
.x3ask__msg--x3 { align-self: flex-start; background: #0A0C10; border: 1px solid #242c37; color: #F4F8FE; border-bottom-left-radius: 4px; }
.x3ask__msg--error { border-color: rgba(251,113,133,.6); }
.x3ask__thinking p { color: #5AD1FF; }
.x3ask__cite { display: inline-block; margin-top: 8px; padding: 3px 9px; border: 1px solid rgba(0,178,253,.55); border-radius: 4px; background: rgba(0,178,253,.16); color: #67E8F9; font: 700 12px/1.4 var(--x3-font-tech), ui-monospace, monospace; }
.x3ask__form { display: flex; gap: 8px; padding: 10px 12px 8px; border-top: 1px solid #161b22; }
.x3ask__form textarea { flex: 1; min-width: 0; resize: none; padding: 10px 12px; border: 1px solid #242c37; border-radius: 12px; background: #000; color: #fff; font: 500 14px/1.4 var(--x3-font-body), system-ui, sans-serif; }
.x3ask__form textarea::placeholder { color: #A9B9CD; }
.x3ask__form button { align-self: stretch; min-width: 64px; border: 0; border-radius: 12px; background: #00B2FD; color: #04121d; font: 800 14px/1 var(--x3-font-body), system-ui, sans-serif; cursor: pointer; }
.x3ask__form button:disabled { background: #1b2530; color: #A9B9CD; cursor: default; }
.x3ask__note { margin: 0; padding: 0 14px 12px; font-size: 11.5px; color: #A9B9CD; }
.x3ask__sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 520px) { .x3ask { right: 12px; bottom: 12px; } .x3ask__bubble span { display: none; } .x3ask__bubble { padding: 0; width: 52px; justify-content: center; } }
@media print { .x3ask { display: none; } }
.x3ask__msg p.x3ask__text { white-space: normal; }
