/*!
 * governance-chat.css — styles for the shared public governance-chat surface.
 *
 * Ported from the evecore.ai chat (evecore-site/index.html chat-hero block) and
 * consolidated onto eveaicore.com. Pairs with /static/js/governance-chat.js and
 * the shared /static/js/governance-report.js evidence builder.
 *
 * Two layout modes on the SAME markup + JS:
 *   .govchat-hero              → full /demo experience (tall, input-first hero)
 *   .govchat-hero.gc-compact   → compact homepage embed below the hero (bounded
 *                                height, shorter thread, "View Full Demonstration")
 *
 * Wrapper classes are gc-* prefixed so they never collide with the marketing
 * homepage's own .hero / .hero-bg. The message classes keep their gh-* names
 * (already unique). Depends on the site tokens --mono / --sans / --accent from
 * /css/styles.css (present on every apex page via the api-base/header include).
 */

/* ── Section shell ── */
.govchat-hero{
  position:relative;isolation:isolate;
  min-height:calc(100vh - 72px);
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  padding:88px 24px 72px;
  background:
    radial-gradient(ellipse 62% 42% at 50% 34%, rgba(43,80,150,.16) 0%, rgba(3,5,12,0) 62%),
    radial-gradient(ellipse 130% 90% at 50% -10%, #0b1124 0%, #070b16 46%, #03050c 100%);
  overflow:hidden;
}
.gc-bg{ display:none; }
.gc-glass{
  width:100%;max-width:720px;margin:0 auto 22px;
  text-align:center;box-sizing:border-box;
  padding:0 20px;
  background:none;border:none;border-radius:0;
  -webkit-backdrop-filter:none;backdrop-filter:none;box-shadow:none;
}
.gc-inner{
  position:relative;z-index:1;width:100%;
  display:flex;flex-direction:column;align-items:center;
}
/* ── Frosted-glass chat console ── */
.gc-console{
  width:100%;max-width:720px;
  background:none;border:none;border-radius:0;padding:0;
  box-shadow:none;-webkit-backdrop-filter:none;backdrop-filter:none;
  display:flex;flex-direction:column;align-items:center;
}
.gc-console .gh-chip{border-color:rgba(255,255,255,.10)}
.gc-console .gh-chip:hover{border-color:rgba(91,158,232,.55);color:#dde6f4}
/* ── Explore / full-demo link ── */
.gc-explore{
  margin-top:40px;display:inline-flex;align-items:center;gap:8px;
  padding:11px 24px;border:1px solid rgba(255,255,255,.12);border-radius:24px;
  background:rgba(255,255,255,.03);
  font-family:var(--mono);font-size:12px;letter-spacing:.08em;text-transform:uppercase;
  color:#9ab0cc;transition:border-color .18s,color .18s,background .18s;text-decoration:none;
}
.gc-explore:hover{border-color:rgba(91,158,232,.55);color:#e2e6ef;background:rgba(91,158,232,.06)}
/* Primary "View Full Demonstration" — filled azure, higher intent than gc-explore */
.gc-fulllink{
  margin-top:22px;display:inline-flex;align-items:center;gap:8px;
  padding:12px 26px;border:1px solid #5b9ee8;border-radius:24px;background:#5b9ee8;
  font-family:var(--mono);font-size:12px;letter-spacing:.08em;text-transform:uppercase;
  color:#08101f;font-weight:700;transition:background .18s,border-color .18s;text-decoration:none;
}
.gc-fulllink:hover{background:#7aacdc;border-color:#7aacdc}

/* ── Compact homepage embed ── */
.govchat-hero.gc-compact{
  min-height:auto;
  padding:36px 20px 40px;
  background:
    radial-gradient(ellipse 70% 60% at 50% 0%, rgba(43,80,150,.14) 0%, rgba(3,5,12,0) 70%),
    linear-gradient(180deg, #070b16 0%, #05070f 100%);
  border-top:1px solid rgba(255,255,255,.05);
  border-bottom:1px solid rgba(255,255,255,.05);
}
.govchat-hero.gc-compact .gc-glass{margin-bottom:16px}
/* Bounded thread on the homepage so a long transcript never dominates the page */
.govchat-hero.gc-compact #gh-thread{max-height:min(46vh,420px)}

@media(max-width:768px){
  .gc-console{
    -webkit-backdrop-filter:none;backdrop-filter:none;
    background:rgba(10,15,28,.97);
    padding:18px 14px 16px;border-radius:20px;
  }
  .gc-glass{
    -webkit-backdrop-filter:none;backdrop-filter:none;
    background:rgba(10,15,28,.97);
    padding:26px 18px 22px;border-radius:18px;
  }
  .govchat-hero{padding:60px 16px 56px}
  .govchat-hero.gc-compact{padding:28px 12px 32px}
  .govchat-hero.gc-compact .gc-glass{background:none;padding:0 4px}
}
@keyframes chat-ping {
  0%,100%{box-shadow:0 0 0 0 rgba(34,197,94,.6)}
  50%{box-shadow:0 0 0 8px rgba(34,197,94,0)}
}
.gc-em{ font-style:normal; color:#5b9ee8; }
.gh-chip{
  background:#0c1424;border:1px solid #24334f;border-radius:22px;
  padding:8px 18px;font-size:13px;color:#a7b6cc;cursor:pointer;
  font-family:var(--sans);transition:border-color .15s,color .15s,background .15s;
}
.gh-chip:hover{border-color:#3a5588;color:#e2e8f2;background:#101c34}
#gh-input::placeholder{color:#8494ab}
.gh-msg-user{
  align-self:flex-end;max-width:75%;
  background:#0f1c38;border:1px solid #1d3060;
  border-radius:20px 20px 4px 20px;
  padding:13px 18px;font-size:15px;color:#dde2ee;line-height:1.55;
  word-break:break-word;white-space:pre-wrap;
  position:relative;
}
.gh-msg-eve{
  align-self:flex-start;max-width:88%;
  display:flex;flex-direction:column;gap:6px;
}
.gh-msg-eve-row{ display:flex;gap:14px;align-items:flex-start; }
.gh-msg-eve-actions{ display:flex;flex-wrap:wrap;gap:6px;margin-left:46px; }
.gh-msg-eve-av{
  width:32px;height:32px;
  background:rgba(91,158,232,.1);border:1px solid rgba(91,158,232,.18);
  border-radius:50%;display:flex;align-items:center;justify-content:center;
  flex-shrink:0;margin-top:3px;
}
.gh-msg-eve-text{
  font-size:15px;color:#d4dae6;line-height:1.75;
  word-break:break-word;min-width:0;
  background:#0d1626;border:1px solid #1c2c50;
  border-radius:4px 18px 18px 18px;
  padding:13px 18px;
}
.gh-msg-eve-text strong{color:#e2e6ef}
.gh-msg-eve-text code{
  background:#0f1830;padding:2px 7px;border-radius:4px;
  font-family:var(--mono);font-size:12px;color:#8be0ff;
}
/* ── Folded governance-report evidence panel (deterministic demos) ── */
.gh-report{margin-top:12px}
.gh-report summary{
  display:inline-flex;align-items:center;gap:7px;cursor:pointer;
  padding:7px 14px;border:1px solid #24334f;border-radius:16px;
  background:#0c1424;color:#5b9ee8;
  font-family:var(--mono);font-size:11px;letter-spacing:.05em;text-transform:uppercase;
  transition:border-color .15s,background .15s;list-style:none;
}
.gh-report summary::-webkit-details-marker{display:none}
.gh-report summary::before{content:'\25B8';font-size:10px;transition:transform .15s}
.gh-report[open] summary::before{transform:rotate(90deg)}
.gh-report summary:hover{border-color:#3a5588;background:#101c34}
.gh-report pre{
  margin-top:10px;max-height:420px;overflow:auto;
  background:#060b18;border:1px solid #16233f;border-radius:10px;
  padding:14px 16px;font-family:var(--mono);font-size:11.5px;line-height:1.55;
  color:#9fb4d4;white-space:pre;
}
.gh-dot{
  width:6px;height:6px;background:#7f9cc0;border-radius:50%;display:inline-block;
  animation:gh-bounce 1.4s infinite ease-in-out both;
}
.gh-dot:nth-child(2){animation-delay:.2s}
.gh-dot:nth-child(3){animation-delay:.4s}
@keyframes gh-bounce{
  0%,80%,100%{transform:translateY(0)}
  40%{transform:translateY(-8px)}
}
.gh-msg-eve-text.streaming::after{
  content:'';display:inline-block;width:2px;height:.9em;
  background:#5b9ee8;vertical-align:text-bottom;margin-left:2px;
  animation:gh-caret 1s steps(2,start) infinite;
}
@keyframes gh-caret{to{opacity:0}}
.gh-msg-eve-text.streaming .ch{display:inline;opacity:0;animation:gh-ch-in 220ms ease-out forwards;}
@keyframes gh-ch-in{from{opacity:0;filter:blur(2px);transform:translateY(2px);}to{opacity:1;filter:blur(0);transform:translateY(0);}}
@media(prefers-reduced-motion:reduce){.gh-msg-eve-text.streaming .ch{animation:none;opacity:1;}}
#gh-thread::-webkit-scrollbar{width:3px}
#gh-thread::-webkit-scrollbar-track{background:transparent}
#gh-thread::-webkit-scrollbar-thumb{background:#1a2444;border-radius:4px}
.gh-copy-btn{
  display:inline-flex;align-items:center;gap:5px;background:transparent;border:1px solid #1a2444;border-radius:6px;
  padding:4px 10px;font-size:11px;color:#4a6080;cursor:pointer;
  font-family:var(--mono);transition:border-color .15s,color .15s;
}
.gh-copy-btn:hover{border-color:#2a4070;color:#7aacdc;}
.gh-copy-btn.copied{color:#22c55e;border-color:rgba(34,197,94,.4);}
.gh-copy-btn.gh-copy-report{background:#5b9ee8;border-color:#5b9ee8;color:#0a0e1a;font-weight:700;letter-spacing:.02em;}
.gh-copy-btn.gh-copy-report:hover{background:#7aacdc;border-color:#7aacdc;color:#0a0e1a;}
.gh-copy-btn.gh-copy-report.copied{background:#22c55e;border-color:#22c55e;color:#0a0e1a;}
.gh-proof-btn{
  display:inline-flex;align-items:center;gap:5px;background:transparent;border:1px solid rgba(91,158,232,.3);border-radius:6px;
  padding:4px 10px;font-size:11px;color:#5b9ee8;cursor:pointer;text-decoration:none;
  font-family:var(--mono);transition:border-color .15s,background .15s,color .15s;
}
.gh-proof-btn:hover{border-color:rgba(91,158,232,.7);background:rgba(91,158,232,.08);color:#7aacdc;}
.gh-fb{padding:4px 8px;}
.gh-fb.active{color:#5b9ee8;border-color:rgba(91,158,232,.5);background:rgba(91,158,232,.10);}
.gh-user-edit{
  position:absolute;left:-32px;bottom:6px;width:26px;height:26px;
  display:inline-flex;align-items:center;justify-content:center;
  background:transparent;border:1px solid transparent;border-radius:6px;
  color:#6a80a4;cursor:pointer;opacity:0;transition:opacity .15s,color .15s,border-color .15s;
}
.gh-msg-user:hover .gh-user-edit{opacity:1;}
.gh-user-edit:hover{color:#9ab0cc;border-color:rgba(255,255,255,.14);}
@media(hover:none){.gh-user-edit{opacity:.7;}}
/* ── Rich markdown rendering ── */
.gh-pre{
  background:#060c1a;border:1px solid #0f1a30;border-radius:8px;
  padding:14px 16px;margin:10px 0 6px;overflow-x:auto;
  font-family:var(--mono);font-size:12.5px;line-height:1.65;color:#a8c8e8;
  white-space:pre;max-width:100%;box-sizing:border-box;
}
.gh-pre code{background:none;padding:0;color:inherit;font-size:inherit;border-radius:0;}
.gh-msg-eve-text h1.gh-h,.gh-msg-eve-text h2.gh-h,.gh-msg-eve-text h3.gh-h{
  color:#e2e6ef;font-weight:600;margin:16px 0 6px;line-height:1.3;
  font-family:var(--sans);border:none;padding:0;
}
.gh-msg-eve-text h1.gh-h{font-size:18px;}
.gh-msg-eve-text h2.gh-h.gh-h1{font-size:18px;}
.gh-msg-eve-text h2.gh-h{font-size:16px;}
.gh-msg-eve-text h3.gh-h{font-size:14px;color:#9ab0cc;}
.gh-list{margin:8px 0 8px 20px;padding:0;color:#c8cdd8;line-height:1.75;}
.gh-list li{margin:3px 0;}
ul.gh-list{list-style:disc;}
ol.gh-list{list-style:decimal;}
/* Tables — horizontally scrollable on narrow screens */
.gh-table-wrap{overflow-x:auto;margin:12px 0;max-width:100%;-webkit-overflow-scrolling:touch;}
.gh-table{border-collapse:separate;border-spacing:0;width:100%;font-size:13px;
  color:#c8cdd8;border:1px solid #1a2444;border-radius:8px;overflow:hidden;}
.gh-table th,.gh-table td{padding:8px 12px;border-bottom:1px solid #1a2444;
  text-align:left;vertical-align:top;line-height:1.55;}
.gh-table th+th,.gh-table td+td{border-left:1px solid #1a2444;}
.gh-table thead th{background:rgba(91,158,232,.10);color:#9ab0cc;font-weight:600;
  font-size:11.5px;letter-spacing:.03em;text-transform:uppercase;white-space:nowrap;}
.gh-table tbody tr:last-child td{border-bottom:none;}
.gh-table tbody tr:nth-child(even) td{background:rgba(255,255,255,.02);}
.gh-table tbody tr:hover td{background:rgba(91,158,232,.06);}
/* Blockquotes, rules, links, strikethrough */
.gh-quote{margin:10px 0;padding:6px 14px;border-left:3px solid #5b9ee8;
  background:rgba(91,158,232,.06);color:#b7c2d4;border-radius:0 6px 6px 0;}
.gh-hr{border:none;border-top:1px solid #1a2444;margin:16px 0;}
.gh-msg-eve-text a{color:#5b9ee8;text-decoration:underline;text-underline-offset:2px;}
.gh-msg-eve-text a:hover{color:#7db4f0;}
.gh-msg-eve-text del{opacity:.6;}
/* ── Fullscreen chat (mobile) ── */
#gh-exit-btn{
  display:none;width:100%;align-items:center;justify-content:space-between;
  padding:10px 16px;background:#0a0e1a;border-bottom:1px solid #1a2444;
  font-family:var(--mono);font-size:12px;color:#5b9ee8;letter-spacing:.04em;
  flex-shrink:0;box-sizing:border-box;
}
.gh-exit-close{
  background:transparent;border:1px solid #1a2444;border-radius:6px;
  padding:5px 16px;color:#9ab0cc;cursor:pointer;font-family:var(--mono);font-size:11px;
}
.gh-exit-close:hover{border-color:#2a4070;color:#e2e6ef}
@media(max-width:768px){
  #gh-chat-panel.expanded{
    position:fixed;top:0;left:0;width:100%;
    height:100vh;height:100dvh;
    background:#0e1324;z-index:9999;
    display:flex;flex-direction:column;align-items:stretch;
    box-sizing:border-box;
  }
  #gh-chat-panel.expanded #gh-exit-btn{display:flex}
  #gh-chat-panel.expanded #gh-thread{
    flex:1;max-height:none!important;margin-bottom:0;
    border-bottom:1px solid #1a2444;padding:12px 16px;
  }
  #gh-chat-panel.expanded #gh-typing{padding:6px 16px;width:auto}
  #gh-chat-panel.expanded #gh-bar{
    max-width:100%;border-radius:0;
    border-left:none;border-right:none;border-bottom:none;
    border-top:1px solid #1a2444;
    margin-top:auto;
  }
  #gh-chat-panel.expanded #gh-timing{
    max-width:100%;border-radius:0;margin:0;
    border-left:none;border-right:none;border-bottom:none;
  }
  #gh-chat-panel.expanded #gh-ai-note{max-width:100%;margin:10px 0 0;padding:0 16px;box-sizing:border-box}
  .gh-msg-eve-actions{margin-left:36px}
}

/* ── Focused fullscreen chat on DESKTOP — opt-in via <html class="gc-fs-desktop"> (used on /demo).
   Reuses the mobile .expanded machinery but centers the column and keeps the rounded input pill. ── */
html.gc-fs-desktop #gh-chat-panel.expanded{
  position:fixed;inset:0;width:100%;height:100vh;height:100dvh;
  background:#0e1324;z-index:9999;
  display:flex;flex-direction:column;align-items:center;box-sizing:border-box;
}
html.gc-fs-desktop #gh-chat-panel.expanded #gh-exit-btn{display:flex;width:100%}
html.gc-fs-desktop #gh-chat-panel.expanded #gh-copy-bar{max-width:860px!important;margin:8px auto 4px}
html.gc-fs-desktop #gh-chat-panel.expanded #gh-thread{
  flex:1;max-height:none!important;max-width:860px!important;width:100%;
  margin:0 auto;padding:20px 20px 8px;box-sizing:border-box;
}
html.gc-fs-desktop #gh-chat-panel.expanded #gh-typing{max-width:860px!important;width:100%;margin:0 auto;padding:4px 20px;box-sizing:border-box}
html.gc-fs-desktop #gh-chat-panel.expanded #gh-bar{max-width:860px!important;margin:auto auto 22px}
html.gc-fs-desktop #gh-chat-panel.expanded #gh-timing{max-width:860px!important;margin:10px auto 0}
html.gc-fs-desktop #gh-chat-panel.expanded #gh-ai-note{max-width:860px!important;margin:12px auto 0}
