/* SAEK AI Assistant 0.3. CSS isolated from the site's WordPress theme. */
.saek-chat{--saek-blue:#174b73;--saek-edge:#d4dce5;box-sizing:border-box;font-family:system-ui,-apple-system,"Segoe UI",sans-serif;color:#18283b;font-size:14px;line-height:1.45}
.saek-chat *{box-sizing:border-box}
.saek-chat:not([data-saek-inline]){position:fixed;z-index:2147482000;right:18px;bottom:18px;display:flex;flex-direction:column;align-items:flex-end;gap:12px;pointer-events:none}
.saek-chat:not([data-saek-inline])>*{pointer-events:auto}
.saek-chat [hidden]{display:none!important}
.saek-chat .saek-chat-launcher{display:flex;align-items:center;gap:9px;border:0;border-radius:999px;padding:12px 18px;background:var(--saek-blue);color:white;box-shadow:0 6px 24px rgba(0,0,0,.25);font-weight:700;cursor:pointer;font:inherit;min-height:52px}
.saek-chat .saek-chat-launcher:hover{filter:brightness(1.13)}
.saek-chat .saek-chat-launcher-icon{font-size:23px;line-height:1}
.saek-chat .saek-chat-panel{display:flex;flex-direction:column;width:min(450px,calc(100vw - 24px));height:min(610px,calc(100dvh - 105px));max-height:calc(100dvh - 105px);background:#fff;border:1px solid var(--saek-edge);border-radius:16px;box-shadow:0 12px 42px rgba(5,25,44,.25);overflow:hidden}
.saek-chat[data-saek-inline]{max-width:740px;margin:1.5rem auto}
.saek-chat[data-saek-inline] .saek-chat-launcher{display:none}
.saek-chat[data-saek-inline] .saek-chat-panel{width:100%;height:min(610px,80vh);margin:auto}
.saek-chat .saek-chat-header{position:relative;min-height:74px;background:var(--saek-blue);color:white;padding:13px 54px;display:flex;align-items:center;justify-content:center;flex-shrink:0}
.saek-chat .saek-chat-heading{width:100%;min-width:0;text-align:center}
.saek-chat .saek-chat-heading strong{display:block;font-size:18px;color:white;line-height:1.35}
.saek-chat .saek-chat-heading small{display:block;font-size:11px;opacity:.9;color:white;line-height:1.45}
.saek-chat .saek-chat-close{position:absolute;right:12px;top:50%;transform:translateY(-50%);color:white!important;background:transparent!important;border:1px solid rgba(255,255,255,.5)!important;border-radius:8px;font-size:22px!important;min-width:35px;padding:3px 8px!important;cursor:pointer}
.saek-chat[data-saek-inline] .saek-chat-close{display:none}
.saek-chat .saek-chat-main{display:flex;flex:1;min-height:0;flex-direction:column;padding:11px;gap:8px;background:white}
.saek-chat .saek-ai-status{font-size:11px;line-height:1.4;background:#eef5fb;border:1px solid #d5e5f5;padding:7px 9px;border-radius:8px;white-space:pre-line;max-height:76px;overflow:auto}
.saek-chat .saek-ai-status.saek-error{background:#fff4ed;border-color:#f1c5aa}
.saek-chat .saek-ai-actions{display:flex;gap:6px;flex-wrap:wrap}
.saek-chat button{font-family:inherit;cursor:pointer}
.saek-chat .saek-ai-actions button,.saek-chat .saek-ai-suggestions button{border:1px solid #c9d3de;border-radius:8px;background:#f5f8fc;color:#163b5b;padding:6px 9px;font-size:11px;line-height:1.4}
.saek-chat .saek-ai-actions button:first-child{background:var(--saek-blue);color:#fff;border-color:var(--saek-blue)}
.saek-chat button:disabled{opacity:.55;cursor:not-allowed}
.saek-chat .saek-ai-messages{flex:1;min-height:90px;overflow-y:auto;overscroll-behavior:contain;background:#f7f9fc;border:1px solid #e4e9f0;padding:9px;border-radius:10px;display:flex;flex-direction:column;gap:9px}
.saek-chat .saek-msg{max-width:96%;padding:9px 11px;border-radius:12px;line-height:1.5;font-size:13px;white-space:pre-wrap;overflow-wrap:anywhere}
.saek-chat .saek-msg-bot{background:#e8f0f8;align-self:flex-start}
.saek-chat .saek-msg-user{background:var(--saek-blue);color:white;align-self:flex-end}
.saek-chat .saek-source{display:block;margin-top:6px;font-size:11px;white-space:normal}
.saek-chat .saek-source a{color:#174b73;text-decoration:underline}
.saek-chat .saek-ai-suggestions{display:flex;gap:5px;flex-wrap:wrap;align-items:center}
.saek-chat .saek-ai-suggestions button{flex:0 1 auto;white-space:nowrap}
.saek-chat .saek-ai-suggestions button:hover{background:#e6f0fa}
.saek-chat .saek-ai-compose{display:flex;gap:6px;flex-shrink:0}
.saek-chat .saek-ai-compose input{flex:1;min-width:0;border:1px solid #cbd6e2;border-radius:8px;padding:9px;font-size:13px;background:white;color:#18283b;min-height:40px}
.saek-chat .saek-ai-compose button{background:var(--saek-blue);color:white;border:0;border-radius:8px;font-size:12px;padding:8px 10px;min-width:65px}
.saek-chat .saek-ai-disclaimer{font-size:10px;color:#596979;margin:0;line-height:1.35}
.saek-chat .screen-reader-text{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(max-width:680px){.saek-chat:not([data-saek-inline]){right:8px;bottom:8px}.saek-chat .saek-chat-panel{width:calc(100vw - 16px);height:min(620px,calc(100dvh - 83px));max-height:calc(100dvh - 83px)}.saek-chat .saek-chat-launcher{min-height:48px;padding:10px 14px}.saek-chat .saek-chat-main{padding:9px}.saek-chat .saek-ai-status{max-height:58px}}
@media(prefers-reduced-motion:reduce){.saek-chat *{scroll-behavior:auto!important}}
/* Keep the panel ABOVE the floating launcher when both are visible. */
.saek-chat:not([data-saek-inline]) .saek-chat-panel{order:1}
.saek-chat:not([data-saek-inline]) .saek-chat-launcher{order:2}


/* 0.7.3: four equal-status quick actions, including the current semester schedule. */
@media(max-width:380px){.saek-chat .saek-ai-suggestions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.saek-chat .saek-ai-suggestions button{width:100%;white-space:normal}}

/* 0.7.4: Right-side position lifted above notification toasts. The panel stays
   within the viewport even on short mobile screens; shortcode remains unaffected. */
.saek-chat:not([data-saek-inline]){
  left:auto;
  right:18px;
  bottom:var(--saek-bottom-offset,108px);
  align-items:flex-end;
}
.saek-chat:not([data-saek-inline])[data-saek-corner="left"]{
  left:18px;
  right:auto;
  align-items:flex-start;
}
.saek-chat:not([data-saek-inline]) .saek-chat-panel{
  height:min(610px,calc(100dvh - var(--saek-bottom-offset,108px) - 82px));
  max-height:calc(100dvh - var(--saek-bottom-offset,108px) - 82px);
}
@media(max-width:680px){
  .saek-chat:not([data-saek-inline]){left:auto;right:8px;bottom:var(--saek-bottom-offset,108px)}
  .saek-chat:not([data-saek-inline])[data-saek-corner="left"]{left:8px;right:auto}
  .saek-chat:not([data-saek-inline]) .saek-chat-panel{
    height:min(620px,calc(100dvh - var(--saek-bottom-offset,108px) - 74px));
    max-height:calc(100dvh - var(--saek-bottom-offset,108px) - 74px);
  }
}

.saek-attachments{margin-top:8px;display:flex;flex-direction:column;gap:5px;font-size:12px;line-height:1.45;}
.saek-attachments a{display:block;overflow-wrap:anywhere;color:#144a82;text-decoration:underline;}

/* 0.8.1: clear, accessible asynchronous feedback, no fake model chain of thought. */
.saek-chat .saek-thinking{align-self:flex-start;max-width:96%;padding:10px 12px;border-radius:12px;background:#e8f0f8;color:#234963;display:flex;align-items:center;gap:9px;font-size:12px;line-height:1.5}
.saek-chat .saek-thinking-dots{display:inline-flex;align-items:center;gap:3px}
.saek-chat .saek-thinking-dots i{display:block;width:5px;height:5px;border-radius:50%;background:currentColor;opacity:.28;animation:saek-thinking-pulse 1.15s ease-in-out infinite}
.saek-chat .saek-thinking-dots i:nth-child(2){animation-delay:.15s}
.saek-chat .saek-thinking-dots i:nth-child(3){animation-delay:.3s}
@keyframes saek-thinking-pulse{0%,60%,100%{opacity:.28;transform:translateY(0)}30%{opacity:.9;transform:translateY(-3px)}}
@media(prefers-reduced-motion:reduce){.saek-chat .saek-thinking-dots i{animation:none;opacity:.6}}


/* 0.8.6: AskLipios branding + animated Asclepius avatar */
.saek-chat.saek-chat--asklipios .saek-chat-launcher{padding:10px 16px 10px 12px;gap:10px}
.saek-chat.saek-chat--asklipios .saek-chat-launcher span{display:inline-block;line-height:1.1}
.saek-chat.saek-chat--asklipios .saek-chat-launcher-avatar{width:32px;height:32px;display:block;object-fit:contain;flex:0 0 32px;filter:drop-shadow(0 2px 4px rgba(0,0,0,.18));animation:saek-avatar-float 3.2s ease-in-out infinite}
.saek-chat.saek-chat--asklipios .saek-chat-header{min-height:112px;padding:18px 54px 14px}
.saek-chat.saek-chat--asklipios .saek-chat-heading strong{font-size:21px;letter-spacing:.2px}
.saek-chat.saek-chat--asklipios .saek-chat-mascot{display:flex;justify-content:center;align-items:center;margin-bottom:6px}
.saek-chat.saek-chat--asklipios .saek-chat-mascot-img{width:58px;height:58px;display:block;object-fit:contain;filter:drop-shadow(0 4px 10px rgba(0,0,0,.22));transform-origin:center bottom;animation:saek-avatar-float 3.3s ease-in-out infinite, saek-avatar-sway 4.8s ease-in-out infinite}
@keyframes saek-avatar-float{0%,100%{transform:translateY(0)}50%{transform:translateY(-5px)}}
@keyframes saek-avatar-sway{0%,100%{rotate:0deg}25%{rotate:-2deg}75%{rotate:2deg}}
@media(prefers-reduced-motion:reduce){.saek-chat.saek-chat--asklipios .saek-chat-launcher-avatar,.saek-chat.saek-chat--asklipios .saek-chat-mascot-img{animation:none}}
@media(max-width:680px){.saek-chat.saek-chat--asklipios .saek-chat-header{min-height:104px;padding:16px 50px 12px}.saek-chat.saek-chat--asklipios .saek-chat-mascot-img{width:52px;height:52px}.saek-chat.saek-chat--asklipios .saek-chat-heading strong{font-size:19px}}

/* 0.8.7: mascot centered ABOVE the AskLipios title (not beside it). */
.saek-chat.saek-chat--asklipios .saek-chat-header{flex-direction:column;min-height:130px;padding:10px 48px 12px;gap:0}
.saek-chat.saek-chat--asklipios .saek-chat-mascot{width:100%;margin:0 0 4px}
.saek-chat.saek-chat--asklipios .saek-chat-heading{flex:none}
@media(max-width:680px){.saek-chat.saek-chat--asklipios .saek-chat-header{min-height:124px;padding:10px 48px 10px}}
