/* OFG public chatbot theme, adapted for the separately authenticated parent portal. */
:root {
  color-scheme: light;
  --navy-950: #000033;
  --navy-900: #021d49;
  --navy-800: #192a5e;
  --blue-600: #4f84b8;
  --blue-500: #70a4d8;
  --blue-50: #f3f7fb;
  --gold-500: #eadfb5;
  --ink: #192a5e;
  --muted: #617083;
  --line: #dbe3ea;
  --surface: #fff;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--surface); color: var(--ink); }
button, textarea { font: inherit; }
button { color: inherit; cursor: pointer; }
button:disabled { cursor: default; }
button:focus-visible, textarea:focus-visible, a:focus-visible {
  outline: 3px solid rgba(39, 149, 211, .5);
  outline-offset: 3px;
}
svg { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.skip-link { position: fixed; z-index: 10; left: 1rem; top: -5rem; padding: .75rem 1rem; border-radius: .5rem; background: var(--surface); color: var(--navy-900); }
.skip-link:focus { top: 1rem; }
.chat-shell { height: 100vh; height: 100dvh; max-width: 1000px; margin: 0 auto; display: flex; flex-direction: column; overflow: hidden; background: var(--surface); }
.chat-header { display: flex; flex: 0 0 auto; align-items: center; gap: .65rem; min-height: 4.3rem; padding: .65rem .85rem; color: #fff; background: var(--navy-950); border-bottom: 3px solid var(--gold-500); }
.brand-crest { width: 2.65rem; height: 2.65rem; padding: .16rem; flex: 0 0 auto; border-radius: .5rem; background: #fff; object-fit: contain; }
.heading { flex: 1; min-width: 0; }
h1 { margin: 0; font-size: .98rem; font-weight: 700; line-height: 1.1; }
.header-subtitle { margin: .32rem 0 0; color: rgba(255, 255, 255, .75); font-size: .69rem; line-height: 1.25; }
.quiet-button { flex: 0 0 auto; min-height: 2.25rem; padding: .45rem .65rem; border: 1px solid rgba(255, 255, 255, .25); border-radius: .55rem; background: rgba(255, 255, 255, .08); color: #fff; font-size: .73rem; font-weight: 650; }
.quiet-button:enabled:hover { background: rgba(255, 255, 255, .15); }
.quiet-button:disabled { opacity: .55; }
.connection { display: flex; flex: 0 0 auto; align-items: center; gap: .5rem; min-height: 2.15rem; padding: .5rem 1rem; background: var(--blue-50); border-bottom: 1px solid var(--line); color: var(--muted); font-size: .69rem; line-height: 1.45; }
.connection p { margin: 0; }
.status-dot { width: .42rem; height: .42rem; flex: 0 0 auto; border-radius: 50%; background: #8793a0; }
.status-dot.ready { background: #38805b; box-shadow: 0 0 0 3px rgba(56, 128, 91, .1); }
.status-dot.error { background: #a33c3c; }
.conversation { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 1.35rem 1rem; scroll-behavior: smooth; }
.welcome { width: min(100%, 590px); margin: 0 auto; padding: .4rem .25rem .7rem; text-align: center; }
.welcome-icon { display: grid; place-items: center; width: 2.65rem; height: 2.65rem; margin: 0 auto 1rem; border-radius: .8rem; color: #fff; background: linear-gradient(145deg, var(--navy-800), var(--blue-600)); box-shadow: 0 8px 18px rgba(23, 118, 182, .2); }
.welcome .eyebrow { margin: 0 0 .55rem; color: var(--blue-600); font-size: .62rem; font-weight: 760; letter-spacing: .09em; line-height: 1.4; text-transform: uppercase; }
h2 { margin: 0; color: var(--navy-900); font-family: Georgia, "Times New Roman", serif; font-size: 1.65rem; font-weight: 500; line-height: 1.2; letter-spacing: -.025em; }
.welcome > p:not(.eyebrow) { max-width: 470px; margin: .75rem auto 1.25rem; color: var(--muted); font-size: .85rem; line-height: 1.65; }
.suggestions { display: grid; gap: .55rem; }
.suggestions button { display: flex; align-items: center; justify-content: space-between; gap: .65rem; min-height: 2.9rem; padding: .75rem .85rem; border: 1px solid var(--line); border-radius: .85rem; background: var(--surface); color: var(--navy-800); text-align: left; font-size: .8rem; font-weight: 650; transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease; }
.suggestions button:enabled:hover { transform: translateY(-1px); border-color: #a9cde2; box-shadow: 0 8px 18px rgba(31, 68, 94, .08); }
.suggestions button:disabled { opacity: .6; }
.suggestions svg { width: 1rem; height: 1rem; flex: 0 0 auto; color: var(--blue-600); }
.message { max-width: 94%; margin: 0 0 1.35rem; }
.message.user { max-width: 88%; margin-left: auto; }
.message-label { margin: 0 0 .45rem; color: var(--muted); font-size: .63rem; font-weight: 650; letter-spacing: .05em; text-transform: uppercase; }
.message.user .message-label { text-align: right; }
.message-content { margin: 0; color: var(--ink); font-size: .9rem; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.message.user .message-content { padding: .72rem 1rem; border-radius: 1rem 1rem .3rem 1rem; color: #fff; background: var(--navy-800); }
.message.assistant .message-content { padding-right: .35rem; }
.message.pending .message-content { color: var(--muted); }
.sources { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .85rem; padding-top: .75rem; border-top: 1px solid var(--line); }
.sources a { display: inline-flex; max-width: 100%; padding: .35rem .55rem; border: 1px solid #c9dce8; border-radius: .5rem; color: #11689d; background: var(--blue-50); font-size: .75rem; font-weight: 650; text-decoration: none; overflow-wrap: anywhere; }
.sources a:hover { text-decoration: underline; }
.composer-area { flex: 0 0 auto; padding: .75rem .85rem .65rem; border-top: 1px solid var(--line); background: var(--surface); }
.composer { display: flex; align-items: flex-end; gap: .65rem; padding: .45rem .45rem .45rem .75rem; border: 1px solid #bfcdd8; border-radius: .85rem; background: var(--surface); box-shadow: 0 5px 20px rgba(18, 52, 76, .07); }
.composer:focus-within { border-color: var(--blue-500); box-shadow: 0 0 0 3px rgba(39, 149, 211, .12), 0 5px 20px rgba(18, 52, 76, .07); }
textarea { flex: 1; min-width: 0; min-height: 2.5rem; max-height: 110px; resize: none; padding: .55rem 0 .4rem; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: .85rem; line-height: 1.45; }
/* The composer provides the visible focus ring, as in the public chatbot. */
.composer textarea:focus-visible { outline: 0; }
textarea::placeholder { color: #8793a0; }
textarea:disabled { opacity: .75; }
.send-button { display: grid; place-items: center; flex: 0 0 auto; width: 2.5rem; height: 2.5rem; border: 0; border-radius: .75rem; color: #fff; background: var(--navy-800); transition: background .15s ease, transform .15s ease; }
.send-button:enabled:hover { background: var(--navy-950); }
.send-button:enabled:active { transform: scale(.96); }
.send-button:disabled { background: #87a2b4; }
.footer-note { margin: .5rem 0 0; color: #7a8794; text-align: center; font-size: .67rem; line-height: 1.45; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (min-width: 700px) {
  .chat-header { padding-right: 1.5rem; padding-left: 1.5rem; }
  .connection { padding-right: 1.5rem; padding-left: 1.5rem; }
  .conversation { padding: 2rem; }
  .welcome { padding-top: 1rem; }
  .welcome-icon { width: 3.75rem; height: 3.75rem; border-radius: 1.05rem; }
  .welcome-icon svg { width: 1.75rem; height: 1.75rem; }
  h2 { font-size: 2.5rem; }
  .welcome > p:not(.eyebrow) { font-size: .98rem; }
  .suggestions { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .suggestions button { min-height: 4.8rem; }
  .composer-area { padding-right: 2rem; padding-left: 2rem; }
}
@media (max-width: 350px) {
  .chat-header { gap: .5rem; padding-right: .65rem; padding-left: .65rem; }
  .conversation { padding-right: .8rem; padding-left: .8rem; }
  h2 { font-size: 1.5rem; }
  .composer-area { padding-right: .65rem; padding-left: .65rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
