/* Alan, the assistant shared by every site of Ismael Sarmiento (same look as IsAcademy /academy/css/main.css § 7).
   Floating pill with the avatar, a chat panel with typing dots, suggestion chips and action buttons. */
.as-avatar { display: inline-block; flex: none; }
.as-avatar svg { width: 100%; height: 100%; display: block; }
.av-head { animation: breathe 4.5s ease-in-out infinite; transform-origin: 100px 150px; }
.av-eyes { animation: eyeblink 5s infinite; transform-origin: 100px 93px; }
.av-open { opacity: 0; }
.talking .av-open { animation: talkmouth .32s ease-in-out infinite alternate; }
.talking .av-smile { animation: talksmile .32s ease-in-out infinite alternate; }
@keyframes breathe { 50% { transform: translateY(-1.5px); } }
@keyframes eyeblink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
@keyframes talkmouth { from { opacity: 0; } to { opacity: 1; } }
@keyframes talksmile { from { opacity: 1; } to { opacity: 0; } }

.assistant-fab { position: fixed; right: 18px; bottom: 18px; z-index: 40; display: flex; align-items: center; gap: 10px; padding: 6px 16px 6px 6px;
  border-radius: 999px; border: 1px solid rgba(226, 178, 92, .6); background: var(--ink-850); color: var(--cream-200); font-size: 15px; font-weight: 500;
  box-shadow: 0 14px 40px rgba(10, 14, 40, .35); transition: transform .25s var(--ease-out), box-shadow .25s ease, opacity .25s ease, visibility .25s; animation: fabin .6s ease backwards; }
.assistant-fab.fab-tucked, .assistant-fab.fab-away { opacity: 0; visibility: hidden; transform: translateY(24px) scale(.9); pointer-events: none; }
.assistant-fab:hover { transform: translateY(-2px); box-shadow: 0 18px 44px rgba(10, 14, 40, .42), 0 0 0 4px var(--gold-glow); }
.assistant-fab .as-avatar { width: 52px; height: 52px; }
@keyframes fabin { from { opacity: 0; transform: translateY(16px) scale(.9); } }

.assistant-panel { position: fixed; right: 18px; bottom: 90px; z-index: 41; width: min(380px, calc(100vw - 24px)); height: min(560px, calc(100dvh - 120px));
  display: flex; flex-direction: column; border-radius: 22px; overflow: hidden; background: var(--surface); border: 1px solid var(--line);
  box-shadow: 0 30px 80px rgba(10, 14, 40, .35); opacity: 0; transform: translateY(14px) scale(.98); transition: opacity .25s ease, transform .25s var(--ease-out); }
.assistant-panel.open { opacity: 1; transform: none; }
.as-head { display: flex; gap: 12px; align-items: center; padding: 14px 14px 14px 16px; background: var(--ink-850); color: var(--cream-200); }
.as-head .as-avatar { width: 56px; height: 56px; }
.as-head div { flex: 1; min-width: 0; }
.as-name { margin: 0; font-weight: 600; font-size: 18px; display: flex; align-items: center; gap: 8px; }
.as-badge { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--gold-400); color: var(--gold-400); }
.as-sub { margin: 0; font-size: 12.5px; color: var(--mist-300); }
.as-head .btn { color: var(--cream-200); border-color: rgba(255, 255, 255, .2); }
.as-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.as-log .msg { animation: msgin .3s var(--ease-out) both; }
@keyframes msgin { from { opacity: 0; transform: translateY(6px); } }
.as-log .msg p { margin: 0; padding: 10px 14px; border-radius: 16px; font-size: 14.5px; line-height: 1.5; max-width: 88%; }
.as-log .msg-bot p { background: var(--bg-alt); color: var(--text); border-bottom-left-radius: 6px; }
.as-log .msg-user { display: flex; justify-content: flex-end; }
.as-log .msg-user p { background: var(--gold); color: var(--on-gold); border-bottom-right-radius: 6px; }
.as-log .msg-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.as-log .typing p { display: inline-flex; gap: 4px; }
.as-log .typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--text-2); animation: dots 1s infinite; }
.as-log .typing span:nth-child(2) { animation-delay: .15s; } .as-log .typing span:nth-child(3) { animation-delay: .3s; }
@keyframes dots { 50% { opacity: .25; transform: translateY(-2px); } }
.as-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 10px; }
.as-chips .chip { flex: 0 1 auto; text-align: left; font-size: 13px; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); background: transparent;
  transition: border-color .2s, background .2s; }
.as-chips .chip:hover { border-color: var(--gold); background: rgba(200, 149, 63, .08); }
.as-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.as-form input { flex: 1; min-width: 0; font: inherit; font-size: 15px; padding: 10px 14px; border-radius: var(--radius-sm); border: 1px solid var(--control-border);
  background: var(--bg); color: var(--text); transition: border-color .2s, box-shadow .2s; }
.as-form input::placeholder { color: var(--control-placeholder); opacity: 1; }
.as-form input:focus-visible { outline: none; border-color: var(--gold-text); box-shadow: 0 0 0 4px var(--gold-glow); }

@media (max-width: 640px) {
  .assistant-fab { right: 12px; bottom: 12px; padding: 5px; }
  .assistant-fab .fab-label { display: none; }
  .assistant-panel { right: 0; left: 0; bottom: 0; width: 100%; height: min(82dvh, 640px); border-radius: 22px 22px 0 0; }
}
@media (prefers-reduced-motion: reduce) {
  .av-head, .av-eyes { animation: none; }
}
