/*
 * edu_chat.css  —  Education Assistant Chat Widget Styles
 *
 * Structure:
 *   1. Host container & layout
 *   1b. Header strip, AI notice
 *   2. nlux theme overrides   (scoped to #edu-chat-container)
 *   2b. Empty chat (welcome, sample questions)
 *   3. Disclaimer (the full AI notice on the empty chat)
 *   3b. Lead strip
 *   4. Source badges
 *   5. Freshness warning
 *   6. Escalation button (inline, inside message)
 *   7. Choice buttons (clarification)
 *   8. Counselor footer (appears after the second answer)
 *   9. Responsive
 *
 * Color tokens use the Nexus palette from the architecture document.
 * Override via CSS custom properties on #edu-chat-container.
 */

/* ─── § 1. Host container ───────────────────────────────────────────────── */

#edu-chat-container {
  --edu-primary:       #01696F;
  --edu-primary-dark:  #0C4E54;
  --edu-tint:          #E6F0F0;   /* light teal: figures, counts, the counselor button */
  --edu-tint-soft:     #F2F7F7;   /* the program cards' ground */
  --edu-bg:            #F8F6F1;
  --edu-surface:       #F9F8F5;
  --edu-border:        #D4D1CA;
  --edu-text:          #28251D;
  --edu-text-soft:     #3D5355;
  --edu-text-muted:    #6B6A65;
  --edu-text-faint:    #BAB9B4;
  --edu-warning-bg:    #FFF7ED;
  --edu-warning-text:  #964219;
  --edu-warning-border:#F3A96A;
  --edu-radius:        14px;
  --edu-radius-sm:     8px;
  --edu-shadow-soft:   0 1px 2px rgba(40, 37, 29, 0.05), 0 4px 14px -4px rgba(40, 37, 29, 0.08);
  --edu-font:          -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  container:      edu-chat / inline-size;
  display:        flex;
  flex-direction: column;
  height:         100%;
  font-family:    var(--edu-font);
  color:          var(--edu-text);
  background:     var(--edu-bg);
  border:         1px solid rgba(1, 105, 111, 0.14);
  border-radius:  18px;
  box-shadow:     0 1px 2px rgba(12, 78, 84, 0.06), 0 14px 32px -10px rgba(12, 78, 84, 0.22);
  overflow:       hidden;
}


/* ─── § 1b. Header strip, AI notice ─────────────────────────────────────── */

.edu-chat-top {
  flex-shrink: 0;
}

.edu-chat-header {
  display:     flex;
  align-items: center;
  gap:         12px;
  height:      60px;
  padding:     0 4px 0 14px;
  background:  linear-gradient(90deg, var(--edu-tint), #F3F7F6);
  box-sizing:  border-box;
}

.edu-chat-header__owl {
  display:         flex;
  align-items:     center;
  justify-content: center;
  flex-shrink:     0;
  width:           40px;
  height:          40px;
  border-radius:   50%;
  background:      #fff;
  box-shadow:      0 1px 3px rgba(12, 78, 84, 0.12);
}

.edu-chat-header__owl .edu-owl {
  width:  28px;
  height: 28px;
}

.edu-chat-header__titles {
  display:        flex;
  flex-direction: column;
  flex:           1;
  min-width:      0;
}

.edu-chat-header__name {
  font-size:   15.5px;
  font-weight: 650;
  line-height: 1.25;
}

.edu-chat-header__tagline {
  font-size:     12.5px;
  color:         var(--edu-text-soft);
  line-height:   1.35;
  white-space:   nowrap;
  overflow:      hidden;
  text-overflow: ellipsis;
}

.edu-chat-header__info {
  display:         flex;
  align-items:     center;
  justify-content: center;
  flex-shrink:     0;
  width:           44px;
  height:          44px;
  padding:         0;
  border:          0;
  border-radius:   12px;
  background:      transparent;
  color:           var(--edu-primary);
  font-size:       19px;
  cursor:          pointer;
}

.edu-chat-header__info:hover,
.edu-chat-header__info[aria-expanded="true"] {
  background: rgba(1, 105, 111, 0.08);
}

.edu-chat-header__info:focus-visible {
  outline:        2px solid var(--edu-primary);
  outline-offset: -2px;
}

/* the short notice appears once the chat has started (edu_chat.js) */
.edu-chat-notice {
  display:       none;
  align-items:   center;
  height:        28px;
  padding:       0 14px;
  background:    #F3F7F6;
  border-bottom: 1px solid #DCE9E9;
  font-size:     12px;
  color:         var(--edu-text-soft);
  white-space:   nowrap;
  overflow:      hidden;
  text-overflow: ellipsis;
  box-sizing:    border-box;
}

#edu-chat-container.edu-chat--started .edu-chat-notice {
  display: block;
  line-height: 27px;
}

.edu-chat-about {
  padding:       10px 14px;
  background:    #EEF4F3;
  border-bottom: 1px solid #DCE9E9;
  font-size:     12.5px;
  line-height:   1.55;
  color:         var(--edu-text-soft);
}

.edu-chat-about[hidden] {
  display: none;
}

.edu-chat-about p {
  margin: 0;
}

@container edu-chat (min-width: 560px) {
  .edu-chat-header { padding: 0 8px 0 16px; }
  .edu-chat-notice { padding: 0 16px; }
  .edu-chat-about  { padding: 10px 16px; }
}


/* ─── § 1a. Highlighted outline (the admin switch) ──────────────────────── */
/* A 2px outline in the primary color that slowly breathes, and a soft ring
   of the same color circling the box once every 8s. The ring is a conic
   gradient on ::before, masked down to its outer 3px; the angle is a
   registered property so it can animate. Browsers without @property show
   the ring still. */

@property --edu-ring-angle {
  syntax:        '<angle>';
  inherits:      false;
  initial-value: 0deg;
}

#edu-chat-container.edu-chat--highlight {
  position:     relative;
  border:       2px solid var(--edu-primary);
  animation:    edu-highlight-breathe 3s ease-in-out infinite;
}

#edu-chat-container.edu-chat--highlight::before {
  content:        "";
  position:       absolute;
  inset:          0;
  border-radius:  inherit;
  padding:        3px;
  background:     conic-gradient(from var(--edu-ring-angle),
                    transparent 0 65%,
                    rgba(1, 105, 111, 0.25) 82%,
                    var(--edu-primary) 94%,
                    transparent 100%);
  -webkit-mask:   linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask:           linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
  z-index:        1;
  animation:      edu-highlight-ring 8s linear infinite;
}

@keyframes edu-highlight-breathe {
  0%, 100% { border-color: var(--edu-primary); }
  50%      { border-color: rgba(1, 105, 111, 0.4); }
}

@keyframes edu-highlight-ring {
  to { --edu-ring-angle: 360deg; }
}

@media (prefers-reduced-motion: reduce) {
  #edu-chat-container.edu-chat--highlight {
    animation: none;
  }
  #edu-chat-container.edu-chat--highlight::before {
    display: none;
  }
}


/* ─── § 2. nlux theme overrides ─────────────────────────────────────────── */
/*
 * nlux renders with the "nova" theme. These overrides blend it into the
 * Nexus palette without fighting the library's layout logic. The nlux
 * avatars and names are hidden: the header strip carries the owl, and the
 * answers get the full width.
 */

#edu-chat-container .nlux-AiChat-root {
  flex:       1;
  min-height: 0;
  overflow:   hidden;
  background: var(--edu-bg);

  --nlux-ChatRoom--BackgroundColor:  var(--edu-bg);
  --nlux-ChatRoom-Divider--BorderWidth: 0;
  --nlux-ChatItem-Message--Gap:      0;
}

#edu-chat-container .nlux-conversation-container {
  padding: 14px 10px 16px;
}

#edu-chat-container .nlux-comp-chatItem {
  margin-bottom: 14px;
  padding:       0;
  animation:     edu-rise 0.42s ease-out both;
}

#edu-chat-container .nlux-comp-chatItem-participantInfo {
  display: none;
}

#edu-chat-container .nlux-comp-chatItem > .nlux-comp-message {
  font-size: 0.9375rem;    /* 15px */
  min-width: 0;
}

#edu-chat-container .nlux-markdown-container > * {
  margin: 0 0 0.75em;
}

#edu-chat-container .nlux-markdown-container > :last-child {
  margin-bottom: 0;
}

/* User message: a teal bubble on the right that hugs its text */
#edu-chat-container .nlux-comp-chatItem--sent > .nlux_msg_sent {
  flex:          0 1 auto;
  max-width:     80%;
  padding:       10px 16px;
  background:    var(--edu-primary);
  color:         #fff;
  border:        0;
  border-radius: 18px 18px 6px 18px;
  line-height:   1.5;
  box-shadow:    0 2px 8px -2px rgba(1, 105, 111, 0.35);
}

/* Bot message: a white bubble, no border, soft shadow */
#edu-chat-container .nlux-comp-chatItem--received > .nlux_msg_received {
  padding:       14px 14px 4px;
  background:    #fff;
  color:         var(--edu-text);
  border:        0;
  border-radius: 18px 18px 18px 6px;
  line-height:   1.65;
  box-shadow:    var(--edu-shadow-soft);
}

/* Bold text in answers on the light teal; drop this rule to go back to plain bold */
#edu-chat-container .nlux_msg_received .nlux-markdown-container strong {
  padding:       1px 5px;
  border-radius: 5px;
  background:    var(--edu-tint);
  color:         var(--edu-primary-dark);
  font-weight:   650;
}

/* Inline images inside assistant messages (school logos in markdown) */
#edu-chat-container .nlux_msg_received .nlux-markdown-container img {
  height:         24px;
  width:          auto;
  max-width:      48px;
  vertical-align: middle;
  margin-right:   0.4em;
  object-fit:     contain;
}

/* Links inside assistant messages — underline so they read as clickable */
#edu-chat-container .nlux_msg_received a {
  color:            var(--edu-primary);
  text-decoration:  underline;
}
#edu-chat-container .nlux_msg_received a:hover {
  text-decoration:  none;
}

/* Composer: a pill field with a round teal send button */
#edu-chat-container .nlux-composer-container {
  min-height:  0;
  padding:     9px 10px 10px;
  background:  #fff;
  border-top:  1px solid #ECE9E2;
  box-sizing:  border-box;
}

#edu-chat-container .nlux-comp-composer {
  align-items:   flex-end;
  gap:           4px;
  min-height:    52px;
  padding:       0 3px 0 16px;
  background:    var(--edu-bg);
  border:        1px solid var(--edu-border);
  border-radius: 26px;
  box-sizing:    border-box;
}

#edu-chat-container .nlux-comp-composer:focus-within {
  border-color: var(--edu-primary);
  box-shadow:   0 0 0 2px rgba(1, 105, 111, 0.15);
}

#edu-chat-container .nlux-comp-composer > textarea {
  min-height:  50px;
  max-height:  122px;
  padding:     13px 0;
  font-family: var(--edu-font);
  font-size:   16px;           /* below 16px iOS zooms in on focus */
  line-height: 24px;
  color:       var(--edu-text);
  background:  transparent;
  border:      0;
  cursor:      text;
}

/* !important: the site's eduguideND.css makes every placeholder black !important */
#edu-chat-container .nlux-comp-composer > textarea::placeholder {
  color: var(--edu-text-muted) !important;
}

#edu-chat-container .nlux-comp-composer > button {
  flex-shrink: 0;
  width:       44px;
  height:      44px;
  margin:      3px 0;
  padding:     0;
  border:      0;
  background:  transparent;
  color:       #fff;
}

#edu-chat-container .nlux-comp-composer > button > .nlux-comp-sendIcon {
  display:         flex;
  align-items:     center;
  justify-content: center;
  width:           40px;
  max-width:       none;
  height:          40px;
  border-radius:   50%;
  background:      var(--edu-primary);
  box-shadow:      0 2px 6px -1px rgba(1, 105, 111, 0.45);
}

#edu-chat-container .nlux-comp-composer > button > .nlux-comp-sendIcon > .nlux-comp-sendIcon-container {
  display: none;
}

/* fa-arrow-up */
#edu-chat-container .nlux-comp-composer > button > .nlux-comp-sendIcon::before {
  content:     "\f062";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size:   17px;
  color:       #fff;
}

#edu-chat-container .nlux-comp-composer > button:hover > .nlux-comp-sendIcon {
  background: var(--edu-primary-dark);
}

#edu-chat-container .nlux-comp-composer > button:disabled > .nlux-comp-sendIcon {
  opacity:    0.55;
  box-shadow: none;
}

/* while an answer comes, nlux's spinner takes the send icon's place */
#edu-chat-container .nlux-composer--submitting > button > .nlux-comp-sendIcon,
#edu-chat-container .nlux-composer--waiting > button > .nlux-comp-sendIcon {
  display: none;
}

#edu-chat-container .nlux-composer--submitting > button > .nlux-comp-messageLoader,
#edu-chat-container .nlux-composer--waiting > button > .nlux-comp-messageLoader {
  display:       flex;
  width:         40px;
  height:        40px;
  border-radius: 50%;
  background:    var(--edu-primary);
  color:         #fff;
  opacity:       0.55;
}

@container edu-chat (min-width: 560px) {
  #edu-chat-container .nlux-conversation-container { padding: 14px 18px 16px; }
  #edu-chat-container .nlux-comp-chatItem--received > .nlux_msg_received {
    margin-right: 36px;
    padding:      14px 18px 4px;
  }
  #edu-chat-container .nlux-composer-container { padding: 10px 14px; }
  #edu-chat-container .nlux-comp-composer { padding-left: 18px; }
  #edu-chat-container .nlux-comp-composer > textarea { font-size: 15px; }
}

@keyframes edu-rise {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  #edu-chat-container .nlux-comp-chatItem,
  #edu-chat-container .nlux-comp-conversationStarter,
  #edu-chat-container .edu-card,
  #edu-chat-container .edu-cards-hedge,
  #edu-chat-container .edu-cards-actions,
  #edu-chat-container .edu-cards-footer,
  #edu-chat-container .edu-search-indicator {
    animation: none;
  }
}


/* ─── § 2b. Empty chat (welcome, sample questions) ───────────────────────── */
/* nlux's welcome message carries the greeting (its persona name and tagline);
   the sample questions are its conversation starters, each shown whole with
   the icon of its kind, and the full AI notice sits at the bottom. */

#edu-chat-container .nlux-launchPad-container {
  padding:    18px 14px 14px;
  overflow-y: auto;
  box-sizing: border-box;
}

#edu-chat-container .nlux-launchPad-container > .nlux-comp-welcomeMessage {
  flex:           0 0 auto;
  align-items:    flex-start;
  justify-content: flex-start;
  height:         auto;
  gap:            6px;
  margin:         0 4px 16px;
}

#edu-chat-container .nlux-comp-welcomeMessage > .nlux-comp-avatar {
  display: none;
}

#edu-chat-container .nlux-comp-welcomeMessage-personaName {
  font-size:   22px;
  font-weight: 650;
  line-height: 1.3;
  color:       var(--edu-text);
}

#edu-chat-container .nlux-comp-welcomeMessage-text {
  font-size:   15px;
  line-height: 1.55;
  color:       #5C5B56;
}

#edu-chat-container .nlux-launchPad-container > .nlux-conversationStarters-container {
  flex:       0 0 auto;
  overflow:   visible;
  margin-bottom: 12px;
}

#edu-chat-container .nlux-conversationStarters-container > .nlux-comp-conversationStarters {
  display:        flex;
  flex-direction: column;
  align-items:    stretch;
  width:          100%;
  min-width:      0;
  padding:        0;
  gap:            8px;
}

#edu-chat-container .nlux-conversationStarters-container > .nlux-comp-conversationStarters > .nlux-comp-conversationStarter {
  flex-direction: row;
  align-items:    center;
  justify-content: flex-start;
  gap:            12px;
  width:          100%;
  height:         auto;
  min-height:     54px;
  padding:        8px 14px 8px 10px;
  border:         0;
  border-radius:  16px;
  background:     #fff;
  box-shadow:     0 1px 2px rgba(40, 37, 29, 0.05), 0 4px 12px -4px rgba(40, 37, 29, 0.1);
  font-family:    var(--edu-font);
  font-size:      15px;
  line-height:    1.4;
  color:          var(--edu-primary-dark);
  text-align:     left;
  animation:      edu-rise 0.42s ease-out both;
  transition:     box-shadow 0.15s, background 0.15s;
}

#edu-chat-container .nlux-comp-conversationStarter:nth-child(2) { animation-delay: 0.12s; }
#edu-chat-container .nlux-comp-conversationStarter:nth-child(3) { animation-delay: 0.24s; }

#edu-chat-container .nlux-comp-conversationStarters > .nlux-comp-conversationStarter:hover {
  background: #FBFDFD;
  box-shadow: 0 0 0 1px rgba(1, 105, 111, 0.35), 0 4px 12px -4px rgba(40, 37, 29, 0.12);
}

/* nlux's empty icon slot */
#edu-chat-container .nlux-comp-conversationStarter > div:empty {
  display: none;
}

/* the whole question, never cut */
#edu-chat-container .nlux-comp-conversationStarters > .nlux-comp-conversationStarter > .nlux-comp-conversationStarter-prompt {
  display:            block;
  overflow:           visible;
  -webkit-line-clamp: none;
  line-height:        1.4;
}

.edu-starter-icon {
  display:         flex;
  align-items:     center;
  justify-content: center;
  flex-shrink:     0;
  width:           36px;
  height:          36px;
  border-radius:   50%;
  background:      var(--edu-tint);
  color:           var(--edu-primary);
  font-size:       15px;
}

@container edu-chat (min-width: 560px) {
  #edu-chat-container .nlux-launchPad-container { padding: 30px 22px 16px; }
  #edu-chat-container .nlux-launchPad-container > .nlux-comp-welcomeMessage { margin: 0 2px 22px; }
  #edu-chat-container .nlux-conversationStarters-container > .nlux-comp-conversationStarters {
    display:               grid;
    grid-template-columns: repeat(3, 1fr);
    gap:                   12px;
  }
  #edu-chat-container .nlux-conversationStarters-container > .nlux-comp-conversationStarters > .nlux-comp-conversationStarter {
    flex-direction: column;
    align-items:    flex-start;
    justify-content: flex-start;
    min-height:     112px;
    padding:        14px;
  }
}


/* ─── § 3. Disclaimer (the full AI notice on the empty chat) ────────────── */

.edu-disclaimer {
  display:       flex;
  align-items:   flex-start;
  gap:           10px;
  margin-top:    auto;
  padding:       12px 14px 12px 12px;
  background:    #EEF4F3;
  border-radius: var(--edu-radius);
  font-size:     12.5px;
  line-height:   1.55;
  color:         var(--edu-text-soft);
}

.edu-disclaimer__icon {
  flex-shrink: 0;
  margin-top:  2px;
  font-size:   16px;
  color:       var(--edu-primary);
}

.edu-disclaimer__text {
  margin: 0;
}


/* ─── § 3b. Lead strip (the program a details request goes to) ──────────── */

.edu-lead-strip {
  flex-shrink:   0;
  padding:       8px 14px 8px 11px;
  background:    var(--edu-tint-soft);
  border-bottom: 1px solid #DCE9E9;
  border-left:   3px solid var(--edu-primary);
  line-height:   1.35;
}

.edu-lead-strip__title {
  font-size:          0.9375rem;   /* 15px */
  font-weight:        600;
  color:              var(--edu-primary-dark);
  overflow-wrap:      anywhere;
  display:            -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow:           hidden;
}

.edu-lead-strip__school {
  font-size:     0.75rem;   /* 12px */
  color:         var(--edu-text-muted);
  white-space:   nowrap;
  overflow:      hidden;
  text-overflow: ellipsis;
}


/* ─── § 4. Source badges ─────────────────────────────────────────────────── */

.edu-message-enhancer {
  margin-top: 10px;
}

.edu-sources {
  display:   flex;
  flex-wrap: wrap;
  gap:       6px;
  margin-top: 8px;
}

.edu-sources__label {
  font-size:   0.75rem;
  font-weight: 600;
  color:       var(--edu-text-muted);
  align-self:  center;
  margin-right: 2px;
}

.edu-source-badge {
  display:         inline-flex;
  align-items:     center;
  gap:             4px;
  padding:         3px 9px;
  background:      var(--edu-surface);
  border:          1px solid var(--edu-border);
  border-radius:   100px;   /* pill */
  font-size:       0.75rem;
  color:           var(--edu-primary);
  text-decoration: none;
  transition:      border-color 0.15s, background 0.15s;
  max-width:       220px;
  overflow:        hidden;
  white-space:     nowrap;
  text-overflow:   ellipsis;
}

.edu-source-badge:hover {
  border-color: var(--edu-primary);
  background:   #E8F4F4;
}

.edu-source-date {
  font-size:  0.6875rem;
  color:      var(--edu-text-faint);
  flex-shrink: 0;
}


/* ─── § 5. Freshness warning ─────────────────────────────────────────────── */

.edu-freshness-warning {
  display:       flex;
  align-items:   flex-start;
  gap:           6px;
  margin-top:    8px;
  padding:       8px 10px;
  background:    var(--edu-warning-bg);
  border:        1px solid var(--edu-warning-border);
  border-radius: var(--edu-radius-sm);
  font-size:     0.8125rem;
  color:         var(--edu-warning-text);
  line-height:   1.5;
}

.edu-freshness-warning__icon {
  flex-shrink: 0;
  font-style:  normal;
}


/* ─── § 6. Escalation button (inline, inside a message bubble) ───────────── */

.edu-escalation {
  margin-top: 12px;
}

.edu-escalation__btn {
  display:         inline-block;
  padding:         8px 16px;
  background:      var(--edu-primary);
  color:           #fff;
  border-radius:   18px;
  text-decoration: none;
  font-size:       0.875rem;
  font-weight:     600;
  transition:      background 0.15s;
}

.edu-escalation__btn:hover {
  background: var(--edu-primary-dark);
}


/* ─── § 7. Choice buttons (clarification) ───────────────────────────────── */

.edu-choices {
  display:   flex;
  flex-wrap: wrap;
  gap:       8px;
  margin-top: 12px;
}

.edu-choice-btn {
  padding:          7px 14px;
  background:       #fff;
  color:            var(--edu-primary);
  border:           1px solid var(--edu-primary);
  border-radius:    18px;
  font-family:      var(--edu-font);
  font-size:        0.875rem;
  cursor:           pointer;
  transition:       background 0.15s, color 0.15s;
}

.edu-choice-btn:hover {
  background: var(--edu-primary);
  color:      #fff;
}

.edu-choice-btn:focus-visible {
  outline:    2px solid var(--edu-primary);
  outline-offset: 2px;
}


/* ─── § 8. Counselor footer (appears after the second answer) ───────────── */

.edu-counselor-footer {
  display:          flex;
  flex-shrink:      0;
  justify-content:  center;
  padding:          2px 14px 4px;
  background:       #fff;
}

.edu-counselor-footer__link {
  display:         flex;
  align-items:     center;
  gap:             8px;
  min-height:      36px;
  margin:          4px 0;
  padding:         0 14px;
  border-radius:   18px;
  background:      var(--edu-tint);
  color:           var(--edu-primary-dark);
  font-size:       14px;
  font-weight:     600;
  text-decoration: none;
}

.edu-counselor-footer__link:hover {
  background: #D7E8E8;
}

.edu-counselor-footer__link:focus-visible {
  outline:        2px solid var(--edu-primary);
  outline-offset: 2px;
}


/* ─── § 8b. Copy button (bottom right of every finished bot bubble) ─────── */

.edu-copy {
  order:           99;               /* the bubble is a flex column: stay last */
  align-self:      flex-end;
  display:         inline-flex;
  align-items:     center;
  gap:             5px;
  justify-content: center;
  min-width:       44px;
  height:          44px;
  margin:          -2px -12px 0 0;
  padding:         0 12px;
  border:          0;
  border-radius:   12px;
  background:      transparent;
  color:           #8F8D87;
  font-family:     var(--edu-font);
  font-size:       0.8125rem;
  line-height:     1;
  cursor:          pointer;
}

.edu-copy:hover,
.edu-copy:focus-visible {
  color:           var(--edu-primary);
  background:      rgba(1, 105, 111, 0.08);
  outline:         none;
}

.edu-copy__label {
  display:         none;
  font-size:       0.75rem;
}

.edu-copy--done {
  color:           var(--edu-primary);
}

.edu-copy--done .edu-copy__label {
  display:         inline;
}


/* ─── § 9. Responsive ────────────────────────────────────────────────────── */

@media (max-width: 480px) {
  .edu-choices {
    flex-direction: column;
  }

  .edu-choice-btn {
    width: 100%;
    text-align: left;
  }

  .edu-sources {
    flex-direction: column;
  }
}


/* ─── § 10. Compact state (empty, pre-engagement) ────────────────────────── */

#edu-chat-container.edu-compact {
  max-height: 160px;
  transition: max-height 250ms ease-out;
}

#edu-chat-container.edu-expanded {
  max-height: 100vh;
  transition: max-height 250ms ease-out;
}

.edu-compact-card {
  display:        flex;
  flex-direction: column;
  height:         100%;
  padding:        16px;
  background:     var(--edu-surface);
  cursor:         text;
  border-radius:  18px;
  box-sizing:     border-box;
}

.edu-compact-card:focus-within {
  outline: 2px solid var(--edu-primary);
  outline-offset: -2px;
}

.edu-compact-card__header {
  display:     flex;
  align-items: center;
  gap:         10px;
  margin-bottom: 12px;
}

.edu-compact-card__titles {
  display:        flex;
  flex-direction: column;
  min-width:      0;
}

.edu-compact-card__heading {
  font-size:   1rem;       /* 16px */
  font-weight: 600;
  color:       var(--edu-text);
  margin:      0;
  line-height: 1.3;
}

.edu-compact-card__subtitle {
  font-size:    0.8125rem;  /* 13px */
  color:        var(--edu-text-muted);
  margin:       0;
  line-height:  1.4;
}

.edu-compact-card__input {
  font-family:   var(--edu-font);
  font-size:     0.9375rem;   /* 15px — matches nlux composer */
  color:         var(--edu-text);
  background:    var(--edu-bg);
  border:        1px solid var(--edu-border);
  border-radius: 26px;
  padding:       11px 18px;
  width:         100%;
  box-sizing:    border-box;
  cursor:        text;
}

.edu-compact-card__input::placeholder {
  color: var(--edu-text-muted) !important;   /* eduguideND.css: black !important */
}

.edu-compact-card__input:focus {
  outline:      none;
  border-color: var(--edu-primary);
  box-shadow:   0 0 0 2px rgba(1, 105, 111, 0.15);
}

/* Mobile: slightly smaller font to keep the card compact on narrow widths */
@media (max-width: 480px) {
  .edu-compact-card__heading { font-size: 0.9375rem; }
  .edu-compact-card__subtitle { font-size: 0.75rem; }
}


/* ─── § 10b. Compact card owl ────────────────────────────────────────────── */
/* Layers stack in one 40px box; edu_chat.js swaps the edu-owl--* class to
   play a move. Blink always runs, glance only while idle. */

.edu-owl {
  position:    relative;
  display:     block;
  width:       40px;
  height:      40px;
  flex-shrink: 0;
}

.edu-owl-hop {
  position: absolute;
  inset:    0;
  display:  block;
  transform-origin: 50% 96%;
}

.edu-owl-l {
  position: absolute;
  left:     0;
  top:      0;
  width:    100%;
  height:   100%;
  display:  block;
  overflow: visible;
}

.edu-owl-c { mix-blend-mode: multiply; opacity: 0; }
.edu-owl-pix, .edu-owl-f, .edu-owl-vband, .edu-owl-pband { opacity: 0; }
.edu-owl-fo { opacity: 1; }

/* glitch bands: the middle slice is a shifted copy */
.edu-owl-vtop { clip-path: inset(0 0 66% 0); }
.edu-owl-vmid { clip-path: inset(34% 0 50% 0); }
.edu-owl-vmid svg { transform: translateX(7%); }
.edu-owl-vbot { clip-path: inset(50% 0 0 0); }
.edu-owl-ptop { clip-path: inset(0 0 68.75% 0); }
.edu-owl-pmid { clip-path: inset(31.25% 0 50% 0); }
.edu-owl-pmid svg { transform: translateX(-12.5%); }
.edu-owl-pbot { clip-path: inset(50% 0 0 0); }

.edu-owl-head { transform-origin: 96px 160px; }
.edu-owl-ear  { transform-origin: 132.7px 21.4px; }

/* blink: about every 4.5s, sometimes double */
.edu-owl-lid {
  transform: translateY(-82px);
  animation: edu-owl-blink 9s infinite;
}
@keyframes edu-owl-blink {
  0%, 17%   { transform: translateY(-82px); animation-timing-function: ease-in; }
  18.3%     { transform: translateY(0);     animation-timing-function: ease-out; }
  20%, 69%  { transform: translateY(-82px); animation-timing-function: ease-in; }
  70.3%     { transform: translateY(0);     animation-timing-function: ease-out; }
  72%, 90%  { transform: translateY(-82px); animation-timing-function: ease-in; }
  91.2%     { transform: translateY(0);     animation-timing-function: ease-out; }
  92.6%     { transform: translateY(-82px); animation-timing-function: ease-in; }
  93.8%     { transform: translateY(0);     animation-timing-function: ease-out; }
  95.2%, 100% { transform: translateY(-82px); }
}

.edu-owl--idle .edu-owl-glance { animation: edu-owl-glance 9s ease-in-out infinite; }
@keyframes edu-owl-glance {
  0%, 38%   { transform: translate(0, 0); }
  41%, 51%  { transform: translate(-8px, 1px); }
  54%, 64%  { transform: translate(8px, -1px); }
  67%, 100% { transform: translate(0, 0); }
}

/* tilt, 2.32s */
.edu-owl--tilt .edu-owl-head { animation: edu-owl-tilt 2.32s ease-in-out 1; }
@keyframes edu-owl-tilt {
  0%            { transform: rotate(0deg); }
  17.24%        { transform: rotate(-7.6deg); }
  24.14%, 82.76% { transform: rotate(-7deg); }
  100%          { transform: rotate(0deg); }
}
.edu-owl--tilt .edu-owl-pupils { animation: edu-owl-tilt-look 2.32s ease-in-out 1; }
@keyframes edu-owl-tilt-look {
  0%, 3.4%      { transform: translate(0, 0); }
  20.7%, 79.3%  { transform: translate(-7px, -5px); }
  96.6%, 100%   { transform: translate(0, 0); }
}
.edu-owl--tilt .edu-owl-ear { animation: edu-owl-ear 2.32s 1; }
@keyframes edu-owl-ear {
  0%, 34.5%   { transform: rotate(0deg); }
  38.6%       { transform: rotate(-14deg); }
  43.4%       { transform: rotate(0deg); }
  47.6%       { transform: rotate(-10deg); }
  52.4%, 100% { transform: rotate(0deg); }
}

/* hop, 1.12s */
.edu-owl--hop .edu-owl-hop { animation: edu-owl-hop 1.12s 1; }
@keyframes edu-owl-hop {
  0%     { transform: translateY(0) scale(1, 1);       animation-timing-function: ease-out; }
  18.75% { transform: translateY(0) scale(1.07, .91);  animation-timing-function: ease-out; }
  43.75% { transform: translateY(-15%) scale(.96, 1.05); animation-timing-function: ease-in; }
  68.75% { transform: translateY(0) scale(1.05, .94);  animation-timing-function: ease-out; }
  87.5%  { transform: translateY(0) scale(.99, 1.01); }
  100%   { transform: translateY(0) scale(1, 1); }
}

/* thinking, while an answer is searched for: pupils up and around, three
   teal dots pulse at the owl's shoulder */
.edu-owl-glance { transition: transform 0.35s ease-out; }
.edu-owl--think .edu-owl-glance { transform: translate(0, -9px); }
.edu-owl--think .edu-owl-pupils { animation: edu-owl-think 3.6s ease-in-out infinite; }
@keyframes edu-owl-think {
  0%            { transform: translate(-2px, -1px); }
  12%, 38%      { transform: translate(-7px, 0); }
  50%, 76%      { transform: translate(7px, 0); }
  88%, 100%     { transform: translate(-2px, -1px); }
}

.edu-owl-dots {
  position:       absolute;
  left:           88%;
  top:            -15%;
  display:        flex;
  gap:            2px;
  opacity:        0;
  transition:     opacity 0.25s;
  pointer-events: none;
}
.edu-owl-dot {
  display:       block;
  width:         4px;
  height:        4px;
  border-radius: 50%;
  background:    var(--edu-primary, #01696F);
}
.edu-owl--think .edu-owl-dots { opacity: 1; }
.edu-owl--think .edu-owl-dot  { animation: edu-owl-pulse 1.05s ease-in-out infinite; }
.edu-owl--think .edu-owl-dot:nth-child(2) { animation-delay: 0.17s; }
.edu-owl--think .edu-owl-dot:nth-child(3) { animation-delay: 0.34s; }
@keyframes edu-owl-pulse {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30%           { opacity: 1;   transform: translateY(-35%); }
}

/* glitch, 4.3s: colour split, into the pixel owl (it blinks and glances), and back */
.edu-owl--glitch .edu-owl-vec { animation: edu-owl-g-vec 4.3s step-end 1; }
@keyframes edu-owl-g-vec { 0% { opacity: 1; } 1.4% { opacity: 0; } 96.51%, 100% { opacity: 1; } }
.edu-owl--glitch .edu-owl-pix { animation: edu-owl-g-pix 4.3s step-end 1; }
@keyframes edu-owl-g-pix { 0% { opacity: 0; } 3.49% { opacity: 1; } 94.42%, 100% { opacity: 0; } }
.edu-owl--glitch .edu-owl-v1 { animation: edu-owl-g-v1 4.3s step-end 1; }
@keyframes edu-owl-g-v1 {
  0%      { opacity: 1; transform: translate(-4%, 0); }
  3.49%   { opacity: 0; transform: translate(0, 0); }
  96.51%  { opacity: 1; transform: translate(3%, 0); }
  99.07%, 100% { opacity: 0; transform: translate(0, 0); }
}
.edu-owl--glitch .edu-owl-v2 { animation: edu-owl-g-v2 4.3s step-end 1; }
@keyframes edu-owl-g-v2 {
  0%      { opacity: 1; transform: translate(4%, 1%); }
  3.49%   { opacity: 0; transform: translate(0, 0); }
  96.51%  { opacity: 1; transform: translate(-3%, -1%); }
  99.07%, 100% { opacity: 0; transform: translate(0, 0); }
}
.edu-owl--glitch .edu-owl-p1 { animation: edu-owl-g-p1 4.3s step-end 1; }
@keyframes edu-owl-g-p1 {
  0%      { opacity: 0; transform: translate(0, 0); }
  3.49%   { opacity: 1; transform: translate(-6.25%, 0); }
  6.05%   { opacity: 0; transform: translate(0, 0); }
  93.02%  { opacity: 1; transform: translate(6.25%, 0); }
  96.51%, 100% { opacity: 0; transform: translate(0, 0); }
}
.edu-owl--glitch .edu-owl-p2 { animation: edu-owl-g-p2 4.3s step-end 1; }
@keyframes edu-owl-g-p2 {
  0%      { opacity: 0; transform: translate(0, 0); }
  3.49%   { opacity: 1; transform: translate(6.25%, 0); }
  6.05%   { opacity: 0; transform: translate(0, 0); }
  93.02%  { opacity: 1; transform: translate(-6.25%, 0); }
  96.51%, 100% { opacity: 0; transform: translate(0, 0); }
}
.edu-owl--glitch .edu-owl-vband { animation: edu-owl-g-vband 4.3s step-end 1; }
@keyframes edu-owl-g-vband { 0% { opacity: 0; } 1.4% { opacity: 1; } 3.49%, 100% { opacity: 0; } }
.edu-owl--glitch .edu-owl-pband { animation: edu-owl-g-pband 4.3s step-end 1; }
@keyframes edu-owl-g-pband { 0% { opacity: 0; } 94.42% { opacity: 1; } 96.51%, 100% { opacity: 0; } }
.edu-owl--glitch .edu-owl-fo { animation: edu-owl-g-fo 4.3s step-end 1; }
@keyframes edu-owl-g-fo { 0% { opacity: 1; } 44.19% { opacity: 0; } 52.33% { opacity: 1; } 62.79% { opacity: 0; } 76.74%, 100% { opacity: 1; } }
.edu-owl--glitch .edu-owl-fh { animation: edu-owl-g-fh 4.3s step-end 1; }
@keyframes edu-owl-g-fh { 0% { opacity: 0; } 44.19% { opacity: 1; } 46.51% { opacity: 0; } 50% { opacity: 1; } 52.33%, 100% { opacity: 0; } }
.edu-owl--glitch .edu-owl-fc { animation: edu-owl-g-fc 4.3s step-end 1; }
@keyframes edu-owl-g-fc { 0% { opacity: 0; } 46.51% { opacity: 1; } 50%, 100% { opacity: 0; } }
.edu-owl--glitch .edu-owl-fl { animation: edu-owl-g-fl 4.3s step-end 1; }
@keyframes edu-owl-g-fl { 0% { opacity: 0; } 62.79% { opacity: 1; } 76.74%, 100% { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .edu-owl, .edu-owl * { animation: none !important; transition: none !important; }
  .edu-owl--think .edu-owl-pupils { transform: translate(-2px, -1px); }
  .edu-owl--think .edu-owl-dot { opacity: 0.7; }
}

/* ─── § 11. Search indicator (rotating during MCP tool calls) ───────────── */

.edu-search-indicator {
  align-self:     flex-start;
  margin:         4px 0 10px;
  padding:        4px 10px;
  background:     var(--edu-tint-soft);
  border:         0;
  border-radius:  100px;
  font-size:      0.8125rem;     /* 13px */
  color:          var(--edu-text-muted);
  font-style:     italic;
  animation:      edu-pulse 1.6s ease-in-out infinite;
}

@keyframes edu-pulse {
  0%, 100% { opacity: 0.65; }
  50%      { opacity: 1.0;  }
}


/* ─── § 12. Program cards (rendered from SSE 'cards' event) ─────────────── */

/* Force the bot bubble's content area into a flex column so .edu-cards-grid
   can sit above the prose via order: -1 regardless of insertion timing. */
.nlux-comp-message.nlux_msg_streaming,
.nlux-comp-message.nlux_msg_received {
  display:        flex;
  flex-direction: column;
}

/* ─── § 12a. Tables the model writes into a bubble ─────────────────────────
   A city's departments with their bases, or an institution's bases, come as
   a markdown table with the department names linked. nova.css zeroes table
   margins and draws no borders, so four columns of long linked names in a
   narrow bubble ran together (seen 2026-09-07). The model marks its number
   columns right-aligned (`---:`), which nlux renders as align="right". */
.nlux-comp-message .nlux-markdown-container table {
  display:         block;          /* scrolls sideways instead of squeezing */
  max-width:       100%;
  overflow-x:      auto;
  border-collapse: collapse;
  margin:          8px 0 12px;
  font-size:       0.8125rem;      /* 13px */
  line-height:     1.35;
}

.nlux-comp-message .nlux-markdown-container th,
.nlux-comp-message .nlux-markdown-container td {
  padding:        5px 12px 5px 0;
  border-bottom:  1px solid var(--edu-border);
  text-align:     left;
  vertical-align: top;
}

.nlux-comp-message .nlux-markdown-container th {
  font-size:      0.75rem;
  font-weight:    600;
  color:          var(--edu-text-muted);
  letter-spacing: 0.02em;
  white-space:    nowrap;
}

.nlux-comp-message .nlux-markdown-container th[align="right"],
.nlux-comp-message .nlux-markdown-container td[align="right"] {
  text-align:           right;
  white-space:          nowrap;
  font-variant-numeric: tabular-nums;
}

.nlux-comp-message .nlux-markdown-container tbody tr:last-child td {
  border-bottom: 0;
}

.nlux-comp-message .nlux-markdown-container td a {
  color:                 var(--edu-primary);
  text-decoration:       underline;
  text-underline-offset: 2px;
}

/* ─── § 12b. The table the agent draws in place of the cards ───────────────
   The 'table' event (columns + rows, a cell with a url is a link) is built
   into the bubble by edu_chat.js the way the cards are, and sits in the
   same slot above the prose. Same look as § 12a; number columns come
   marked by the agent (align "right"). */
.edu-table-wrap {
  order:      -1;              /* pin above the prose, like the cards */
  max-width:  100%;
  overflow-x: auto;            /* scrolls sideways instead of squeezing */
  margin:     0 0 12px;
}

.edu-table {
  border-collapse: collapse;
  font-size:       0.8125rem;  /* 13px */
  line-height:     1.35;
}

.edu-table th,
.edu-table td {
  padding:        5px 12px 5px 0;
  border-bottom:  1px solid var(--edu-border);
  text-align:     left;
  vertical-align: top;
}

.edu-table th {
  font-size:      0.75rem;
  font-weight:    600;
  color:          var(--edu-text-muted);
  letter-spacing: 0.02em;
  white-space:    nowrap;
}

.edu-table .edu-table-num {
  text-align:           right;
  white-space:          nowrap;
  font-variant-numeric: tabular-nums;
}

.edu-table tbody tr:last-child td {
  border-bottom: 0;
}

.edu-table td a {
  color:                 var(--edu-primary);
  text-decoration:       underline;
  text-underline-offset: 2px;
}

.edu-cards-grid {
  order:          -1;          /* pin above the prose */
  display:        flex;
  flex-direction: column;
  gap:            8px;
  margin-bottom:  12px;
}

/* Hedge fades in first; each card cascades in 50ms after the previous,
   sliding from above. `backwards` fill mode keeps each child invisible
   until its turn so the cascade is visible. */
.edu-cards-hedge {
  animation: edu-cards-fadein 280ms ease-out backwards;
}

.edu-card {
  animation: edu-card-slidein 320ms cubic-bezier(0.2, 0.7, 0.3, 1) backwards;
}

/* hedge is the grid's 1st child; cards are 2nd onward */
.edu-card:nth-child(2)  { animation-delay:  80ms; }
.edu-card:nth-child(3)  { animation-delay: 130ms; }
.edu-card:nth-child(4)  { animation-delay: 180ms; }
.edu-card:nth-child(5)  { animation-delay: 230ms; }
.edu-card:nth-child(6)  { animation-delay: 280ms; }
.edu-card:nth-child(7)  { animation-delay: 330ms; }
.edu-card:nth-child(8)  { animation-delay: 380ms; }
.edu-card:nth-child(9)  { animation-delay: 430ms; }
.edu-card:nth-child(10) { animation-delay: 480ms; }
.edu-card:nth-child(11) { animation-delay: 530ms; }

.edu-cards-actions {
  animation: edu-cards-fadein 280ms ease-out 600ms backwards;
}

@keyframes edu-cards-fadein {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes edu-card-slidein {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.edu-cards-hedge {
  margin:         0 0 4px 0;
  font-size:      14px;
  color:          var(--edu-text-muted);
  font-style:     italic;
  line-height:    1.5;
}

/* Closing "see the full table" line of canonical bubbles */
.edu-cards-footer {
  margin:         8px 0 0 0;
  font-size:      0.8125rem;
  color:          var(--edu-text-muted);
  font-style:     italic;
  line-height:    1.4;
  animation:      edu-cards-fadein 280ms ease-out 600ms backwards;
}

.edu-cards-footer a {
  color:          var(--edu-primary);
  text-decoration: underline;
}

.edu-card {
  display:         flex;
  align-items:     flex-start;
  gap:             12px;
  padding:         12px;
  border:          0;
  border-radius:   var(--edu-radius);
  text-decoration: none;
  color:           var(--edu-text);
  background:      var(--edu-tint-soft);
  transition:      background .12s ease, box-shadow .12s ease;
}

.edu-card:hover,
.edu-card:focus {
  background:     #E9F2F2;
  box-shadow:     0 0 0 1px rgba(1, 105, 111, 0.3);
  outline:        none;
}

/* Override surrounding theme's anchor styling — the whole card is an <a>.
   The widget's existing `#edu-chat-container .nlux_msg_received a` rule
   (specificity 1,1,1) sets link blue + underline for inline markdown
   links in bot replies; we need higher specificity to beat it on cards. */
#edu-chat-container .nlux_msg_received a.edu-card,
#edu-chat-container .nlux_msg_received a.edu-card:hover,
#edu-chat-container .nlux_msg_received a.edu-card:focus {
  color:           var(--edu-text);
  text-decoration: none;
}

/* the logo in a white rounded square */
.edu-card-logo-box {
  display:         flex;
  align-items:     center;
  justify-content: center;
  flex-shrink:     0;
  width:           44px;
  height:          44px;
  padding:         5px;
  border-radius:   12px;
  background:      #fff;
  box-shadow:      0 1px 3px rgba(40, 37, 29, 0.1);
  box-sizing:      border-box;
}

#edu-chat-container img.edu-card-logo {
  display:    block;
  width:      100%;
  height:     100%;
  max-width:  none;
  margin:     0;
  object-fit: contain;
}

.edu-card-body {
  display:   block;
  flex:      1;
  min-width: 0;
}

.edu-card-title {
  display:        block;
  font-weight:    600;
  font-size:      0.9375rem;   /* 15px */
  line-height:    1.35;
  color:          var(--edu-primary-dark);
}

.edu-card-school {
  display:        block;
  margin-top:     2px;
  font-size:      13.5px;
  line-height:    1.45;
  color:          var(--edu-text);
}

.edu-card-status {
  display:        flex;
  flex-wrap:      wrap;
  gap:            6px;
  margin-top:     6px;
}

.edu-card-pill {
  max-width:      100%;
  padding:        1px 8px;
  border-radius:  10px;
  background:     #fff;
  font-size:      12px;
  line-height:    18px;
  color:          var(--edu-text-soft);
  overflow-wrap:  anywhere;   /* a long tuition text or field list wraps whole */
  box-sizing:     border-box;
}

.edu-card-pill--key {
  font-weight:    650;
  color:          var(--edu-primary-dark);
}

@container edu-chat (min-width: 560px) {
  .edu-card { align-items: center; gap: 14px; }
  .edu-card-logo-box { width: 48px; height: 48px; }
}

.edu-cards-actions {
  display:         flex;
  flex-direction:  column;
  gap:             8px;
  margin-top:      12px;
  padding-top:     12px;
  border-top:      1px solid #ECE9E2;
}

.edu-cards-action-button {
  display:        block;
  width:          100%;
  min-height:     44px;
  padding:        12px 16px;
  font-family:    inherit;
  font-size:      0.9375rem;   /* 15px */
  font-weight:    500;
  color:          #fff;
  background:     var(--edu-primary);
  border:         none;
  border-radius:  22px;
  cursor:         pointer;
  text-align:     center;
  transition:     background-color 0.15s ease, transform 0.05s ease;
}

.edu-cards-action-button:hover {
  background:     var(--edu-primary-dark);
}

.edu-cards-action-button:active {
  transform:      scale(0.98);
}

.edu-cards-action-button:disabled {
  opacity:        0.5;
  cursor:         wait;
}

/* Phase 1.5 — canonical sectioned bubble */
.edu-cards-section-head {
  display:        flex;
  gap:            8px;
  align-items:    center;
  font-weight:    650;
  font-size:      14.5px;
  line-height:    1.35;
  color:          var(--edu-primary-dark);
  margin:         10px 0 2px;
}
.edu-cards-section-head .count {
  flex-shrink:    0;
  padding:        1px 8px;
  border-radius:  10px;
  background:     var(--edu-tint);
  font-size:      12px;
  font-weight:    700;
  line-height:    18px;
}
.edu-cards-grid--canonical .edu-cards-section-head:first-of-type {
  margin-top:     0;
  padding-top:    0;
}

/* Phase 1.5 — multi-match choice buttons (vertical column) */
.edu-cards-actions--column {
  flex-direction: column;
}
.edu-cards-choice-button {
  /* Inherits .edu-cards-action-button base; nothing extra needed for now. */
}

/* Scrollbars inside the widget are visual noise: the conversation starters box
   is overflow-y:scroll so it shows a permanent bar with nothing to scroll, and
   the composer textarea starts scrolling once the prompt passes its max
   height. Keep the scrolling behaviour, hide the bars. */
#edu-chat-container *::-webkit-scrollbar {
  width:  0;
  height: 0;
}

#edu-chat-container * {
  scrollbar-width:     none;
  -ms-overflow-style:  none;
}
