/* Apex Edge scripted support chat — uses site brand tokens from style.css when present. */
.ae-sc-root{
  --ae-sc-bg: var(--surface, #0f1218);
  --ae-sc-bg2: var(--surface2, #151925);
  --ae-sc-page: var(--bg, #07080b);
  --ae-sc-line: var(--line, rgba(255,255,255,.09));
  --ae-sc-line2: var(--line2, rgba(255,255,255,.16));
  --ae-sc-text: var(--text, #eceef3);
  --ae-sc-muted: var(--muted, #a3a8b8);
  --ae-sc-dim: var(--dim, #8a90a2);
  --ae-sc-gold: var(--gold, #D4AF37);
  --ae-sc-gold2: var(--gold2, #f1d77f);
  --ae-sc-radius: 18px;
  --ae-sc-shadow: 0 20px 60px rgba(0,0,0,.45);
  --ae-sc-font: var(--font, 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif);
  position: relative;
  z-index: 400;
  font-family: var(--ae-sc-font);
  color: var(--ae-sc-text);
  line-height: 1.5;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}
.ae-sc-root *,.ae-sc-root *::before,.ae-sc-root *::after{box-sizing:border-box}
.ae-sc-root button{font:inherit;cursor:pointer;border:0}
.ae-sc-root a{color:var(--ae-sc-gold);text-decoration:none}
.ae-sc-root a:hover{color:var(--ae-sc-gold2);text-decoration:underline}
.ae-sc-root:focus-within{outline:none}

.ae-sc-root .ae-sc-launcher,.ae-sc-launcher{
  position:fixed;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(80px, calc(20px + env(safe-area-inset-bottom)));
  z-index: 250; /* below .cookie-banner (300) so consent actions stay clickable */
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding:12px 16px 12px 12px;
  border-radius:999px;
  -webkit-appearance:none;
  appearance:none;
  border:0;
  background-color:#D4AF37;
  background-image:linear-gradient(180deg,#f0d57a,#D4AF37);
  color:#14110a;
  font-weight:800;
  font-size:.92rem;
  letter-spacing:-.01em;
  box-shadow:0 8px 26px rgba(212,175,55,.32), inset 0 1px 0 rgba(255,255,255,.4);
  transition:transform .2s, box-shadow .2s;
}
.ae-sc-launcher:hover{transform:translateY(-2px);box-shadow:0 14px 34px rgba(212,175,55,.4)}
.ae-sc-launcher:focus-visible{outline:2px solid var(--ae-sc-gold2);outline-offset:3px}
.ae-sc-launcher[aria-expanded="true"]{display:none}
.ae-sc-launcher svg{width:22px;height:22px;flex:none}
.ae-sc-badge{
  position:absolute;
  top:-2px;right:-2px;
  width:10px;height:10px;
  border-radius:50%;
  background:#2fd4b0;
  border:2px solid var(--ae-sc-page);
  pointer-events:none;
}

.ae-sc-panel{
  position:fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(76px, calc(16px + env(safe-area-inset-bottom)));
  z-index: 402;
  width:min(400px, calc(100vw - 24px));
  height:min(640px, calc(100vh - 24px - env(safe-area-inset-top, 0px)));
  max-height:calc(100dvh - 24px);
  display:flex;
  flex-direction:column;
  background:linear-gradient(180deg, var(--ae-sc-bg), #0b0d12);
  border:1px solid var(--ae-sc-line2);
  border-radius:var(--ae-sc-radius);
  box-shadow:var(--ae-sc-shadow), 0 0 0 1px rgba(212,175,55,.08);
  overflow:hidden;
}
.ae-sc-panel[hidden]{display:none !important}

.ae-sc-header{
  display:flex;
  align-items:center;
  gap:12px;
  padding:14px 14px 14px 16px;
  border-bottom:1px solid var(--ae-sc-line);
  background:rgba(255,255,255,.02);
  flex:none;
}
.ae-sc-mark{
  width:36px;height:36px;border-radius:10px;flex:none;
  display:grid;place-items:center;
  background:rgba(212,175,55,.12);
  border:1px solid rgba(212,175,55,.35);
  color:var(--ae-sc-gold);
}
.ae-sc-mark svg{width:20px;height:20px}
.ae-sc-header h2{
  margin:0;
  font-size:1rem;
  font-weight:800;
  letter-spacing:-.02em;
  line-height:1.2;
  color:#fff;
}
.ae-sc-header p{
  margin:2px 0 0;
  font-size:.75rem;
  color:var(--ae-sc-dim);
  font-weight:600;
}
.ae-sc-close{
  margin-left:auto;
  width:44px;height:44px;
  border-radius:12px;
  display:grid;place-items:center;
  color:#fff;
  border:1px solid transparent;
}
.ae-sc-close:hover{background:rgba(255,255,255,.06);border-color:var(--ae-sc-line2)}
.ae-sc-close:focus-visible{outline:2px solid var(--ae-sc-gold);outline-offset:2px}
.ae-sc-close svg{width:18px;height:18px}

.ae-sc-log{
  position:relative;
  flex:1;
  overflow-y:auto;
  padding:16px 16px 20px;
  display:flex;
  flex-direction:column;
  gap:12px;
  scroll-behavior:smooth;
  -webkit-overflow-scrolling:touch;
}
.ae-sc-msg{
  max-width:92%;
  padding:11px 14px;
  border-radius:14px;
  font-size:.92rem;
  color:var(--ae-sc-text);
}
.ae-sc-msg p{margin:0 0 .7em;color:inherit}
.ae-sc-msg p:last-child{margin-bottom:0}
.ae-sc-msg ul{margin:.4em 0 .7em;padding-left:1.15em;color:inherit}
.ae-sc-msg li{margin:.2em 0}
.ae-sc-bot{
  align-self:flex-start;
  background:var(--ae-sc-bg2);
  border:1px solid var(--ae-sc-line);
  border-top-left-radius:6px;
}
.ae-sc-user{
  align-self:flex-end;
  background:linear-gradient(180deg,#f0d57a,#D4AF37);
  color:#14110a;
  font-weight:600;
  border-top-right-radius:6px;
}
.ae-sc-links{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.ae-sc-links a{
  display:inline-flex;
  align-items:center;
  padding:7px 11px;
  border-radius:999px;
  border:1px solid rgba(212,175,55,.4);
  background:rgba(212,175,55,.08);
  color:var(--ae-sc-gold2);
  font-size:.78rem;
  font-weight:700;
}
.ae-sc-links a:hover{background:rgba(212,175,55,.16);text-decoration:none;color:#fff}

.ae-sc-topics,.ae-sc-choices{
  display:flex;flex-wrap:wrap;gap:8px;
  max-width:100%;
}
.ae-sc-chip,.ae-sc-qbtn{
  display:inline-flex;align-items:center;
  padding:7px 11px;
  border-radius:999px;
  border:1px solid rgba(212,175,55,.38);
  background:rgba(212,175,55,.08);
  color:#fff;
  font-size:.78rem;
  font-weight:600;
  text-align:left;
  transition:border-color .2s, background .2s, color .2s;
}
.ae-sc-qbtn{border-radius:12px;width:100%;font-weight:600;line-height:1.35}
.ae-sc-chip:hover,.ae-sc-qbtn:hover,
.ae-sc-chip:focus-visible,.ae-sc-qbtn:focus-visible{
  border-color:var(--ae-sc-gold);
  color:var(--ae-sc-gold2);
  background:rgba(212,175,55,.08);
  outline:none;
}
.ae-sc-chip:focus-visible,.ae-sc-qbtn:focus-visible{outline:2px solid var(--ae-sc-gold);outline-offset:2px}

.ae-sc-help{margin-top:10px}
.ae-sc-help-label{font-size:.8rem;color:var(--ae-sc-muted);font-weight:600;margin-bottom:8px}
.ae-sc-help-btns{display:flex;gap:8px}
.ae-sc-yes,.ae-sc-no,.ae-sc-send,.ae-sc-submit{
  display:inline-flex;align-items:center;justify-content:center;
  min-height:40px;
  padding:8px 16px;
  border-radius:10px;
  font-weight:700;
  font-size:.88rem;
}
.ae-sc-yes,.ae-sc-submit,.ae-sc-send{
  background:linear-gradient(180deg,#f0d57a,#D4AF37);
  color:#14110a;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.35);
}
.ae-sc-yes:hover,.ae-sc-submit:hover,.ae-sc-send:hover{filter:brightness(1.05)}
.ae-sc-no,.ae-sc-mailto{
  border:1px solid var(--ae-sc-line2);
  color:#fff;
  background:rgba(255,255,255,.03);
}
.ae-sc-no:hover,.ae-sc-mailto:hover{border-color:var(--ae-sc-gold);color:var(--ae-sc-gold2)}
.ae-sc-yes:focus-visible,.ae-sc-no:focus-visible,.ae-sc-send:focus-visible,.ae-sc-submit:focus-visible,.ae-sc-mailto:focus-visible{
  outline:2px solid var(--ae-sc-gold);outline-offset:2px;
}

.ae-sc-form{
  display:flex;flex-direction:column;gap:8px;margin-top:4px;
}
.ae-sc-form label{
  display:flex;flex-direction:column;gap:5px;
  font-size:.78rem;font-weight:700;color:var(--ae-sc-muted);letter-spacing:.02em;
}
.ae-sc-form input,.ae-sc-form textarea{
  font:inherit;
  color:var(--ae-sc-text);
  background:var(--ae-sc-page);
  border:1px solid var(--ae-sc-line2);
  border-radius:10px;
  padding:10px 12px;
  width:100%;
}
.ae-sc-form textarea{min-height:64px;max-height:120px;resize:vertical}
.ae-sc-form input:focus,.ae-sc-form textarea:focus{
  outline:2px solid var(--ae-sc-gold);outline-offset:1px;border-color:var(--ae-sc-gold);
}
.ae-sc-form-error{color:#ff6b6b;font-size:.8rem;font-weight:600;margin:0}
.ae-sc-form-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.ae-sc-mailto{display:inline-flex;align-items:center;min-height:40px;padding:8px 14px;border-radius:10px;font-weight:700;font-size:.85rem;color:#fff}
.ae-sc-hp{position:absolute;left:-9999px;height:0;width:0;overflow:hidden}

.ae-sc-composer{
  flex:none;
  display:flex;gap:8px;align-items:flex-end;
  padding:12px 14px calc(12px + env(safe-area-inset-bottom, 0px));
  border-top:1px solid var(--ae-sc-line);
  background:rgba(255,255,255,.015);
}
.ae-sc-composer label{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
.ae-sc-composer textarea{
  flex:1;
  font:inherit;
  color:var(--ae-sc-text);
  background:var(--ae-sc-page);
  border:1px solid var(--ae-sc-line2);
  border-radius:12px;
  padding:10px 12px;
  min-height:44px;
  max-height:120px;
  resize:none;
  line-height:1.4;
}
.ae-sc-composer textarea:focus{outline:2px solid var(--ae-sc-gold);outline-offset:1px;border-color:var(--ae-sc-gold)}
.ae-sc-send{min-width:44px;min-height:44px;padding:0 14px;border-radius:12px;flex:none}
.ae-sc-send[disabled]{opacity:.45;cursor:not-allowed;filter:none}

.ae-sc-sr{
  position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0;
}

@media (max-width: 520px){
  .ae-sc-launcher{right:max(12px, env(safe-area-inset-right));bottom:max(80px, calc(12px + env(safe-area-inset-bottom)))}
  .ae-sc-panel{
    right:0;left:0;bottom:64px;
    width:100%;
    height:calc(100dvh - 64px);
    max-height:calc(100dvh - 64px);
    border-radius:18px 18px 0 0;
    border-left:0;border-right:0;border-bottom:0;
  }
  .ae-sc-launcher-text{display:none}
  .ae-sc-launcher{padding:14px;width:56px;height:56px;justify-content:center}
}
@media (prefers-reduced-motion: reduce){
  .ae-sc-root *,.ae-sc-launcher{transition:none !important;scroll-behavior:auto}
}

/* Lift the bubble when the cookie banner is visible so it is not covered. */
body:has(.cookie-banner:not([hidden])) .ae-sc-launcher{
  bottom: calc(132px + env(safe-area-inset-bottom, 0px));
}
@media (max-width: 680px){
  /* Hide the chat bubble on narrow screens while the cookie banner is open
     so it cannot cover the banner text. It returns once the banner is dismissed. */
  body:has(.cookie-banner:not([hidden])) .ae-sc-launcher{
    display: none;
  }
}

.ae-sc-root.ae-sc-handoff .ae-sc-composer{display:none}
