/* Demo-only additions on the NCGA replica. Brand: blue #0055A5, navy #1C3054, orange #F8981D. */

.fh-demo-banner {
  position: sticky;
  top: 0;
  z-index: 10000;
  background: #1C3054;
  color: #fff;
  font: 600 13px/1.4 "DM Sans", Helvetica, Arial, sans-serif;
  text-align: center;
  padding: 7px 36px 7px 16px;
}
.fh-demo-banner a { color: #fff; text-decoration: underline; }
.fh-demo-banner button {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
}

/* Anchored AI search dropdown / mobile sheet */
.ai-search-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 200ms ease, visibility 200ms ease;
}
.ai-search-overlay[hidden] { display: none !important; }
.ai-search-overlay.is-open {
  pointer-events: auto;
  opacity: 1;
  visibility: visible;
}
.ai-search-dim {
  position: absolute;
  left: 0; right: 0; bottom: 0; top: 0;
  background: rgba(28, 48, 84, 0.42);
  pointer-events: auto;
}
.ai-search-results {
  position: absolute;
  z-index: 2;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 200ms ease, transform 200ms ease;
  font-family: "DM Sans", Helvetica, Arial, sans-serif;
  pointer-events: auto;
}
.ai-search-overlay.is-open .ai-search-results {
  opacity: 1;
  transform: translateY(0);
}
.ai-search-caret {
  display: none;
  position: absolute;
  top: -7px;
  width: 14px;
  height: 14px;
  background: #fff;
  transform: translateX(-50%) rotate(45deg);
  border-left: 1px solid rgba(28, 48, 84, 0.2);
  border-top: 1px solid rgba(28, 48, 84, 0.2);
  border-radius: 2px 0 0 0;
  z-index: 3;
  pointer-events: none;
}
.ai-search-overlay.is-dropdown .ai-search-caret { display: block; }
.ai-search-card {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1 1 auto;
  max-height: inherit;
  background: #fff;
  border: 1px solid rgba(28, 48, 84, 0.18);
  border-radius: 12px;
  box-shadow: 0 18px 40px rgba(28, 48, 84, 0.22), 0 2px 8px rgba(28, 48, 84, 0.08);
  overflow: hidden;
}
.ai-search-card::before {
  content: "";
  display: block;
  height: 3px;
  flex: 0 0 auto;
  background: linear-gradient(to right, #1C3054, #F8981D);
}
.ai-search-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px 10px;
  border-bottom: 1px solid #e6ebf2;
  flex: 0 0 auto;
  background: #f5f7fb;
}
.ai-search-head-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ai-search-kicker {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #1C3054;
}
#ai-search-status { font-size: 0.92rem; line-height: 1.35; color: #333; word-break: break-word; }
#ai-search-status b { color: #1C3054; font-weight: 700; }
#ai-search-close {
  flex: 0 0 auto;
  width: 32px; height: 32px;
  margin: -4px -4px 0 0;
  border: 0; border-radius: 50%;
  background: transparent;
  color: #1C3054;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}
#ai-search-close:hover, #ai-search-close:focus { background: #e7ecf4; color: #F8981D; outline: none; }
.ai-search-body { position: relative; flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; background: #fff; }
#customgpt_search { flex: 1 1 auto; min-height: 0; height: 100% !important; display: flex; flex-direction: column; }
#customgpt_search iframe { display: block; width: 100% !important; flex: 1 1 auto; min-height: 0; border: 0; }
.ai-search-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #fff;
  color: #1C3054;
  font-size: 0.95rem;
  z-index: 2;
}
.ai-search-loading[hidden] { display: none !important; }
.ai-search-spinner {
  width: 18px; height: 18px;
  border: 2px solid #d4dceb;
  border-top-color: #F8981D;
  border-radius: 50%;
  animation: fhspin 0.7s linear infinite;
}
@keyframes fhspin { to { transform: rotate(360deg); } }
.ai-search-overlay.is-sheet .ai-search-card { border-radius: 0; }
body.ai-search-open { overflow: hidden; }
body.ai-search-open #cgptcb-chat-bubble,
body.ai-search-open .cgptcb-chat-bubble,
body.ai-search-open #customgpt-chat-widget-button,
body.ai-search-open [id^="cgptcb-launcher"],
body.ai-search-open [id^="cgptcb-"],
body.ai-search-open [class*="cgptcb-chat"],
body.ai-search-open [class*="cgptcb-launcher"],
body.ai-search-open [class*="cgptcb-widget"] {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.fsNavLevel1 > li.ai-nav-item > a { font-weight: 700; }

/* Full-height /assistant embed */
body.ai-assistant .fh-assistant-chrome {
  background: #1C3054;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 18px;
}
body.ai-assistant .fh-assistant-chrome img { height: 48px; width: auto; display: block; }
body.ai-assistant .fh-assistant-chrome a { color: #fff; text-decoration: none; font-weight: 600; }
body.ai-assistant .fh-assistant-chrome .fh-assistant-title { font-size: 1.05rem; letter-spacing: 0.02em; }
body.ai-assistant .ai-assistant-frame {
  height: calc(100vh - 96px);
  height: calc(100dvh - 96px);
  min-height: 480px;
  display: flex;
  flex-direction: column;
  background: #fff;
  overflow: hidden;
}
#customgpt_chat { flex: 1 1 auto; height: 100% !important; min-height: 0; display: flex; flex-direction: column; }
#customgpt_chat > #cgptcb-embed-chat-box-container,
#customgpt_chat > .cgptcb-embed-chat-box-container,
#cgptcb-embed-chat-box-container {
  height: 100% !important;
  width: 100% !important;
  max-width: none !important;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
#customgpt_chat iframe { display: block; width: 100% !important; flex: 1 1 auto; min-height: 0; border: 0; }
body.ai-assistant #cgptcb-chat-bubble,
body.ai-assistant .cgptcb-chat-bubble,
body.ai-assistant #customgpt-chat-widget-button,
body.ai-assistant [id^="cgptcb-launcher"] { display: none !important; }
@media (max-width: 600px) {
  body.ai-assistant .ai-assistant-frame { height: calc(100dvh - 88px); min-height: 420px; }
}

/* Demo inquiry form */
.ncga-join-wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 28px 20px 60px;
  font-family: "DM Sans", Helvetica, Arial, sans-serif;
  color: #1a1a1a;
}
.ncga-join-wrap h1 { color: #1C3054; margin: 0 0 8px; font-size: 2rem; }
.ncga-join-note {
  background: #f4f6fa;
  border-left: 4px solid #1C3054;
  padding: 10px 14px;
  margin: 0 0 22px;
  font-size: 0.95rem;
}
.ncga-join-wrap label { display: block; font-weight: 600; margin: 14px 0 6px; color: #1C3054; }
.ncga-join-wrap input, .ncga-join-wrap select, .ncga-join-wrap textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid #c5cdd8;
  border-radius: 6px;
  font: 1rem/1.4 inherit;
}
.ncga-join-wrap button[type="submit"] {
  margin-top: 20px;
  background: linear-gradient(135deg, #1C3054, #0055A5);
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 12px 22px;
  font-weight: 700;
  cursor: pointer;
}
.ncga-join-wrap .fh-back { display: inline-block; margin: 0 0 18px; color: #1C3054; font-weight: 600; }
.ncga-join-thanks { display: none; }
.ncga-join-wrap.is-done form { display: none; }
.ncga-join-wrap.is-done .ncga-join-thanks { display: block; }



/* Top chrome: demo banner + Finlee callout, then the fixed school header below them. */
:root {
  --fh-banner-h: 36px;
  --fh-callout-h: 0px;
  --fh-top-chrome: 36px;
}
.fh-demo-banner {
  position: sticky;
  top: 0;
  z-index: 10001;
}
#fh-finlee-callout,
.fh-finlee-callout {
  position: sticky;
  top: var(--fh-banner-h, 36px);
  z-index: 10000;
  background: #1C3054;
  color: #fff;
  font-family: "DM Sans", Helvetica, Arial, sans-serif;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 16px;
  padding: 10px 16px;
  text-align: center;
}
body:not(:has(#fh-demo-banner)) .fh-finlee-callout { top: 0; }
.fh-finlee-callout p { margin: 0; font-size: 1rem; font-weight: 600; }
.fh-finlee-callout button,
.fh-finlee-callout a.fh-finlee-open {
  appearance: none;
  border: 0;
  cursor: pointer;
  background: linear-gradient(135deg, #F8981D, #b4001f);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  padding: 10px 18px;
  border-radius: 8px;
  text-decoration: none;
  display: inline-block;
  line-height: 1.2;
}
.fh-finlee-callout button:hover,
.fh-finlee-callout a.fh-finlee-open:hover { filter: brightness(1.05); }

/* Push the fixed Finalsite header below banner + callout so nav is never covered. */
body:has(#fh-demo-banner) .header-15 .header-wrap,
body:has(#fh-finlee-callout) .header-15 .header-wrap {
  top: var(--fh-top-chrome, var(--fh-banner-h)) !important;
}
body:has(#fh-demo-banner).fsAccountBarVisible .header-15 .header-wrap,
body:has(#fh-finlee-callout).fsAccountBarVisible .header-15 .header-wrap {
  top: calc(45px + var(--fh-top-chrome, var(--fh-banner-h))) !important;
}

/* Hide the live-chat teaser box until it actually has text (avoids an empty white box). */
.cgptcb-chat-question.fh-teaser-empty,
.cgptcb-body .cgptcb-chat-bubble:not(.is-question-revealed) .cgptcb-chat-question {
  display: none !important;
  visibility: hidden !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* Kenect "Text Us" / "Admissions Questions?" + Finlee on mobile: no overlap. */
@media (max-width: 600px) {
  /* Suppress Finlee teaser text; circle only, bottom right. */
  .cgptcb-body .cgptcb-chat-question,
  .cgptcb-chat-question {
    display: none !important;
    visibility: hidden !important;
    width: 0 !important;
    max-width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    padding: 0 !important;
    margin: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }
  .cgptcb-body .cgptcb-chat-bubble,
  .cgptcb-body .cgptcb-chat-box-toggle,
  #cgptcb-chat-bubble {
    bottom: calc(8px + env(safe-area-inset-bottom, 0px)) !important;
    right: 8px !important;
    left: auto !important;
    max-width: 96px !important;
    width: auto !important;
    z-index: 2147483001;
  }
  /* Kenect stacked at bottom left, clear of the Finlee circle. */
  #widget-ThOtF4lF5wqdCDsWNyRm {
    bottom: env(safe-area-inset-bottom, 0px) !important;
    left: 8px !important;
    right: auto !important;
    top: auto !important;
    max-width: min(240px, calc(100vw - 120px));
    z-index: 2147483000;
  }
  #prompt-ThOtF4lF5wqdCDsWNyRm,
  #prompt-ThOtF4lF5wqdCDsWNyRm-iframe {
    max-width: min(220px, calc(100vw - 130px)) !important;
  }
  .cgptcb-body .cgptcb-chat-box-container.open,
  #cgptcb-chat-box-container.open,
  .cgptcb-chat-box-container.open {
    height: 100dvh !important;
    max-height: 100dvh !important;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    box-sizing: border-box;
  }
}

/* Hide Kenect while the AI search overlay is open so it cannot cover sources. */
body.ai-search-open #widget-ThOtF4lF5wqdCDsWNyRm,
body.ai-search-open [id^="prompt-ThOtF4"],
body.ai-search-open [id^="button-ThOtF4"],
body.ai-search-open [id^="widget-button-ThOtF4"] {
  display: none !important;
}

/* /assistant: fill the visual viewport; do not clip the composer. */
html:has(body.ai-assistant),
body.ai-assistant {
  height: 100%;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
  box-sizing: border-box;
}
body.ai-assistant .fh-demo-banner,
body.ai-assistant .fh-assistant-chrome {
  flex: 0 0 auto;
}
body.ai-assistant .ai-assistant-frame {
  flex: 1 1 auto;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Inquiry form modal: above CustomGPT (2147483000) and Kenect (2147483000). */
.ncga-join-modal {
  position: fixed;
  inset: 0;
  z-index: 2147483646;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  padding-bottom: max(16px, env(safe-area-inset-bottom, 0px));
  box-sizing: border-box;
}
.ncga-join-modal[hidden] { display: none !important; }
.ncga-join-modal-dim {
  position: absolute;
  inset: 0;
  background: rgba(28, 48, 84, 0.55);
}
.ncga-join-modal-card {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  height: min(860px, 94dvh);
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 18px 40px rgba(28, 48, 84, 0.28);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.ncga-join-modal-card iframe {
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}
.ncga-join-modal-x {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: #1C3054;
  box-shadow: 0 0 0 2px #1C3054;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}
@media (max-width: 600px) {
  .ncga-join-modal { padding: 0; }
  .ncga-join-modal-card { width: 100%; height: 100dvh; border-radius: 0; }
}
body.ncga-join-open { overflow: hidden; }
/* Chat widget stays open under the modal; do not hide it. */

/* Compact inquire page when shown in the modal. */
body.ncga-join-embed .fh-top { display: none; }
body.ncga-join-embed .ncga-join-wrap { padding: 16px 16px 32px; }
body.ncga-join-embed .fh-demo-banner { font-size: 12px; padding: 8px 40px 8px 12px; }
