/* GTES Chatbot - Live Agent. Scoped to .gtes-chat-* only; affects nothing else on the site. */

.gtes-chat-root{
  --gtc-brand:#0A1C4A;
  --gtc-brand-2:#12306E;
  --gtc-accent:#16752F;
  --gtc-accent-dark:#125C25;
  --gtc-signal:#8CC63F;
  --gtc-bg:#F7F9FC;
  --gtc-surface:#FFFFFF;
  --gtc-ink:#1E2739;
  --gtc-muted:#6F7C93;
  --gtc-border:#DFE5EF;
  --gtc-on-dark:#AFBDD9;
  --gtc-navy-50:#F2F5FC;
  --gtc-shadow:0 16px 40px rgba(10,28,74,.18);
  --gtc-font:"IBM Plex Sans","Segoe UI",Arial,sans-serif;
  --gtc-head:"Archivo","Helvetica Neue",Arial,sans-serif;
  --gtc-mono:"IBM Plex Mono",SFMono-Regular,Consolas,monospace;

  position:fixed;
  right:20px;
  bottom:20px;
  z-index:999999;
  font-family:var(--gtc-font);
  line-height:1.55;
}

.gtes-chat-root *,
.gtes-chat-root *::before,
.gtes-chat-root *::after{box-sizing:border-box;}

/* ---------------- launcher ---------------- */

.gtes-chat-launcher{
  display:flex;
  align-items:center;
  justify-content:center;
  width:58px;
  height:58px;
  padding:0;
  margin-left:auto;
  border:none;
  border-radius:12px;
  background:var(--gtc-accent);
  color:#fff;
  cursor:pointer;
  box-shadow:0 8px 24px rgba(10,28,74,.22);
  transition:transform .16s linear, background-color .16s linear;
}
.gtes-chat-launcher:hover{background:var(--gtc-accent-dark);transform:translateY(-2px);}
.gtes-chat-launcher:active{transform:scale(.985);}
.gtes-chat-launcher:focus-visible{outline:none;box-shadow:0 0 0 3px rgba(140,198,63,.45),0 8px 24px rgba(10,28,74,.22);}
.gtes-chat-launcher svg{width:26px;height:26px;display:block;}
.gtes-chat-root.is-open .gtes-chat-launcher{display:none;}

/* ---------------- panel ---------------- */

.gtes-chat-panel{
  display:none;
  flex-direction:column;
  width:380px;
  max-width:calc(100vw - 32px);
  height:min(560px, calc(100vh - 120px));
  background:var(--gtc-surface);
  border:1px solid var(--gtc-border);
  border-radius:12px;
  overflow:hidden;
  box-shadow:var(--gtc-shadow);
}
.gtes-chat-root.is-open .gtes-chat-panel{display:flex;}

/* header */

.gtes-chat-head{
  display:flex;
  align-items:center;
  gap:12px;
  padding:14px;
  background:var(--gtc-brand);
  color:#fff;
  flex:0 0 auto;
}
.gtes-chat-avatar{
  width:38px;height:38px;
  flex:0 0 38px;
  border-radius:8px;
  background:#fff;
  display:flex;align-items:center;justify-content:center;
  overflow:hidden;
}
.gtes-chat-avatar img{width:100%;height:100%;object-fit:contain;padding:3px;}
.gtes-chat-avatar span{
  font-family:var(--gtc-mono);
  font-weight:600;
  font-size:13px;
  letter-spacing:.02em;
  color:var(--gtc-brand);
}
.gtes-chat-id{min-width:0;flex:1 1 auto;}
.gtes-chat-name{
  font-family:var(--gtc-head);
  font-weight:700;
  font-size:15px;
  letter-spacing:-.01em;
  line-height:1.2;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.gtes-chat-status{
  display:flex;align-items:center;gap:6px;
  font-size:12px;
  color:var(--gtc-on-dark);
  line-height:1.3;
}
.gtes-chat-dot{
  width:7px;height:7px;border-radius:999px;
  background:var(--gtc-signal);
  flex:0 0 7px;
}
.gtes-chat-actions{display:flex;gap:4px;flex:0 0 auto;}
.gtes-chat-icon{
  width:30px;height:30px;
  display:flex;align-items:center;justify-content:center;
  border:none;border-radius:4px;
  background:rgba(255,255,255,.12);
  color:#fff;cursor:pointer;
  transition:background-color .16s linear;
}
.gtes-chat-icon:hover{background:rgba(255,255,255,.22);}
.gtes-chat-icon:focus-visible{outline:none;box-shadow:0 0 0 2px rgba(140,198,63,.6);}
.gtes-chat-icon svg{width:15px;height:15px;display:block;}

/* log */

.gtes-chat-log{
  flex:1 1 auto;
  overflow-y:auto;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
  padding:16px 14px 8px;
  background:var(--gtc-bg);
  display:flex;
  flex-direction:column;
  gap:10px;
}
.gtes-chat-log::-webkit-scrollbar{width:8px;}
.gtes-chat-log::-webkit-scrollbar-thumb{background:#CBD5E6;border-radius:999px;}

.gtes-chat-msg{
  max-width:86%;
  padding:10px 13px;
  font-size:14.5px;
  color:var(--gtc-ink);
  white-space:pre-wrap;
  word-wrap:break-word;
  overflow-wrap:anywhere;
}
.gtes-chat-msg.bot{
  align-self:flex-start;
  background:var(--gtc-surface);
  border:1px solid var(--gtc-border);
  border-radius:4px 12px 12px 12px;
}
.gtes-chat-msg.user{
  align-self:flex-end;
  background:var(--gtc-brand-2);
  border:1px solid var(--gtc-brand-2);
  color:#fff;
  border-radius:12px 4px 12px 12px;
}

/* link buttons */

.gtes-chat-links{
  align-self:flex-start;
  display:flex;
  flex-direction:column;
  gap:6px;
  max-width:86%;
  width:100%;
}
.gtes-chat-link{
  display:block;
  padding:9px 12px;
  font-size:13.5px;
  font-weight:500;
  color:var(--gtc-accent);
  background:var(--gtc-surface);
  border:1px solid var(--gtc-border);
  border-left:3px solid var(--gtc-accent);
  border-radius:4px;
  text-decoration:none;
  transition:background-color .16s linear;
}
.gtes-chat-link:hover{background:#F1F9F3;color:var(--gtc-accent-dark);}

/* chips */

.gtes-chat-chips{
  display:flex;
  flex-wrap:wrap;
  gap:5px;
  padding:0 12px 10px;
  background:var(--gtc-bg);
  flex:0 0 auto;
}
.gtes-chat-chip{
  padding:5px 10px;
  font-family:var(--gtc-font);
  font-size:11.5px;
  line-height:1.25;
  color:var(--gtc-brand);
  background:var(--gtc-surface);
  border:1px solid var(--gtc-border);
  border-radius:999px;
  cursor:pointer;
  transition:border-color .16s linear, background-color .16s linear;
}
.gtes-chat-chip:hover{background:var(--gtc-navy-50);border-color:#C4D0E6;}
.gtes-chat-chip:focus-visible{outline:none;box-shadow:0 0 0 3px rgba(140,198,63,.45);}

/* typing */

.gtes-chat-typing{
  align-self:flex-start;
  display:flex;
  gap:4px;
  padding:12px 14px;
  background:var(--gtc-surface);
  border:1px solid var(--gtc-border);
  border-radius:4px 12px 12px 12px;
}
.gtes-chat-typing i{
  width:6px;height:6px;border-radius:999px;
  background:var(--gtc-muted);
  animation:gtcBlink 1.1s linear infinite;
}
.gtes-chat-typing i:nth-child(2){animation-delay:.18s;}
.gtes-chat-typing i:nth-child(3){animation-delay:.36s;}
@keyframes gtcBlink{0%,60%,100%{opacity:.25}30%{opacity:1}}

/* composer */

.gtes-chat-foot{
  flex:0 0 auto;
  padding:10px 12px 8px;
  background:var(--gtc-surface);
  border-top:1px solid var(--gtc-border);
}
.gtes-chat-form{display:flex;align-items:flex-end;gap:8px;}
.gtes-chat-input{
  flex:1 1 auto;
  min-height:42px;
  max-height:110px;
  padding:10px 12px;
  font-family:var(--gtc-font);
  font-size:14.5px;
  color:var(--gtc-ink);
  background:var(--gtc-surface);
  border:1px solid var(--gtc-border);
  border-radius:4px;
  resize:none;
  outline:none;
  line-height:1.4;
}
.gtes-chat-input:focus{border-color:var(--gtc-accent);box-shadow:0 0 0 3px rgba(140,198,63,.35);}
.gtes-chat-send{
  flex:0 0 42px;
  width:42px;height:42px;
  display:flex;align-items:center;justify-content:center;
  border:none;border-radius:4px;
  background:var(--gtc-accent);
  color:#fff;cursor:pointer;
  transition:background-color .16s linear, transform .16s linear;
}
.gtes-chat-send:hover:not(:disabled){background:var(--gtc-accent-dark);transform:translateY(-1px);}
.gtes-chat-send:active:not(:disabled){transform:scale(.985);}
.gtes-chat-send:disabled{opacity:.45;cursor:default;}
.gtes-chat-send svg{width:17px;height:17px;display:block;}

.gtes-chat-note{
  margin:7px 2px 0;
  font-family:var(--gtc-mono);
  font-size:10.5px;
  letter-spacing:.02em;
  color:var(--gtc-muted);
  text-align:center;
  line-height:1.4;
}

/* ---------------- mobile ---------------- */

@media (max-width:600px){
  .gtes-chat-root{right:14px;bottom:14px;left:14px;}
  .gtes-chat-panel{
    width:100%;
    max-width:none;
    height:min(78vh, calc(100vh - 100px));
  }
  .gtes-chat-launcher{width:54px;height:54px;}
  .gtes-chat-msg{max-width:90%;font-size:15px;}
  .gtes-chat-input{font-size:16px;}
}

@media (prefers-reduced-motion:reduce){
  .gtes-chat-root *{animation:none !important;transition:none !important;}
}

/* ---------------- theme-override guards ----------------
   Blocksy/Elementor global button rules win on specificity inside the widget,
   which flattens the icon colour. Scoped strictly to these three controls. */

.gtes-chat-root .gtes-chat-send,
.gtes-chat-root .gtes-chat-icon,
.gtes-chat-root .gtes-chat-launcher{
  color:#FFFFFF !important;
  -webkit-text-fill-color:#FFFFFF;
}

.gtes-chat-root .gtes-chat-send svg,
.gtes-chat-root .gtes-chat-icon svg,
.gtes-chat-root .gtes-chat-launcher svg{
  stroke:#FFFFFF !important;
  color:#FFFFFF !important;
  fill:none !important;
}

/* rounded launcher with white label */

.gtes-chat-root .gtes-chat-launcher{
  width:auto;
  height:52px;
  padding:0 20px 0 16px;
  gap:10px;
  border-radius:999px;
  background:var(--gtc-accent);
}
.gtes-chat-root .gtes-chat-launcher:hover{background:var(--gtc-accent-dark);}
.gtes-chat-root .gtes-chat-launcher svg{width:22px;height:22px;flex:0 0 22px;}

.gtes-chat-root .gtes-chat-launcher-label{
  font-family:var(--gtc-font);
  font-size:14px;
  font-weight:600;
  line-height:1;
  letter-spacing:.01em;
  white-space:nowrap;
  color:#FFFFFF !important;
  -webkit-text-fill-color:#FFFFFF;
}

/* keep theme button padding/sizing from swallowing the icons */
.gtes-chat-root .gtes-chat-icon{
  width:30px !important;
  height:30px !important;
  min-width:0 !important;
  min-height:0 !important;
  padding:0 !important;
  line-height:1 !important;
  border:none !important;
  flex:0 0 30px;
}
.gtes-chat-root .gtes-chat-send{
  width:42px !important;
  height:42px !important;
  min-width:0 !important;
  min-height:0 !important;
  padding:0 !important;
  line-height:1 !important;
  border:none !important;
  flex:0 0 42px;
}

@media (max-width:600px){
  .gtes-chat-root .gtes-chat-launcher{
    width:54px !important;
    height:54px !important;
    padding:0 !important;
    gap:0;
    border-radius:999px !important;
  }
  .gtes-chat-root .gtes-chat-launcher svg{width:24px;height:24px;flex:0 0 24px;}
  .gtes-chat-root .gtes-chat-launcher-label{display:none !important;}
}

/* ---- inline page links inside a bot reply (plain hyperlink, not a button) ---- */

.gtes-chat-msg .gtes-chat-inlink,
.gtes-chat-inlink{
  display:block;
  margin-top:8px;
  padding:0 !important;
  background:none !important;
  border:none !important;
  border-radius:0 !important;
  font-size:13.5px;
  line-height:1.45;
  font-weight:400;
  color:#1A6FD4 !important;
  text-decoration:underline;
  text-underline-offset:2px;
  word-break:break-all;
  overflow-wrap:anywhere;
}
.gtes-chat-msg .gtes-chat-inlink:hover,
.gtes-chat-inlink:hover{
  color:#0F4FA0 !important;
  background:none !important;
  text-decoration:underline;
}
.gtes-chat-inlink + .gtes-chat-inlink{margin-top:4px;}
/* keep the suggestion chips compact whatever the theme does to buttons */
.gtes-chat-root .gtes-chat-chip{
  padding:5px 10px !important;
  font-size:11.5px !important;
  line-height:1.25 !important;
  min-height:0 !important;
  min-width:0 !important;
  letter-spacing:0 !important;
  text-transform:none !important;
}
html body .gtes-chat-root .gtes-chat-chips button.gtes-chat-chip,
html body .gtes-chat-root .gtes-chat-chips .gtes-chat-chip{
  padding:5px 10px !important;
  font-size:11.5px !important;
  line-height:1.3 !important;
  height:auto !important;
  min-height:0 !important;
}