/* ASK SHAI surgical UI repair — 2026-10-20.
   Limited to the homepage Talk to SHAI CTA and the already-existing navigator popup. */
body[data-route="home"] #main .welcome-hero.tutor-entry-hero .hero-actions > a[data-tutor-enter]{
  display:inline-flex;flex:0 1 auto;align-items:center;justify-content:center;gap:.75rem;
  width:max-content;max-width:100%;min-width:0;min-height:50px;
  padding:13px 20px;box-sizing:border-box;text-align:center;
  font-size:clamp(14px,3.8vw,17px);line-height:1.4;white-space:nowrap;
  direction:ltr;unicode-bidi:isolate;text-decoration:none;
}
body[data-route="home"] #main .welcome-hero.tutor-entry-hero .hero-actions > a[data-tutor-enter] .tutor-cta-label{
  display:inline-block;white-space:nowrap;flex:0 1 auto;
}
body[data-route="home"] #main .welcome-hero.tutor-entry-hero .hero-actions > a[data-tutor-enter] > [aria-hidden="true"]{
  display:inline-block;flex:0 0 auto;margin:0;line-height:1;white-space:nowrap;
}
#shaiDrawer .shai-window-controls{display:none}
#shaiDrawer.navigator-popup.open .shai-window-controls{
  display:flex;position:sticky;top:0;z-index:20;
  align-items:center;justify-content:flex-end;gap:10px;
  flex:0 0 auto;align-self:stretch;min-height:50px;
  padding:4px 0 12px;margin:0;
  border-bottom:1px solid #d7d9e7;background:#f7f8fc;
}
#shaiDrawer.navigator-popup.open .shai-window-controls button{
  display:inline-flex;align-items:center;justify-content:center;gap:5px;
  min-height:44px;min-width:44px;padding:7px 12px;
  border:1px solid #a8a0b9;border-radius:10px;
  background:#fff;color:#282238;font:650 13px/1.2 system-ui,-apple-system,"Segoe UI",sans-serif;
  cursor:pointer;
}
#shaiDrawer.navigator-popup.open #shaiDismiss{
  width:44px;padding:4px;font-size:26px;line-height:1;
}
#shaiDrawer.navigator-popup.open .shai-window-controls button:hover{background:#ece8f6}
#shaiDrawer.navigator-popup.open .shai-window-controls button:focus-visible{
  outline:3px solid #775da6;outline-offset:2px;
}
/* The old in-flow close control remains available in the full workspace;
   removing it from the popup makes room for the mode choices. */
#shaiDrawer.navigator-popup.open .drawer-head #closeShai{display:none!important}
@media(max-width:540px){
  body[data-route="home"] #main .welcome-hero.tutor-entry-hero .hero-actions > a[data-tutor-enter]{
    width:max-content;max-width:100%;justify-content:center;gap:9px;
    padding:13px 17px;font-size:15px;
  }
  #shaiDrawer.navigator-popup.open .shai-window-controls{
    top:0;min-height:48px;padding:2px 0 9px;gap:8px;
  }
  #shaiDrawer.navigator-popup.open .drawer-head{margin-top:0}
}
@media(max-width:350px){
  #shaiDrawer.navigator-popup.open #shaiMinimize{padding-inline:9px;font-size:12px}
}

/* Mobile ASK SHAI matches the established desktop gold; colours only. */
@media (max-width:760px) {
  body.shai-premium-page.premium-dark .topbar #openShai.ask-button {
    background-color:#d6c4a0;
    border-color:#d6c4a0;
    color:#111522;
  }
  body.shai-premium-page.premium-dark .topbar #openShai.ask-button:hover {
    background-color:#e7d9bd;
    border-color:#e7d9bd;
    color:#111522;
  }
}
