/* ============================================================
   IRON CAPITAL MARKETS - chat assistant styling
   ============================================================
   Ported from the Iron Capital Partners build so the two sister
   sites present the same assistant. Behaviour lives in
   assets/js/chatbot.js.

   The rules below use var(--red); this site defines it as
   #8b1a1a, but the fallback here keeps the launcher on-brand
   even on a page where that custom property is out of scope.
   ============================================================ */
.icb-launcher,.icb-panel,.icb-chip,.icb-btn,.icb-teaser{
  /* The site declares its palette on .euro,.award-pop - NOT on :root - so every
     colour below resolved to nothing outside those two components, and the
     rules that used them were dropped. The header came out white-on-white and
     the bubbles lost their borders. Declaring the palette on the assistant's
     own roots is what the header comment above always intended: the widget
     carries its own colours and does not care which page it lands on. Values
     match the site's own set; --red-pale and --dark are not in that set. */
  --red:#8b1a1a;
  --red-light:#a52020;
  --red-pale:#f8efef;
  --gold-mid:#c99a3f;
  --charcoal:#1c1c1c;
  --dark:#2a2a2a;
  --mid:#555;
  --muted:#888;
  --border:#e4e1da;
  --bg:#f5f4f1;
}

/* The Brook theme sets a global `button{padding:0 41px}`, which stretched the
   round launcher to 82x54 and squashed the close button. The Partners site has
   no such rule, so these overrides are specific to this build. */
button.icb-launcher{
  width:58px !important;height:58px !important;padding:0 !important;
  min-width:0 !important;flex:none !important;line-height:1 !important;
}
.icb-panel button.icb-x{
  width:34px !important;height:34px !important;padding:0 !important;
  min-width:0 !important;flex:none !important;
}
.icb-panel button.icb-send{
  width:42px !important;height:42px !important;padding:0 !important;
  min-width:0 !important;flex:none !important;
}
/* The theme also paints every bare `button` green (#68AE4A), hover included.
   The chips and action buttons set their own background so they win; the send
   arrow and the header cross do not, and came out green. */
.icb-panel button.icb-send,.icb-panel button.icb-send:hover,
.icb-panel button.icb-send:focus,.icb-panel button.icb-send:active{
  background:transparent !important;color:var(--red) !important;
}
.icb-panel button.icb-x,.icb-panel button.icb-x:hover,
.icb-panel button.icb-x:focus,.icb-panel button.icb-x:active{
  background:transparent !important;
}
.icb-panel button.icb-send:hover{color:var(--red-light) !important;}
.icb-chips button.icb-chip,.icb-panel .icb-actions button.icb-btn{
  padding:8px 14px !important;min-width:0 !important;width:auto !important;
}
/* Same global `button` rule reaches the teaser's two controls and blew them out
   into white slabs over the copy. */
.icb-teaser button.icb-teaser-x{
  width:26px !important;height:26px !important;padding:0 !important;
  min-width:0 !important;flex:none !important;line-height:1 !important;
  background:none !important;border:0 !important;
}
.icb-teaser button.icb-teaser-mute{
  width:auto !important;height:auto !important;padding:2px 4px !important;
  min-width:0 !important;line-height:1.4 !important;
  background:none !important;border:0 !important;
}

/* ── Launcher icons ──
   The inherited rules only toggled display and assumed an `.icb-open` class on
   an ancestor; this build puts `icb-launcher-open` on the launcher itself, so
   the swap is re-stated here against the class that is actually applied.
   Both glyphs are now stroked: the launcher shows a speech bubble, the open
   state a cross, so neither needs the solid-fill opt-out the IRON mark did. */
.icb-launcher .icb-ico-chat,
.icb-launcher .icb-ico-close{
  display:block;width:25px;height:25px;color:#fff;pointer-events:none;
  transition:opacity .18s ease,transform .18s ease;
}
.icb-launcher .icb-ico-close{width:22px;height:22px;}
/* The bubble inherits the generic `.icb-launcher svg{fill:none;stroke:currentColor}`
   below. Its three dots are zero-length paths, so they only appear at all
   because of the round linecap - do not switch that to butt or square. */
.icb-launcher .icb-ico-chat{fill:none;stroke:currentColor;}

/* Default: bubble shown, cross hidden. */
.icb-launcher .icb-ico-close{position:absolute;opacity:0;transform:rotate(-45deg) scale(.8);}
.icb-launcher .icb-ico-chat{opacity:1;transform:none;}

/* Open: cross shown, bubble hidden. */
.icb-launcher.icb-launcher-open .icb-ico-chat{opacity:0;transform:rotate(45deg) scale(.8);}
.icb-launcher.icb-launcher-open .icb-ico-close{opacity:1;transform:none;}

button.icb-launcher{position:fixed;}   /* keep the absolutely-placed cross anchored */

@media (prefers-reduced-motion: reduce){
  .icb-launcher .icb-ico-chat,
  .icb-launcher .icb-ico-close{transition:none;transform:none !important;}
}

/* ─── CHAT ASSISTANT ───
   Guided, rule-based assistant (js/chatbot.js). Every answer comes from approved
   site copy; anything outside that is handed to the team by email. The launcher
   sits under the nav (9999) so the mobile menu covers it; the open panel sits
   above the nav but under the announcement modal (99998). */
.icb-launcher{position:fixed;right:24px;bottom:24px;z-index:9990;width:58px;height:58px;border-radius:50%;border:0;background:var(--red);color:#fff;display:flex;align-items:center;justify-content:center;cursor:pointer;box-shadow:0 12px 30px -8px rgba(139,26,26,0.55),0 2px 6px rgba(0,0,0,0.12);transition:transform .25s ease,background-color .2s ease,bottom .35s ease}
.icb-launcher:hover{background:var(--red-light);transform:translateY(-2px)}
.icb-launcher:focus-visible{outline:2px solid var(--charcoal);outline-offset:3px}
.icb-launcher svg{width:26px;height:26px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.icb-dot{position:absolute;top:3px;right:3px;width:12px;height:12px;border-radius:50%;background:var(--gold-mid);border:2px solid #fff}
/* homepage hero: lift clear of the video sound toggle in the bottom-right corner */
.icb-lift .icb-launcher{bottom:100px}
.icb-lift .icb-teaser,.icb-lift .icb-panel{bottom:172px}
.icb-lift .icb-panel{height:min(560px,calc(100vh - 300px));height:min(560px,calc(100dvh - 300px))}
.icb-teaser{position:fixed;right:24px;bottom:96px;z-index:9990;max-width:260px;background:#fff;border:1px solid var(--border);border-left:3px solid var(--red);box-shadow:0 14px 34px -14px rgba(28,28,28,.35);padding:14px 36px 14px 16px;font-size:14px;line-height:1.5;color:var(--dark);opacity:0;transform:translateY(8px);pointer-events:none;transition:opacity .3s ease,transform .3s ease,bottom .35s ease;cursor:pointer}
.icb-teaser.show{opacity:1;transform:none;pointer-events:auto}
.icb-teaser strong{display:block;font-family:var(--font-serif);font-weight:500;font-size:15px;color:var(--charcoal);margin-bottom:2px}
.icb-teaser-x{position:absolute;top:6px;right:6px;width:26px;height:26px;border:0;background:none;color:var(--mid);font-size:18px;line-height:1;cursor:pointer}
.icb-panel{position:fixed;right:24px;bottom:96px;z-index:10001;width:380px;max-width:calc(100vw - 32px);height:min(600px,calc(100vh - 200px));height:min(600px,calc(100dvh - 200px));display:flex;flex-direction:column;background:#fff;border:1px solid var(--border);border-top:3px solid var(--red);box-shadow:0 30px 70px -24px rgba(28,28,28,.45);opacity:0;visibility:hidden;transform:translateY(12px);transition:opacity .28s ease,transform .28s ease,visibility .28s,bottom .35s ease}
.icb-open .icb-panel{opacity:1;visibility:visible;transform:none}
.icb-head{display:flex;align-items:center;gap:12px;padding:14px 16px;background:var(--charcoal);color:#fff;flex-shrink:0}
.icb-avatar{width:38px;height:38px;border-radius:50%;background:#fff;display:flex;align-items:center;justify-content:center;flex-shrink:0}
.icb-avatar img{width:22px;height:auto;display:block}
.icb-title{font-family:var(--font-serif);font-size:17px;line-height:1.2}
.icb-sub{font-size:12px;color:rgba(255,255,255,.66);display:flex;align-items:center;gap:6px;margin-top:3px}
.icb-sub::before{content:'';width:7px;height:7px;border-radius:50%;background:#3fb56b;flex-shrink:0}
.icb-x{margin-left:auto;width:36px;height:36px;border:0;background:transparent;color:rgba(255,255,255,.75);cursor:pointer;display:flex;align-items:center;justify-content:center}
.icb-x:hover,.icb-x:focus-visible{color:#fff;outline:none}
.icb-x svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round}
.icb-log{flex:1;overflow-y:auto;overscroll-behavior:contain;padding:18px 16px 8px;background:var(--bg);display:flex;flex-direction:column;gap:10px}
.icb-msg{max-width:88%;font-size:14.5px;line-height:1.55;padding:11px 14px;overflow-wrap:anywhere;animation:icbIn .25s ease}
.icb-bot{align-self:flex-start;background:#fff;border:1px solid var(--border);color:var(--dark)}
.icb-user{align-self:flex-end;background:var(--red);color:#fff}
.icb-msg a{color:var(--red);font-weight:600;text-decoration:underline;text-underline-offset:2px}
.icb-msg ul{margin:6px 0 2px;padding-left:18px}
.icb-msg li{margin:3px 0}
.icb-typing{align-self:flex-start;background:#fff;border:1px solid var(--border);padding:12px 14px;display:flex;gap:4px}
.icb-typing i{width:6px;height:6px;border-radius:50%;background:var(--muted);animation:icbDot 1s infinite ease-in-out}
.icb-typing i:nth-child(2){animation-delay:.15s}
.icb-typing i:nth-child(3){animation-delay:.3s}
.icb-chips{display:flex;flex-wrap:wrap;gap:8px;padding:8px 16px 12px;background:var(--bg);flex-shrink:0}
.icb-chips:empty{display:none}
.icb-chip{border:1px solid rgba(139,26,26,.35);background:#fff;color:var(--red);font-family:var(--font-sans);font-size:13px;font-weight:600;padding:7px 12px;cursor:pointer;transition:background-color .2s,color .2s}
.icb-chip:hover,.icb-chip:focus-visible{background:var(--red);color:#fff;outline:none}
.icb-actions{display:flex;flex-direction:column;gap:8px;margin-top:10px}
.icb-btn{display:flex;align-items:center;justify-content:center;gap:8px;background:var(--red);color:#fff!important;text-decoration:none!important;font-family:var(--font-sans);font-size:12px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;padding:11px 14px;border:0;cursor:pointer}
.icb-btn:hover{background:var(--red-light)}
.icb-btn-ghost{background:#fff;color:var(--red)!important;border:1px solid rgba(139,26,26,.35)}
.icb-btn-ghost:hover{background:var(--red-pale)}
.icb-foot{flex-shrink:0;border-top:1px solid var(--border);background:#fff}
.icb-form{display:flex;align-items:center}
.icb-form:focus-within{box-shadow:inset 0 0 0 2px rgba(139,26,26,.3)}
.icb-input{flex:1;min-width:0;border:0;padding:15px 16px;font-family:var(--font-sans);font-size:15px;color:var(--dark);background:transparent;outline:none}
.icb-send{width:52px;height:50px;border:0;background:transparent;color:var(--red);cursor:pointer;display:flex;align-items:center;justify-content:center}
.icb-send:disabled{color:#c9c6c0;cursor:default}
.icb-send svg{width:20px;height:20px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.icb-note{font-size:11.5px;color:var(--mid);padding:0 16px 10px;line-height:1.5}
.icb-note a{color:var(--red);font-weight:600}
@media(max-width:540px){.icb-launcher{right:16px;bottom:16px;width:54px;height:54px}.icb-lift .icb-launcher{bottom:84px}.icb-teaser{right:16px;bottom:82px;max-width:calc(100vw - 32px)}.icb-lift .icb-teaser{bottom:150px}/* full-screen sheet on phones, with the page behind it locked */
  .icb-panel,.icb-lift .icb-panel{top:0;right:0;bottom:0;left:0;width:100%;max-width:none;height:100%;border:0}html.icb-lock,html.icb-lock body{overflow:hidden}}
@media(prefers-reduced-motion:reduce){.icb-launcher,.icb-panel,.icb-teaser{transition:none}.icb-msg,.icb-typing i{animation:none}}
@media print{.icb-root{display:none!important}}

/* ─── Landing greeting ───
   The teaser and its chime fire once per session on the landing page. The
   launcher takes a single nudge and a dot at the same moment, so the greeting
   still reads on a muted device — the sound is never the only signal.
   `.icb-root` in the print rule above matches nothing in this build; the three
   real elements are named here instead. */
.icb-teaser{transform:translateY(8px) scale(.96);transform-origin:bottom right}
.icb-teaser.show{animation:icbPop .42s cubic-bezier(.2,1.5,.4,1) both}
@keyframes icbPop{
  0%  {opacity:0;transform:translateY(10px) scale(.9)}
  60% {opacity:1;transform:translateY(-2px) scale(1.03)}
  100%{opacity:1;transform:none}
}
.icb-launcher.icb-nudge{animation:icbNudge .6s ease both}
@keyframes icbNudge{
  0%,100%{transform:none}
  30%    {transform:translateY(-6px) scale(1.06)}
  60%    {transform:translateY(0)    scale(.98)}
}
/* Unread dot: only while the greeting is unanswered. */
.icb-launcher .icb-dot{display:none}
.icb-launcher.icb-has-dot .icb-dot{display:block}

/* Mute, offered inside the teaser so it is reachable the moment sound plays. */
.icb-teaser-mute{position:absolute;bottom:6px;right:8px;border:0;background:none;padding:2px 4px;
  font-family:var(--font-sans);font-size:10.5px;letter-spacing:.06em;text-transform:uppercase;
  color:var(--mid);cursor:pointer}
.icb-teaser-mute:hover,.icb-teaser-mute:focus-visible{color:var(--red);outline:none}
.icb-teaser{padding-bottom:26px}

@media(prefers-reduced-motion:reduce){
  .icb-teaser.show,.icb-launcher.icb-nudge{animation:none}
  .icb-teaser{transform:none}
}
@media print{.icb-launcher,.icb-panel,.icb-teaser{display:none!important}}

/* Panel avatar: the IRON mark on the white disc (the stylesheet only knew an <img>). */
.icb-avatar svg{width:20px;height:20px;display:block;fill:var(--red);stroke:none}
