/* ESCOTELE AI Agent widget v1.3.1 */
#esc-agent, #esc-agent *{ box-sizing:border-box; }
#esc-agent{ --fab:90px; position:fixed; right:20px; bottom:20px; z-index:9998; font-family:inherit; direction:ltr; }

/* ---------- floating button (the assistant's face) ---------- */
/* the launcher (face + hello bubble) drifts up and down slowly so the assistant is easy to notice */
.esc-agent-launcher{ position:relative; width:var(--fab); height:var(--fab); margin-left:auto; animation:escAgentFloat 3.6s ease-in-out infinite; }
.esc-agent-launcher:hover{ animation-play-state:paused; }                 /* holds still while you aim at it */
#esc-agent.is-open .esc-agent-launcher{ animation:none; }                /* and while the chat is open */
@keyframes escAgentFloat{ 0%,100%{ transform:translateY(0); } 50%{ transform:translateY(-9px); } }

.esc-agent-fab{
  position:relative; width:100%; height:100%; border-radius:50%; border:3px solid #F5A623; padding:0; cursor:pointer;
  background:#FFE2A8; display:block; box-shadow:0 12px 32px rgba(18,35,63,.40); transition:transform .2s ease, box-shadow .2s ease;
}
.esc-agent-fab:hover{ transform:scale(1.06); box-shadow:0 16px 38px rgba(18,35,63,.46); }
/* a soft orange ring that breathes out from the face */
.esc-agent-fab::after{ content:''; position:absolute; inset:-3px; border-radius:50%; border:3px solid #F5A623; opacity:0; pointer-events:none; animation:escAgentRing 3.6s ease-out infinite; }
#esc-agent.is-open .esc-agent-fab::after{ animation:none; }
@keyframes escAgentRing{ 0%{ transform:scale(1); opacity:.55; } 70%,100%{ transform:scale(1.32); opacity:0; } }
.esc-agent-fab .esc-agent-avatar{ width:100%; height:100%; border-radius:50%; overflow:hidden; display:block; }
.esc-agent-fab .esc-agent-avatar svg, .esc-agent-avatar svg{ width:100%; height:100%; display:block; }
.esc-agent-dot{ position:absolute; width:16px; height:16px; border-radius:50%; background:#2ECC71; border:2.5px solid #fff; right:3px; bottom:3px; z-index:1; }
.esc-agent-fab:focus-visible, .esc-agent-btn:focus-visible, .esc-agent-send:focus-visible, .esc-agent-chip:focus-visible{ outline:3px solid #12233F; outline-offset:3px; }

.esc-agent-teaser{
  position:absolute; right:calc(var(--fab) + 14px); bottom:16px; background:#fff; color:#12233F; border-radius:16px; padding:11px 36px 11px 18px;
  font-size:15px; font-weight:700; box-shadow:0 10px 30px rgba(18,35,63,.25); border:1px solid #E3E6EE; white-space:nowrap; display:none; cursor:pointer;
}
.esc-agent-teaser.is-shown{ display:block; animation:escAgentIn .3s ease; }
.esc-agent-teaser::after{ content:''; position:absolute; right:-7px; bottom:20px; width:12px; height:12px; background:#fff; border-top:1px solid #E3E6EE; border-right:1px solid #E3E6EE; transform:rotate(45deg); }
.esc-agent-teaser-x{ position:absolute; top:5px; right:7px; width:24px; height:24px; border:none; background:none; color:#8A94AB; font-size:17px; line-height:1; cursor:pointer; border-radius:50%; }
.esc-agent-teaser-x:hover{ background:#F1F3F8; }
#esc-agent.is-open .esc-agent-teaser{ display:none !important; }

/* ---------- panel ---------- */
.esc-agent-panel{
  position:absolute; right:0; bottom:calc(var(--fab) + 16px); width:440px; max-width:calc(100vw - 24px);
  height:min(700px, calc(100vh - var(--fab) - 44px)); display:none; flex-direction:column;
  background:#fff; border-radius:22px; overflow:hidden; box-shadow:0 28px 70px rgba(18,35,63,.34); border:1px solid #E3E6EE;
  transition:width .25s ease, height .25s ease;
}
#esc-agent.is-open .esc-agent-panel{ display:flex; animation:escAgentIn .25s ease; }
#esc-agent.is-large .esc-agent-panel{ width:min(800px, calc(100vw - 40px)); height:min(calc(100vh - var(--fab) - 44px), 880px); }
@keyframes escAgentIn{ from{ opacity:0; transform:translateY(10px); } to{ opacity:1; transform:translateY(0); } }

.esc-agent-head{ background:linear-gradient(135deg,#1E3560,#0E1F3C); color:#fff; padding:14px 14px 14px 16px; display:flex; align-items:center; gap:12px; }
.esc-agent-me{ position:relative; width:56px; height:56px; flex-shrink:0; }
.esc-agent-me .esc-agent-avatar{ width:56px; height:56px; border-radius:50%; overflow:hidden; display:block; border:2px solid #F5A623; background:#FFE2A8; }
.esc-agent-me .esc-agent-dot{ border-color:#12233F; right:-1px; bottom:-1px; width:13px; height:13px; }
.esc-agent-who{ flex:1; min-width:0; }
.esc-agent-title{ font-weight:800; font-size:17px; line-height:1.25; }
.esc-agent-sub{ font-size:12.5px; line-height:1.35; color:#B9C6DE; margin-top:2px; }
.esc-agent-actions{ display:flex; align-items:center; gap:6px; flex-shrink:0; }
.esc-agent-lang{ display:flex; background:rgba(255,255,255,.12); border-radius:999px; padding:3px; }
.esc-agent-lang button{ border:none; background:none; color:#D5DEF0; font-family:inherit; font-size:12.5px; font-weight:800; padding:5px 11px; border-radius:999px; cursor:pointer; }
.esc-agent-lang button[aria-pressed="true"]{ background:#F5A623; color:#12233F; }
.esc-agent-btn{ background:rgba(255,255,255,.12); border:none; color:#fff; width:34px; height:34px; border-radius:50%; cursor:pointer; display:flex; align-items:center; justify-content:center; padding:0; }
.esc-agent-btn:hover{ background:rgba(255,255,255,.26); }
.esc-agent-btn svg{ width:17px; height:17px; }

/* ---------- messages ---------- */
.esc-agent-msgs{ flex:1; overflow-y:auto; padding:18px 16px; background:#F6F7FB; display:flex; flex-direction:column; gap:12px; scroll-behavior:smooth; }
.esc-agent-row{ display:flex; align-items:flex-end; gap:9px; max-width:100%; }
.esc-agent-row .esc-agent-avatar{ width:36px; height:36px; border-radius:50%; overflow:hidden; flex-shrink:0; background:#FFE2A8; border:1.5px solid #F5A623; display:block; }
.esc-agent-msg{ max-width:84%; padding:11px 15px; border-radius:18px; font-size:15px; line-height:1.7; word-wrap:break-word; overflow-wrap:anywhere; text-align:start; }
.esc-agent-col{ display:flex; flex-direction:column; align-items:flex-start; min-width:0; max-width:calc(100% - 50px); }
.esc-agent-row .esc-agent-msg{ max-width:100%; }
#esc-agent.is-large .esc-agent-msg{ font-size:15.5px; }
#esc-agent.is-large .esc-agent-user{ max-width:78%; }
#esc-agent.is-large .esc-agent-col{ max-width:min(78%, 680px); }
.esc-agent-msg a{ color:inherit; text-decoration:underline; font-weight:700; }
.esc-agent-bot{ background:#fff; color:#12233F; border:1px solid #E3E6EE; border-end-start-radius:5px; }
.esc-agent-user{ align-self:flex-end; background:#12233F; color:#fff; border-end-end-radius:5px; }
.esc-line{ min-height:1.7em; }

.esc-agent-chips{ display:flex; flex-wrap:wrap; gap:8px; margin-top:2px; padding-inline-start:45px; }
.esc-agent-chip{ background:#fff; border:1.5px solid #F5A623; color:#12233F; border-radius:999px; padding:8px 15px; font-family:inherit; font-size:13.5px; font-weight:700; cursor:pointer; }
.esc-agent-chip:hover{ background:#FFF4DF; }
.esc-agent-contact{ display:inline-block; margin-top:8px; background:#F5A623; color:#1A1206 !important; text-decoration:none !important; padding:9px 18px; border-radius:999px; font-size:13.5px; font-weight:800; }

.esc-agent-typing{ background:#fff; border:1px solid #E3E6EE; border-radius:18px; padding:14px 18px; display:flex; gap:5px; }
.esc-agent-typing i{ width:7px; height:7px; border-radius:50%; background:#9AA5BD; animation:escAgentDot 1.1s infinite ease-in-out; }
.esc-agent-typing i:nth-child(2){ animation-delay:.15s; } .esc-agent-typing i:nth-child(3){ animation-delay:.3s; }
@keyframes escAgentDot{ 0%,80%,100%{ opacity:.3; transform:translateY(0); } 40%{ opacity:1; transform:translateY(-4px); } }


/* ---------- rating (thumbs) ---------- */
.esc-agent-tools{ display:flex; align-items:center; gap:6px; margin-top:6px; flex-wrap:wrap; }
.esc-agent-rate-label{ font-size:12px; color:#8A94AB; margin-inline-end:2px; }
.esc-agent-rate{ border:1px solid #D5DAE6; background:#fff; border-radius:999px; width:34px; height:28px; cursor:pointer; font-size:14px; line-height:1; padding:0; }
.esc-agent-rate:hover{ background:#FFF4DF; border-color:#F5A623; }
.esc-agent-rate:focus-visible{ outline:3px solid #12233F; outline-offset:2px; }
.esc-agent-rate[disabled]{ opacity:.5; cursor:default; }
.esc-agent-thanks{ font-size:12.5px; color:#5E6A84; }
.esc-agent-thanks a{ color:#12233F; font-weight:700; }

/* the "leave your details" shortcut sits first and stands out from the question chips */
.esc-agent-chip-action{ background:#F5A623; border-color:#F5A623; color:#12233F; }
.esc-agent-chip-action:hover{ background:#E69712; }

/* ---------- interest form ---------- */
.esc-agent-leadcard{ background:#fff; border:1.5px solid #F5A623; border-radius:18px; padding:16px; margin-inline-start:45px; display:flex; flex-direction:column; gap:11px; }
.esc-agent-leadtitle{ font-weight:800; color:#12233F; font-size:15.5px; }
.esc-agent-field label{ display:block; font-size:13px; font-weight:700; color:#12233F; margin-bottom:4px; }
.esc-agent-field label small{ color:#8A94AB; font-weight:600; }
.esc-agent-field input, .esc-agent-field textarea{ width:100%; border:1px solid #D5DAE6; border-radius:12px; padding:10px 12px; font-family:inherit; font-size:15px; color:#12233F; background:#fff; }
.esc-agent-field textarea{ resize:vertical; min-height:64px; max-height:140px; }
.esc-agent-field input:focus, .esc-agent-field textarea:focus{ outline:none; border-color:#F5A623; box-shadow:0 0 0 3px rgba(245,166,35,.25); }
.esc-agent-field.has-error input, .esc-agent-field.has-error textarea{ border-color:#D64545; }
.esc-agent-ferr{ color:#C0392B; font-size:12.5px; margin-top:3px; }
.esc-agent-consent{ font-size:12px; color:#6B7690; line-height:1.55; }
.esc-agent-formerr{ color:#C0392B; font-size:13px; }
.esc-agent-leadbtns{ display:flex; gap:8px; }
.esc-agent-leadsend{ flex:1; background:#F5A623; color:#12233F; border:none; border-radius:12px; padding:11px; font-weight:800; font-size:14.5px; font-family:inherit; cursor:pointer; }
.esc-agent-leadsend[disabled]{ opacity:.6; cursor:not-allowed; }
.esc-agent-leadcancel{ background:#fff; color:#12233F; border:1px solid #D5DAE6; border-radius:12px; padding:11px 16px; font-weight:700; font-family:inherit; font-size:14px; cursor:pointer; }
/* spam trap: invisible to people, bots fill it in */
.esc-agent-hp{ position:absolute !important; left:-9999px !important; width:1px !important; height:1px !important; min-height:0 !important; padding:0 !important; border:0 !important; margin:0 !important; overflow:hidden !important; opacity:0 !important; pointer-events:none !important; }

/* ---------- input ---------- */
.esc-agent-form{ display:flex; align-items:flex-end; gap:9px; padding:12px 14px; border-top:1px solid #E3E6EE; background:#fff; }
.esc-agent-input{ flex:1; resize:none; border:1px solid #D5DAE6; border-radius:16px; padding:12px 16px; font-family:inherit; font-size:15px; line-height:1.5; max-height:130px; color:#12233F; background:#fff; }
.esc-agent-input:focus{ outline:none; border-color:#F5A623; box-shadow:0 0 0 3px rgba(245,166,35,.25); }
.esc-agent-send{ background:#F5A623; color:#12233F; border:none; border-radius:16px; width:48px; height:48px; display:flex; align-items:center; justify-content:center; cursor:pointer; flex-shrink:0; }
.esc-agent-send svg{ width:20px; height:20px; }
[dir="rtl"] .esc-agent-send svg{ transform:scaleX(-1); }
.esc-agent-send[disabled]{ opacity:.5; cursor:not-allowed; }
.esc-agent-note{ font-size:11.5px; color:#7A859C; text-align:center; padding:0 16px 10px; background:#fff; line-height:1.55; }

/* ---------- phones: the chat takes the whole screen ---------- */
@media (max-width:640px){
  #esc-agent{ --fab:80px; right:14px; bottom:14px; }
  .esc-agent-panel, #esc-agent.is-large .esc-agent-panel{
    position:fixed; inset:0; width:100%; max-width:none; height:100%; border-radius:0; border:none; bottom:0;
  }
  #esc-agent.is-open .esc-agent-fab{ display:none; }
  .esc-agent-expand{ display:none !important; }
  .esc-agent-head{ padding-top:max(14px, env(safe-area-inset-top)); }
  .esc-agent-form{ padding-bottom:max(12px, env(safe-area-inset-bottom)); }
  .esc-agent-msg{ font-size:15.5px; }
  .esc-agent-leadcard{ margin-inline-start:0; }
  .esc-agent-chips{ padding-inline-start:0; }
}
/* people who asked their device for less motion get none (pseudo-elements like the breathing ring need their own selector) */
@media (prefers-reduced-motion:reduce){ #esc-agent *, #esc-agent *::before, #esc-agent *::after{ animation:none !important; transition:none !important; } }
