/* shaheen-console.css — the animated Shaheen AI assistant console (home page section + shaheen-ai page).
   Markup: .sac[data-sac] > .sac-top, .sac-feed, .sac-chips (button[data-q]), .sac-input. Driven by shaheen-console.js. */
.sac { position: relative; background: rgba(255,255,255,.97); border-radius: 22px; overflow: hidden; color: #1E1B4B; text-align: left;
  box-shadow: 0 40px 90px -30px rgba(15,10,60,.65), 0 0 0 1px rgba(167,139,250,.35); display: flex; flex-direction: column; min-width: 0; }
.sac::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; z-index: 2;
  background: linear-gradient(90deg, #7C3AED, #EC4899, #F59E0B, #10B981, #3B82F6, #7C3AED); background-size: 200% 100%; animation: sacSlide 4s linear infinite; }
@keyframes sacSlide { to { background-position: 200% 0; } }
.sac-top { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid #EEF0FF; background: linear-gradient(180deg, #FAF8FF, #fff); }
.sac-top img { width: 34px; height: 34px; border-radius: 10px; }
.sac-top b { display: block; font-size: .92rem; font-weight: 800; }
.sac-top small { display: flex; align-items: center; gap: 6px; font-size: .72rem; color: #6B7280; font-weight: 600; }
.sac-top small i { width: 7px; height: 7px; border-radius: 50%; background: #10B981; box-shadow: 0 0 0 0 rgba(16,185,129,.6); animation: sacPing 1.8s infinite; }
@keyframes sacPing { 70% { box-shadow: 0 0 0 7px rgba(16,185,129,0) } 100% { box-shadow: 0 0 0 0 rgba(16,185,129,0) } }
.sac-top .sac-mode { margin-left: auto; font-size: .66rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #7C3AED;
  background: #F3E8FF; padding: 4px 9px; border-radius: 99px; }
.sac-feed { height: 330px; overflow: hidden; padding: 16px; display: flex; flex-direction: column; gap: 10px; justify-content: flex-end;
  background: radial-gradient(circle at 100% 0, #F5F3FF, transparent 50%), #fff; }
.sac-msg { max-width: 92%; font-size: .86rem; line-height: 1.5; animation: sacIn .45s cubic-bezier(.34,1.56,.64,1) both; }
@keyframes sacIn { from { opacity: 0; transform: translateY(12px) scale(.96) } }
.sac-msg.me { align-self: flex-end; background: linear-gradient(135deg, #4F46E5, #7C3AED); color: #fff; padding: 9px 13px; border-radius: 16px 16px 4px 16px; font-weight: 600; }
.sac-msg.ai { align-self: flex-start; display: flex; gap: 8px; }
.sac-msg.ai > img { width: 26px; height: 26px; border-radius: 8px; flex: 0 0 auto; margin-top: 2px; }
.sac-bub { background: #F6F5FF; border: 1px solid #ECE9FE; padding: 10px 13px; border-radius: 4px 16px 16px 16px; min-width: 0; }
.sac-dots { display: inline-flex; gap: 4px; padding: 4px 0; }
.sac-dots span { width: 7px; height: 7px; border-radius: 50%; background: #A78BFA; animation: sacDot 1s infinite ease-in-out; }
.sac-dots span:nth-child(2) { animation-delay: .15s; background: #EC4899; } .sac-dots span:nth-child(3) { animation-delay: .3s; background: #F59E0B; }
@keyframes sacDot { 0%,80%,100% { transform: translateY(0); opacity: .5 } 40% { transform: translateY(-5px); opacity: 1 } }
.sac-tool { display: inline-flex; align-items: center; gap: 6px; font-size: .7rem; font-weight: 700; color: #7C3AED; margin-bottom: 6px; }
.sac-tool::before { content: "⚙"; display: inline-block; animation: sacSpin 1.2s linear infinite; }
@keyframes sacSpin { to { transform: rotate(360deg) } }
.sac-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 8px; }
.sac-stats div { background: #fff; border: 1px solid #ECE9FE; border-radius: 10px; padding: 7px 4px; text-align: center; }
.sac-stats b { display: block; font-size: 1rem; font-weight: 900; background: linear-gradient(135deg, var(--a, #4F46E5), var(--b, #EC4899)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sac-stats span { font-size: .6rem; color: #6B7280; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.sac-bub table { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: .76rem; background: #fff; border-radius: 10px; overflow: hidden; }
.sac-bub th { background: #EDE9FE; color: #4C1D95; text-align: left; padding: 5px 8px; font-size: .66rem; text-transform: uppercase; letter-spacing: .04em; }
.sac-bub td { padding: 5px 8px; border-top: 1px solid #F1F0FB; }
.sac-bub td:last-child, .sac-bub th:last-child { text-align: right; }
.sac-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.sac-acts span { font-size: .68rem; font-weight: 700; padding: 4px 9px; border-radius: 99px; background: #fff; border: 1px solid #DDD6FE; color: #5B21B6; }
.sac-card { display: flex; gap: 10px; align-items: center; margin-top: 8px; background: #fff; border: 1px solid #ECE9FE; border-radius: 12px; padding: 8px; }
.sac-card .ph { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #fff; font-weight: 900; font-size: .8rem;
  background: linear-gradient(135deg, #3B82F6, #8B5CF6); flex: 0 0 auto; }
.sac-card b { font-size: .84rem; } .sac-card small { display: block; font-size: .7rem; color: #6B7280; }
.sac-kv { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px; margin-top: 6px; font-size: .74rem; }
.sac-kv span { color: #6B7280; } .sac-kv b { text-align: right; }
.sac-doc { margin-top: 8px; background: #fff; border: 1px solid #ECE9FE; border-radius: 10px; padding: 9px 11px; font-size: .76rem; color: #374151;
  font-family: Georgia, 'Times New Roman', serif; line-height: 1.55; }
.sac-doc .hd { font-family: Inter, sans-serif; font-weight: 800; font-size: .7rem; color: #4C1D95; text-transform: uppercase; letter-spacing: .05em;
  border-bottom: 1px dashed #DDD6FE; padding-bottom: 5px; margin-bottom: 6px; }
.sac-chips { display: flex; gap: 6px; padding: 10px 12px 0; overflow-x: auto; scrollbar-width: none; }
.sac-chips::-webkit-scrollbar { display: none; }
.sac-chips button { flex: 0 0 auto; border: 1px solid #DDD6FE; background: #fff; color: #5B21B6; font: 700 .74rem Inter, sans-serif;
  padding: 7px 11px; border-radius: 99px; cursor: pointer; transition: transform .2s; }
.sac-chips button:hover { transform: translateY(-2px); }
.sac-chips button.on { background: linear-gradient(135deg, #4F46E5, #DB2777); color: #fff; border-color: transparent; }
.sac-input { display: flex; align-items: center; gap: 8px; margin: 10px 12px 12px; padding: 9px 9px 9px 14px; border-radius: 14px; background: #F6F5FF; border: 1px solid #ECE9FE; }
.sac-input .t { flex: 1; min-width: 0; font-size: .84rem; color: #1E1B4B; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.sac-input .t:empty::before { content: "Ask Shaheen AI anything about your school…"; color: #9CA3AF; font-weight: 500; }
.sac-input .mic, .sac-input .go { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex: 0 0 auto; font-size: .9rem; }
.sac-input .mic { background: #fff; border: 1px solid #E5E7EB; }
.sac-input .go { background: linear-gradient(135deg, #4F46E5, #DB2777); color: #fff; }
.sac-note { font-size: .66rem; color: #9CA3AF; text-align: center; padding: 0 12px 10px; }
@media (max-width: 560px) {
  .sac-feed { height: 270px; padding: 12px; }
  .sac-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .sac::before, .sac-msg, .sac-dots span, .sac-tool::before, .sac-top small i { animation: none; }
}
