.fic-chatbot {
  --fic-accent: #ff5a1f;
  --fic-on-accent: #171717;
  --fic-ink: #171717;
  --fic-muted: #737373;
  --fic-surface: #fff;
  position: fixed;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 999999;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--fic-ink);
}

.fic-chatbot *, .fic-chatbot *::before, .fic-chatbot *::after { box-sizing: border-box; }

/* Many themes style every <button> globally (and on :hover at higher specificity); neutralise that inside the widget so only the rules below apply. */
.fic-chatbot button { position: static; min-width: 0; min-height: 0; gap: 0; text-transform: none; text-shadow: none; letter-spacing: normal; line-height: normal; font-weight: inherit; font-family: inherit; box-shadow: none; vertical-align: middle; }

.fic-chatbot button.fic-chatbot__toggle {
  display: grid;
  width: 60px;
  height: 60px;
  padding: 0;
  margin-left: auto;
  place-items: center;
  overflow: hidden;
  border: 3px solid var(--fic-accent);
  border-radius: 50%;
  color: #fff;
  background: var(--fic-ink);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .22);
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease;
}

.fic-chatbot button.fic-chatbot__toggle:hover { transform: translateY(-2px); box-shadow: 0 18px 38px rgba(0, 0, 0, .27); }
.fic-chatbot__toggle:focus-visible, .fic-chatbot button:focus-visible, .fic-chatbot textarea:focus-visible, .fic-chatbot a:focus-visible { outline: 3px solid color-mix(in srgb, var(--fic-accent), white 45%); outline-offset: 3px; }
.fic-chatbot__toggle-avatar, .fic-chatbot__header-avatar { display: block; width: 100%; height: 100%; max-width: none; border-radius: 50%; object-fit: cover; }
/* The face wrapper carries the motion so the eyelids stay on the eyes while the head tilts. */
.fic-chatbot__face { position: relative; display: block; width: 100%; height: 100%; border-radius: 50%; overflow: hidden; }
.fic-chatbot__toggle .fic-chatbot__face { transform-origin: 50% 50%; animation: fic-tom-idle 3.4s ease-in-out infinite; }
.fic-chatbot button.fic-chatbot__toggle:hover .fic-chatbot__face { animation: fic-tom-greet .65s ease-in-out; }
.fic-chatbot__lid { position: absolute; overflow: hidden; border-radius: 50%; pointer-events: none; }
.fic-chatbot__lid::before { content: ""; position: absolute; inset: 0; border-bottom: 1px solid rgba(0, 0, 0, .55); background: linear-gradient(var(--fic-lid), color-mix(in srgb, var(--fic-lid), #000 22%)); transform: scaleY(0); transform-origin: 50% 0; animation: fic-blink 4.8s ease-in-out infinite; }
/* A robot hand in the face color rises over the shoulder now and then and waves. */
.fic-chatbot__hand { position: absolute; --fic-hand-shape: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Crect x='27.5' y='12' width='12' height='44' rx='6' transform='rotate(-9 33.5 56)'/%3E%3Crect x='40' y='5' width='12.5' height='50' rx='6.25' transform='rotate(-2 46 55)'/%3E%3Crect x='53' y='8' width='12' height='47' rx='6' transform='rotate(6 59 55)'/%3E%3Crect x='64.5' y='19' width='10.5' height='38' rx='5.25' transform='rotate(14 70 57)'/%3E%3Cpath d='M26 47Q26 40 33 40H69Q76 40 76 47V63Q76 80 60 82H42Q26 80 26 63Z'/%3E%3Crect x='14' y='44' width='13' height='30' rx='6.5' transform='rotate(-38 22 66)'/%3E%3Crect x='36' y='80' width='29' height='20' rx='3'/%3E%3C/svg%3E"); --fic-hand-detail: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cg fill='none' stroke='%23fff' stroke-opacity='.28' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M30.5 24v14' transform='rotate(-9 33.5 56)'/%3E%3Cpath d='M43 18v16' transform='rotate(-2 46 55)'/%3E%3Cpath d='M55.8 20v15' transform='rotate(6 59 55)'/%3E%3Cpath d='M29 47v10'/%3E%3C/g%3E%3Cg fill='none' stroke='%23000' stroke-opacity='.32' stroke-width='1.3' stroke-linecap='round'%3E%3Cpath d='M30.5 33q3 1.6 6 0' transform='rotate(-9 33.5 56)'/%3E%3Cpath d='M43.2 29q3.1 1.6 6.2 0' transform='rotate(-2 46 55)'/%3E%3Cpath d='M56 31q3 1.6 6 0' transform='rotate(6 59 55)'/%3E%3Cpath d='M67.2 37q2.5 1.4 5 0' transform='rotate(14 70 57)'/%3E%3Cpath d='M40.3 44v4M52.6 43.5v4M64.2 44.5v4'/%3E%3Cpath d='M36 75q-3-11 6-20'/%3E%3Cpath d='M47 58q9 1 18-4'/%3E%3C/g%3E%3Crect x='33.5' y='79' width='34' height='11' rx='5' fill='%23f5f5f5' stroke='%23000' stroke-opacity='.3' stroke-width='1.2'/%3E%3Cpath d='M36 84.5h29' stroke='%23000' stroke-opacity='.15' stroke-width='1.2'/%3E%3C/svg%3E"); right: 6%; bottom: 0; width: 36%; height: 36%; pointer-events: none; filter: drop-shadow(0 0 1px rgba(255, 255, 255, .75)) drop-shadow(0 1px 1px rgba(0, 0, 0, .6)); transform: translateY(115%); transform-origin: 50% 100%; animation: fic-wave 10s ease-in-out 2s infinite; }
.fic-chatbot__hand::before { content: ""; position: absolute; inset: 0; background: linear-gradient(135deg, color-mix(in srgb, var(--fic-lid), #fff 20%), var(--fic-lid) 55%, color-mix(in srgb, var(--fic-lid), #000 28%)); -webkit-mask: var(--fic-hand-shape) center / contain no-repeat; mask: var(--fic-hand-shape) center / contain no-repeat; }
.fic-chatbot__hand::after { content: ""; position: absolute; inset: 0; background: var(--fic-hand-detail) center / contain no-repeat; }

.fic-chatbot__panel {
  display: flex;
  flex-direction: column;
  width: min(390px, calc(100vw - 32px));
  height: min(610px, calc(100vh - 110px));
  margin-bottom: 14px;
  overflow: hidden;
  border: 1px solid rgba(23, 23, 23, .1);
  border-radius: 22px;
  background: var(--fic-surface);
  box-shadow: 0 25px 70px rgba(0, 0, 0, .24);
  animation: fic-enter .2s ease-out;
}

.fic-chatbot__panel[hidden] { display: none; }

.fic-chatbot__header {
  display: flex;
  align-items: center;
  min-height: 70px;
  padding: 16px 18px;
  color: #fff;
  background: var(--fic-ink);
}

.fic-chatbot__header strong { overflow: hidden; font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }
.fic-chatbot__avatar-shell { position: relative; flex: 0 0 43px; width: 43px; height: 43px; margin-right: 11px; overflow: visible; border: 2px solid var(--fic-accent); border-radius: 50%; background: #2b2b2b; }
.fic-chatbot__avatar-shell .fic-chatbot__face { transform-origin: 50% 72%; animation: fic-tom-idle 3.8s ease-in-out infinite reverse; }
.fic-chatbot__status { position: absolute; right: -1px; bottom: -1px; z-index: 1; width: 9px; height: 9px; border: 2px solid var(--fic-ink); border-radius: 50%; background: #57d68d; box-shadow: 0 0 0 3px rgba(87, 214, 141, .15); }
.fic-chatbot button.fic-chatbot__close { width: 38px; height: 38px; margin-left: auto; border: 0; border-radius: 50%; color: #fff; background: rgba(255, 255, 255, .1); font: 300 27px/1 sans-serif; cursor: pointer; }

.fic-chatbot__messages {
  flex: 1;
  min-height: 0;
  padding: 20px 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #f6f6f4;
}

.fic-chatbot__message { display: flex; flex-direction: column; align-items: flex-start; margin: 0 0 13px; }
.fic-chatbot__message--user { align-items: flex-end; }
.fic-chatbot__bubble { max-width: 86%; padding: 11px 14px; border-radius: 16px 16px 16px 5px; background: #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, .06); font-size: 14px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.fic-chatbot__inline-link { color: #087f8c; font-weight: 700; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.fic-chatbot__inline-link:hover, .fic-chatbot__inline-link:focus-visible { color: #045d66; }
.fic-chatbot__message--user .fic-chatbot__bubble { color: var(--fic-on-accent); border-radius: 16px 16px 5px 16px; background: var(--fic-accent); }
.fic-chatbot__message.is-pending .fic-chatbot__bubble { color: var(--fic-muted); animation: fic-pulse 1.2s ease-in-out infinite; }
.fic-chatbot__message.is-error .fic-chatbot__bubble { color: #9f1d1d; background: #fff0f0; }

.fic-chatbot__products { display: grid; width: min(94%, 345px); margin-top: 7px; gap: 7px; }
.fic-chatbot__product-card { display: grid; grid-template-columns: minmax(0, 1fr); min-height: 58px; overflow: hidden; border: 1px solid rgba(0, 0, 0, .09); border-radius: 12px; color: var(--fic-ink); background: #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, .06); text-decoration: none; }
.fic-chatbot__product-card.has-image { grid-template-columns: 58px minmax(0, 1fr); }
.fic-chatbot__product-card:hover { border-color: var(--fic-accent); box-shadow: 0 4px 14px rgba(0, 0, 0, .1); }
.fic-chatbot__product-card img { width: 58px; height: 100%; min-height: 58px; max-height: 76px; object-fit: cover; }
.fic-chatbot__product-body { display: flex; min-width: 0; padding: 8px 10px; flex-direction: column; justify-content: center; gap: 2px; }
.fic-chatbot__product-body strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.fic-chatbot__product-price { color: var(--fic-ink); font-size: 13px; font-weight: 750; }
.fic-chatbot__product-availability { color: #287a38; font-size: 11px; }
.fic-chatbot__product-availability.fic-stock-outofstock { color: #a12727; }
.fic-chatbot__product-availability.fic-stock-onbackorder { color: #8a6500; }
.fic-chatbot__sources { width: min(86%, 320px); margin-top: 6px; padding: 8px 11px; border-radius: 10px; color: var(--fic-muted); background: rgba(255, 255, 255, .72); font-size: 12px; }
.fic-chatbot__sources summary { cursor: pointer; font-weight: 650; }
.fic-chatbot__sources a { display: block; margin-top: 6px; overflow: hidden; color: var(--fic-accent); text-overflow: ellipsis; white-space: nowrap; }

.fic-chatbot__feedback { display: flex; align-items: center; gap: 5px; margin: 5px 0 0 4px; color: var(--fic-muted); font-size: 12px; }
.fic-chatbot .fic-chatbot__feedback button { width: 30px; height: 28px; padding: 0; border: 1px solid #ddd; border-radius: 9px; background: #fff; cursor: pointer; }
.fic-chatbot .fic-chatbot__feedback button:hover { border-color: var(--fic-accent); }
.fic-chatbot .fic-chatbot__feedback button:disabled { opacity: .55; cursor: default; }

.fic-chatbot__suggestions { display: flex; padding: 8px 12px; overflow-x: auto; gap: 7px; border-top: 1px solid #e9e9e7; background: #fff; }
.fic-chatbot__suggestions[hidden] { display: none; }
.fic-chatbot .fic-chatbot__suggestions button { flex: 0 0 auto; max-width: 240px; padding: 7px 11px; overflow: hidden; border: 1px solid var(--fic-accent); border-radius: 999px; color: var(--fic-ink); background: #fff; font: inherit; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.fic-chatbot .fic-chatbot__suggestions button:hover { background: color-mix(in srgb, var(--fic-accent), white 88%); }

.fic-chatbot__lead-area { padding: 0 12px; border-top: 1px solid #e9e9e7; background: #fff; }
.fic-chatbot button.fic-chatbot__lead-toggle { margin: 8px 0; padding: 7px 11px; border: 1px solid var(--fic-accent); border-radius: 10px; color: var(--fic-ink); background: #fff; font: inherit; font-size: 12px; font-weight: 650; cursor: pointer; }
.fic-chatbot__lead-form { display: grid; padding: 4px 2px 16px; gap: 10px; }
.fic-chatbot__lead-form[hidden] { display: none; }
.fic-chatbot__lead-form > strong { margin: 2px 0 4px; font-size: 20px; line-height: 1.2; }
.fic-chatbot .fic-chatbot__lead-form input:not([type="checkbox"]) { height: auto; max-width: none; box-shadow: none; width: 100%; min-height: 38px; margin: 0; padding: 8px 10px; border: 1px solid #d9d9d6; border-radius: 9px; background: #fff; font: inherit; font-size: 13px; }
.fic-chatbot__lead-form label { color: var(--fic-muted); font-size: 11px; line-height: 1.35; }
.fic-chatbot .fic-chatbot__lead-form button[type="submit"] { min-height: 38px; border: 0; border-radius: 9px; color: var(--fic-on-accent); background: var(--fic-accent); font-weight: 700; cursor: pointer; }

.fic-chatbot__panel.is-lead-mode .fic-chatbot__messages,
.fic-chatbot__panel.is-lead-mode > .fic-chatbot__form { display: none; }
.fic-chatbot__panel.is-lead-mode .fic-chatbot__lead-area { flex: 1; min-height: 0; padding: 10px 14px 14px; overflow-y: auto; border-top: 0; background: #f8f8f6; }
.fic-chatbot__panel.is-lead-mode .fic-chatbot__lead-toggle { margin: 0 0 10px; border-color: #d4d4d0; background: transparent; }
.fic-chatbot__panel.is-lead-mode .fic-chatbot__lead-form { padding: 16px; border: 1px solid #e4e4df; border-radius: 16px; background: #fff; box-shadow: 0 6px 20px rgba(0, 0, 0, .06); }

.fic-chatbot__form { position: relative; display: flex; align-items: flex-end; min-height: 72px; padding: 11px 12px; gap: 8px; border-top: 1px solid #e9e9e7; background: #fff; }
.fic-chatbot .fic-chatbot__form textarea { width: auto; max-width: none; overflow: auto; flex: 1; min-height: 46px; max-height: 110px; margin: 0; padding: 12px 14px; resize: none; border: 1px solid #d9d9d6; border-radius: 14px; color: var(--fic-ink); background: #fff; font: inherit; font-size: 14px; line-height: 1.45; box-shadow: none; }
.fic-chatbot .fic-chatbot__form button { flex: 0 0 46px; width: 46px; height: 46px; padding: 0; border: 0; border-radius: 13px; color: var(--fic-on-accent); background: var(--fic-accent); font-size: 21px; cursor: pointer; }
.fic-chatbot .fic-chatbot__form button:disabled, .fic-chatbot .fic-chatbot__form textarea:disabled { opacity: .55; cursor: wait; }
.fic-chatbot__trap { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }

@keyframes fic-enter { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes fic-pulse { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
@keyframes fic-tom-idle { 0%, 100% { transform: rotate(-.8deg); } 50% { transform: rotate(.8deg); } }
@keyframes fic-tom-greet { 0%, 100% { transform: rotate(0) scale(1); } 35% { transform: rotate(-7deg) scale(1.08); } 70% { transform: rotate(6deg) scale(1.08); } }
@keyframes fic-blink { 0%, 93%, 100% { transform: scaleY(0); } 96% { transform: scaleY(1); } }
@keyframes fic-wave { 0%, 70%, 100% { transform: translateY(115%) rotate(0); } 74% { transform: translateY(0) rotate(0); } 77%, 83% { transform: translateY(0) rotate(-18deg); } 80%, 86% { transform: translateY(0) rotate(14deg); } 90% { transform: translateY(0) rotate(0); } 95% { transform: translateY(115%) rotate(0); } }

/* Google's reCAPTCHA badge is fixed in this same corner and must stay visible to satisfy its terms. */
body:has(.grecaptcha-badge) .fic-chatbot { bottom: 90px; }
body:has(.grecaptcha-badge) .fic-chatbot__panel { height: min(610px, calc(100vh - 180px)); }

@media (max-width: 520px) {
  body:has(.grecaptcha-badge) .fic-chatbot__panel { height: min(650px, calc(100dvh - 166px)); }
  .fic-chatbot { right: 12px; bottom: 12px; }
  .fic-chatbot__panel { width: calc(100vw - 24px); height: min(650px, calc(100dvh - 88px)); margin-bottom: 10px; border-radius: 18px; }
  .fic-chatbot button.fic-chatbot__toggle { width: 56px; height: 56px; }
  /* iOS Safari zooms the page when a focused field's text is under 16px. */
  .fic-chatbot .fic-chatbot__form textarea, .fic-chatbot input, .fic-chatbot textarea, .fic-chatbot select { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .fic-chatbot__panel, .fic-chatbot button.fic-chatbot__toggle, .fic-chatbot__face, .fic-chatbot__lid::before, .fic-chatbot__hand, .fic-chatbot__message.is-pending .fic-chatbot__bubble { animation: none; transition: none; }
}
