/* Excel Security chat assistant + WhatsApp button (chat.js). Every class starts with xc-.
   z-index 54: above the page, the phone bar and scroll-to-top (50), below the open burger menu (55) and header (60). */
.xc-root {
  --xc-navy: #0D1A2E; --xc-navy2: #13253F; --xc-navy3: #1B3050;
  --xc-y: #FFE600; --xc-ink: #0B0B0C; --xc-paper: #F4F2EC; --xc-dim: rgba(244, 242, 236, .72); --xc-line: rgba(255, 255, 255, .12);
  --xc-wa: #1D9E4F; --xc-ease: cubic-bezier(.22, 1, .36, 1);
  --xc-font: "Manrope", "Helvetica Neue", Arial, sans-serif; --xc-head: "Archivo", "Helvetica Neue", Arial, sans-serif;
  /* phones and tablets: sit above the fixed Call / Get a Quote bar (.mbar, 76px tall incl. its 10px gap) */
  --xc-lift: calc(86px + env(safe-area-inset-bottom)); --xc-right: 14px; --xc-size: 56px;
  position: fixed; z-index: 54; right: 0; bottom: 0; width: 0; height: 0;
  font-family: var(--xc-font); font-size: 15px; line-height: 1.5; color: var(--xc-paper); text-align: left;
}
@media (min-width: 1024px) { .xc-root { --xc-lift: 24px; --xc-right: 24px; --xc-size: 60px; } }
.xc-root *, .xc-root *::before, .xc-root *::after { box-sizing: border-box; }
.xc-root [hidden] { display: none !important; }
.xc-root :focus-visible { outline: 2px solid var(--xc-y); outline-offset: 2px; }
.xc-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- launcher + WhatsApp ---------- */
.xc-root .xc-launch, .xc-root .xc-wa {
  position: fixed; display: grid; place-items: center; border: 0; padding: 0; border-radius: 50%; cursor: pointer;
  box-shadow: 0 0 0 2px rgba(11, 11, 12, .85), 0 14px 32px -10px rgba(0, 0, 0, .55);
  transition: transform .3s var(--xc-ease), box-shadow .3s;
}
.xc-root .xc-launch {
  right: var(--xc-right); bottom: var(--xc-lift); width: var(--xc-size); height: var(--xc-size);
  background: var(--xc-y); color: var(--xc-ink);
}
.xc-root .xc-launch .xc-i { grid-area: 1 / 1; width: 26px; height: 26px; transition: opacity .2s, transform .35s var(--xc-ease); }
.xc-root .xc-launch .xc-i + .xc-i { opacity: 0; transform: rotate(-60deg) scale(.6); }
.xc-open .xc-launch .xc-i:first-child { opacity: 0; transform: scale(.6); }
.xc-open .xc-launch .xc-i + .xc-i { opacity: 1; transform: none; }
.xc-root .xc-wa {
  right: calc(var(--xc-right) + (var(--xc-size) - var(--xc-wa-size, 48px)) / 2); bottom: calc(var(--xc-lift) + var(--xc-size) + 12px);
  width: var(--xc-wa-size, 48px); height: var(--xc-wa-size, 48px); background: var(--xc-wa); color: #fff; text-decoration: none;
}
.xc-root .xc-wa .xc-i { width: 26px; height: 26px; }
/* phones: small buttons that stay out of the way */
@media (max-width: 719px) {
  .xc-root { --xc-size: 44px; --xc-wa-size: 40px; --xc-right: 12px; }
  .xc-root .xc-wa { bottom: calc(var(--xc-lift) + var(--xc-size) + 10px); }
  .xc-root .xc-launch .xc-i { width: 21px; height: 21px; }
  .xc-root .xc-wa .xc-i { width: 21px; height: 21px; }
}
.xc-open .xc-wa { display: none; }
.xc-root .xc-launch:hover, .xc-root .xc-wa:hover { transform: translateY(-2px); }
.xc-root .xc-launch:focus-visible, .xc-root .xc-wa:focus-visible { outline: 0; box-shadow: 0 0 0 3px var(--xc-ink), 0 0 0 6px var(--xc-y); }

/* ---------- welcome bubble ---------- */
/* phones: above the WhatsApp button, so the hero buttons just above the phone bar stay tappable */
.xc-bub {
  position: fixed; right: var(--xc-right); bottom: calc(var(--xc-lift) + var(--xc-size) + 12px + 48px + 10px);
  width: max-content; max-width: min(300px, calc(100vw - 2 * var(--xc-right)));
  display: flex; align-items: flex-start; gap: 6px; padding: 12px 8px 12px 16px;
  background: var(--xc-navy2); border: 1px solid var(--xc-line); border-radius: 20px 20px 6px 20px;
  box-shadow: 0 18px 44px -16px rgba(0, 0, 0, .65);
  opacity: 0; transform: translateY(10px) scale(.96); transform-origin: bottom right;
  transition: opacity .35s, transform .5s var(--xc-ease);
}
.xc-bub.xc-in { opacity: 1; transform: none; }
@media (min-width: 1024px) { /* desktop: beside the launcher */
  .xc-bub { right: calc(var(--xc-right) + var(--xc-size) + 12px); bottom: calc(var(--xc-lift) + 4px); max-width: 272px; }
}
.xc-root .xc-bub-t {
  flex: 1 1 auto; min-width: 0; padding: 0; border: 0; background: none; color: var(--xc-paper); cursor: pointer;
  font: 600 14px/1.45 var(--xc-font); text-align: left; border-radius: 8px;
}
.xc-root .xc-bub-x, .xc-root .xc-x {
  flex: none; display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .08); color: var(--xc-paper); cursor: pointer; transition: background .2s;
}
.xc-root .xc-bub-x .xc-i { width: 14px; height: 14px; }
.xc-root .xc-bub-x:hover, .xc-root .xc-x:hover { background: rgba(255, 255, 255, .18); }

/* ---------- panel: bottom sheet on phones ---------- */
.xc-panel {
  position: fixed; left: 0; right: 0; bottom: var(--xc-kb, 0px); width: 100%;
  height: min(80vh, 640px); height: min(80svh, 640px, calc(var(--xc-vh, 100svh) - 16px));
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--xc-navy); border: 1px solid var(--xc-line); border-bottom: 0; border-radius: 20px 20px 0 0;
  box-shadow: 0 -24px 60px -20px rgba(0, 0, 0, .7);
  padding-bottom: env(safe-area-inset-bottom);
  opacity: 0; transform: translateY(24px); transition: opacity .25s, transform .4s var(--xc-ease);
}
.xc-panel.xc-in { opacity: 1; transform: none; }
.xc-panel:focus { outline: none; }
.xc-open .xc-launch { display: none; } /* the sheet covers it; the sheet has its own close button */
/* tablets and desktop: a floating card above the launcher */
@media (min-width: 600px) and (min-height: 640px) {
  .xc-panel {
    left: auto; right: var(--xc-right); bottom: calc(var(--xc-lift) + var(--xc-size) + 14px);
    width: min(380px, calc(100vw - 2 * var(--xc-right)));
    height: min(560px, calc(100vh - var(--xc-lift) - var(--xc-size) - 14px - 96px));
    border-bottom: 1px solid var(--xc-line); border-radius: 20px; padding-bottom: 0;
    box-shadow: 0 30px 80px -24px rgba(0, 0, 0, .7); transform: translateY(12px) scale(.98); transform-origin: bottom right;
  }
  .xc-root.xc-open .xc-launch { display: grid; }
}

.xc-head { flex: none; display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 16px; background: var(--xc-navy2); border-bottom: 1px solid var(--xc-line); }
.xc-av {
  flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  background: var(--xc-y); color: var(--xc-ink); font: 800 17px/1 var(--xc-head);
}
.xc-ht { flex: 1 1 auto; min-width: 0; }
.xc-root .xc-ht h2 { margin: 0; font: 700 16px/1.25 var(--xc-head); color: #fff; letter-spacing: -.01em; }
.xc-ht p { margin: 2px 0 0; font-size: 12.5px; line-height: 1.35; color: var(--xc-dim); text-wrap: balance; }
.xc-root .xc-x { width: 36px; height: 36px; }
.xc-root .xc-x .xc-i { width: 16px; height: 16px; }

.xc-log {
  position: relative; /* offsetTop of messages is measured from here (chat.js scroll) */
  flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  display: flex; flex-direction: column; gap: 10px; padding: 16px 14px 18px;
  scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .2) transparent;
}
.xc-wait { color: var(--xc-dim); font-size: 14px; }
.xc-msg { max-width: 88%; padding: 10px 14px; border-radius: 16px; font-size: 14.5px; line-height: 1.5; overflow-wrap: anywhere; }
.xc-msg p { margin: 0; }
.xc-bot { align-self: flex-start; background: var(--xc-navy2); border: 1px solid var(--xc-line); border-bottom-left-radius: 6px; color: var(--xc-paper); }
.xc-me { align-self: flex-end; background: var(--xc-y); color: var(--xc-ink); font-weight: 600; border-bottom-right-radius: 6px; }
.xc-bot ul { margin: 8px 0 0; padding: 0 0 0 18px; color: var(--xc-dim); font-size: 13.5px; }
.xc-bot li + li { margin-top: 3px; }
.xc-bot li::marker { color: var(--xc-y); }

.xc-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.xc-root .xc-btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 7px 13px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .28); background: transparent; color: #fff; cursor: pointer;
  font: 700 13px/1.2 var(--xc-font); text-decoration: none; transition: background .2s, color .2s, border-color .2s;
}
.xc-root .xc-btn:hover { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .5); }
.xc-root .xc-btn-y { background: var(--xc-y); border-color: var(--xc-y); color: var(--xc-ink); }
.xc-root .xc-btn-y:hover { background: #fff; border-color: #fff; color: var(--xc-ink); }
.xc-root .xc-btn-wa .xc-i { width: 16px; height: 16px; color: #3DDC84; }
.xc-root .xc-btn:disabled { opacity: .6; cursor: default; }

.xc-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.xc-root .xc-chip {
  min-height: 34px; padding: 6px 13px; border-radius: 999px; border: 1px solid rgba(255, 230, 0, .55);
  background: rgba(255, 230, 0, .06); color: var(--xc-y); cursor: pointer; text-align: left;
  font: 600 13.5px/1.3 var(--xc-font); transition: background .2s, color .2s;
}
.xc-root .xc-chip:hover { background: var(--xc-y); color: var(--xc-ink); }
.xc-root .xc-chip-m { border-color: rgba(255, 255, 255, .28); background: transparent; color: var(--xc-paper); }
.xc-root .xc-chip-m:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.xc-root .xc-chip-r::before { content: "Related: "; color: var(--xc-dim); font-weight: 500; }
.xc-root .xc-chip-r:hover::before { color: inherit; }

/* lead form inside the conversation */
.xc-form { display: grid; gap: 8px; width: 88%; }
.xc-form label { display: grid; gap: 3px; font-size: 12.5px; font-weight: 600; color: var(--xc-dim); }
.xc-root .xc-form input, .xc-root .xc-form textarea, .xc-root .xc-ask input {
  width: 100%; min-width: 0; margin: 0; padding: 9px 12px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .22);
  background: var(--xc-navy); color: #fff; font: 500 16px/1.4 var(--xc-font); /* 16px stops iOS zooming in */
}
.xc-root .xc-form textarea { resize: vertical; min-height: 64px; }
.xc-root .xc-form input:focus, .xc-root .xc-form textarea:focus, .xc-root .xc-ask input:focus { outline: 2px solid var(--xc-y); outline-offset: 0; border-color: transparent; }
.xc-form .xc-btn { justify-self: start; }
.xc-note { margin: 0; font-size: 13px; color: #FFB4A8; }
.xc-note:empty { display: none; }

/* question box */
.xc-ask { flex: none; display: flex; gap: 8px; padding: 10px 12px; background: var(--xc-navy2); border-top: 1px solid var(--xc-line); }
.xc-root .xc-ask input { flex: 1 1 auto; border-radius: 999px; padding: 10px 16px; }
.xc-root .xc-ask input::placeholder { color: rgba(244, 242, 236, .55); }
.xc-root .xc-send {
  flex: none; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%;
  background: var(--xc-y); color: var(--xc-ink); cursor: pointer;
}
.xc-root .xc-send .xc-i { width: 20px; height: 20px; }

/* icons (CSS masks, so they take the text colour) */
.xc-i { display: block; flex: none; width: 24px; height: 24px; background: currentColor;
  -webkit-mask: var(--xc-m) center / contain no-repeat; mask: var(--xc-m) center / contain no-repeat; }
.xc-i-chat { --xc-m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M4 4h16a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H9.5L5 21.5V18H4a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2zm3 6.2a1.3 1.3 0 1 0 0 2.6 1.3 1.3 0 0 0 0-2.6zm5 0a1.3 1.3 0 1 0 0 2.6 1.3 1.3 0 0 0 0-2.6zm5 0a1.3 1.3 0 1 0 0 2.6 1.3 1.3 0 0 0 0-2.6z'/%3E%3C/svg%3E"); }
.xc-i-x { --xc-m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E"); }
.xc-i-send { --xc-m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3.4 20.4 21 12 3.4 3.6 3.4 10l12.6 2-12.6 2z'/%3E%3C/svg%3E"); }
.xc-i-wa { --xc-m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 0 0-8.6 15.1L2 22l5-1.3A10 10 0 1 0 12 2zm0 18.2a8.2 8.2 0 0 1-4.2-1.2l-.3-.2-3 .8.8-2.9-.2-.3A8.2 8.2 0 1 1 12 20.2zm4.5-6.1c-.2-.1-1.5-.7-1.7-.8s-.4-.1-.6.1-.7.8-.8 1-.3.2-.5.1a6.7 6.7 0 0 1-3.3-2.9c-.3-.4.3-.4.7-1.3a.5.5 0 0 0 0-.4l-.8-1.8c-.2-.5-.4-.4-.6-.4h-.5a1 1 0 0 0-.7.3 3 3 0 0 0-.9 2.2 5.2 5.2 0 0 0 1.1 2.7 11.8 11.8 0 0 0 4.5 4c1.7.7 2.3.8 3.2.7a2.7 2.7 0 0 0 1.8-1.3 2.2 2.2 0 0 0 .2-1.3c-.1-.1-.3-.2-.5-.3z'/%3E%3C/svg%3E"); }

@media (prefers-reduced-motion: reduce) {
  .xc-root *, .xc-bub, .xc-panel { transition: none !important; }
  .xc-bub, .xc-panel { transform: none !important; }
}
@media print { .xc-root { display: none; } }
