/* IM Chatbot widget — Identity Makers. All selectors prefixed to survive Elementor/theme CSS. */
.imcb-wrap, .imcb, .imcb * { box-sizing: border-box; }
.imcb, .imcb-wrap { --imcb-font: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif; }
.imcb-wrap { position: fixed; bottom: 22px; z-index: 2147483000; display: flex; flex-direction: column; gap: 12px; font-family: var(--imcb-font); }
.imcb-wrap.imcb-pos-right { right: 22px; align-items: flex-end; }
.imcb-wrap.imcb-pos-left { left: 22px; align-items: flex-start; }

/* Launcher */
.imcb-launcher { all: unset; box-sizing: border-box; position: relative; width: 60px; height: 60px; border-radius: 50%; background: var(--imcb-accent); color: var(--imcb-accent-text); display: grid; place-items: center; cursor: pointer; box-shadow: 0 10px 28px rgba(232, 23, 93, .35), 0 2px 6px rgba(0,0,0,.18); transition: transform .2s ease, width .25s ease, padding .25s ease; }
.imcb-launcher:hover { transform: translateY(-2px); }
.imcb-launcher:focus-visible { outline: 3px solid var(--imcb-accent); outline-offset: 3px; }
.imcb-launcher > span { grid-area: 1/1; display: flex; align-items: center; justify-content: center; gap: 10px; transition: opacity .2s, transform .2s; }
.imcb-launcher .imcb-ic-open svg { color: #fff; }
.imcb-launcher .imcb-ic-close { opacity: 0; transform: rotate(-90deg); }
.imcb-wrap.is-open .imcb-ic-open { opacity: 0; transform: scale(.6); pointer-events: none; }
.imcb-wrap.is-open .imcb-ic-close { opacity: 1; transform: none; }
/* Pill: icon + label */
.imcb-launcher-pill { width: auto; height: 56px; border-radius: 999px; padding: 0 22px 0 16px; }
.imcb-pill-label { font: 700 14.5px/1 var(--imcb-font); letter-spacing: .01em; white-space: nowrap; }
.imcb-wrap.is-open .imcb-launcher-pill { width: 56px; padding: 0; }
.imcb-wrap.is-open .imcb-launcher-pill .imcb-ic-open { display: none; }
/* Brand mark image */
.imcb-launcher-avatar { background: #fff; padding: 3px; border: 3px solid var(--imcb-accent); }
.imcb-launcher-avatar .imcb-ic-open img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; display: block; }
.imcb-launcher-avatar .imcb-ic-close { color: var(--imcb-accent); }
.imcb-badge { position: absolute; top: -3px; right: -3px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--imcb-accent); color: #fff; border: 2px solid #fff; font: 700 11px/16px var(--imcb-font); text-align: center; }
.imcb-badge[hidden] { display: none; }

.imcb-teaser { position: relative; max-width: 270px; background: #fff; color: #1a1b1e; border-radius: 14px 14px 4px 14px; box-shadow: 0 10px 30px rgba(0,0,0,.16); animation: imcb-in .3s ease; }
.imcb-teaser-txt { all: unset; display: block; padding: 14px 32px 14px 16px; font: 500 14px/1.45 var(--imcb-font); cursor: pointer; }
.imcb-teaser-x { all: unset; position: absolute; top: 4px; right: 8px; font-size: 18px; line-height: 1; color: #999; cursor: pointer; padding: 4px; }

/* Panel */
.imcb { display: flex; flex-direction: column; background: #fff; color: #1a1b1e; font-family: var(--imcb-font); font-size: 14.5px; line-height: 1.5; overflow: hidden; text-align: left; }
.imcb[hidden] { display: none; }
.imcb-panel { width: 380px; height: min(620px, calc(100vh - 120px)); border-radius: 18px; box-shadow: 0 20px 60px rgba(0,0,0,.25); animation: imcb-in .25s ease; }
.imcb-inline { width: 100%; border: 1px solid #ececec; border-radius: 18px; box-shadow: 0 10px 30px rgba(0,0,0,.08); }
@keyframes imcb-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.imcb-head { position: relative; display: flex; align-items: center; gap: 8px; padding: 16px 10px 18px 20px; background: var(--imcb-head-bg); color: var(--imcb-head-text); flex: none; }
.imcb-brand { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.imcb-logo { display: block; height: 46px; width: auto; max-width: 200px; object-fit: contain; object-position: left center; }
.imcb-name { font-size: 16px; font-weight: 700; color: inherit; }
.imcb-sub { font-size: 11px; padding-left: 2px; letter-spacing: .02em; opacity: .7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.imcb-testtag { font: 700 10px/1 var(--imcb-font); letter-spacing: .08em; padding: 5px 7px; border-radius: 4px; background: #ffb020; color: #1a1b1e; }
.imcb-icon-btn { all: unset; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px; cursor: pointer; color: inherit; opacity: .8; }
.imcb-icon-btn:hover, .imcb-icon-btn:focus-visible { background: rgba(255,255,255,.12); opacity: 1; }
.imcb-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255,255,255,.12); }
.imcb-progress i { display: block; height: 100%; width: 0; background: var(--imcb-accent); transition: width .4s ease; }

.imcb-msgs { flex: 1; overflow-y: auto; padding: 20px 14px 10px; display: flex; flex-direction: column; gap: 8px; background: #f7f7f8; }
.imcb-row { display: flex; align-items: flex-end; gap: 8px; animation: imcb-in .22s ease; }
.imcb-user { justify-content: flex-end; }
.imcb-av { flex: none; width: 28px; height: 28px; }
.imcb-av img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; display: block; box-shadow: 0 0 0 2px #fff; }
.imcb-bubble { max-width: 80%; padding: 10px 14px; border-radius: 16px; white-space: pre-line; overflow-wrap: anywhere; }
.imcb-bot .imcb-bubble { background: #fff; color: #1a1b1e; border-bottom-left-radius: 4px; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.imcb-user .imcb-bubble { background: var(--imcb-accent); color: var(--imcb-accent-text); border-bottom-right-radius: 4px; font-weight: 500; }
.imcb-typing { display: flex; gap: 4px; padding: 14px 16px; }
.imcb-typing i { width: 7px; height: 7px; border-radius: 50%; background: #b5b5ba; animation: imcb-dot 1.1s infinite ease-in-out; }
.imcb-typing i:nth-child(2) { animation-delay: .15s; }
.imcb-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes imcb-dot { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }

/* Answer area */
.imcb-dock { flex: none; padding: 10px 12px 12px; background: #fff; border-top: 1px solid #eee; }
.imcb-dock:empty { display: none; }
.imcb-dock-chips { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; background: #f7f7f8; border-top: 0; padding-top: 4px; }
.imcb-dock-multi { max-height: 60%; overflow-y: auto; }
.imcb-chip { all: unset; box-sizing: border-box; display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px; border: 1.5px solid var(--imcb-accent); color: var(--imcb-accent); background: #fff; font: 600 13.5px/1.2 var(--imcb-font); cursor: pointer; transition: background .15s, color .15s; }
.imcb-chip:hover, .imcb-chip:focus-visible { background: #fff0f5; }
.imcb-chip.is-on { background: var(--imcb-accent); color: var(--imcb-accent-text); }
.imcb-box { width: 16px; height: 16px; border-radius: 4px; border: 1.5px solid currentColor; display: grid; place-items: center; }
.imcb-box svg { opacity: 0; }
.imcb-chip.is-on .imcb-box { background: #fff; border-color: #fff; color: var(--imcb-accent); }
.imcb-chip.is-on .imcb-box svg { opacity: 1; }
.imcb-cta { all: unset; box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 20px; border-radius: 999px; background: var(--imcb-accent); color: var(--imcb-accent-text); font: 700 14px/1.2 var(--imcb-font); cursor: pointer; text-decoration: none !important; }
.imcb-cta:hover { filter: brightness(1.05); }
.imcb-cta:focus-visible { outline: 2px solid var(--imcb-accent); outline-offset: 2px; }
.imcb-cta[disabled] { opacity: .4; cursor: not-allowed; }
.imcb-dock-multi .imcb-cta { flex-basis: 100%; }
.imcb-wa { background: #25d366; color: #fff; }
.imcb-dock-end { flex-direction: column; align-items: stretch; padding-top: 8px; }
.imcb-dock-end .imcb-wa { width: 100%; padding: 13px 20px; }
.imcb-dock-end .imcb-skip { margin-top: 4px; }
.imcb-dock-rating { justify-content: center; }
.imcb-star { all: unset; font-size: 30px; line-height: 1; color: #d0d0d5; cursor: pointer; padding: 2px; }
.imcb-star.is-on { color: #f5a524; }

.imcb-form { display: flex; gap: 8px; align-items: stretch; }
.imcb-input { all: unset; box-sizing: border-box; flex: 1; min-width: 0; padding: 12px 14px; background: #fff; border: 1.5px solid #dedee2; border-radius: 12px; font: 400 15px/1.3 var(--imcb-font); color: #1a1b1e; resize: none; }
.imcb-input::placeholder { color: #9a9aa2; }
.imcb-input:focus { border-color: var(--imcb-accent); }
textarea.imcb-input { min-height: 46px; max-height: 120px; overflow-y: auto; }
.imcb-cc { position: relative; flex: none; display: flex; }
.imcb-cc-pill { display: flex; align-items: center; gap: 4px; padding: 0 26px 0 12px; border: 1.5px solid #dedee2; border-radius: 12px; background: #fff; font: 600 14px/1 var(--imcb-font); color: #1a1b1e; white-space: nowrap; }
.imcb-cc-pill::after { content: ""; position: absolute; right: 11px; top: 50%; width: 6px; height: 6px; border-right: 2px solid #777; border-bottom: 2px solid #777; transform: translateY(-70%) rotate(45deg); }
.imcb-cc-sel { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 16px; }
.imcb-cc:focus-within .imcb-cc-pill { border-color: var(--imcb-accent); }
.imcb-send { all: unset; box-sizing: border-box; width: 46px; flex: none; display: grid; place-items: center; border-radius: 12px; background: var(--imcb-accent); color: var(--imcb-accent-text); cursor: pointer; }
.imcb-send:focus-visible { outline: 2px solid var(--imcb-accent); outline-offset: 2px; }
.imcb-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.imcb-err { color: #c4153f; font-size: 12.5px; margin: 0 0 6px 2px; }
.imcb-err:empty { display: none; }
.imcb-skip { all: unset; display: block; margin: 8px auto 0; font: 500 12.5px var(--imcb-font); color: #7a7a82; cursor: pointer; text-decoration: underline; text-align: center; }
.imcb-dock-chips .imcb-skip { align-self: center; }
.imcb-privacy { flex: none; padding: 6px 14px 10px; font-size: 11px; color: #8a8a92; background: #fff; text-align: center; }

/* Sheet grab handle (phones only) */
.imcb-grab { display: none; }

@media (max-width: 767px) {
  .imcb-wrap { bottom: 16px; }
  .imcb-wrap.imcb-pos-right { right: 16px; }
  .imcb-wrap.imcb-pos-left { left: 16px; }
  .imcb-launcher { width: 56px; height: 56px; }
  .imcb-launcher-pill { width: auto; height: 52px; padding: 0 18px 0 14px; }
  .imcb-pill-label { font-size: 14px; }
  .imcb-launcher-avatar .imcb-ic-open img { width: 44px; height: 44px; }

  /* Open = bottom sheet over the lower part of the screen; the page stays visible above. */
  .imcb-wrap.is-open { left: 0; right: 0; bottom: var(--imcb-kb, 0px); gap: 0; align-items: stretch; }
  .imcb-wrap.is-open .imcb-launcher, .imcb-wrap.is-open .imcb-teaser { display: none; }
  .imcb-wrap.is-open .imcb-panel { width: 100%; height: var(--imcb-sheet-h, 62vh); max-height: calc(100vh - 40px); border-radius: 20px 20px 0 0; box-shadow: 0 -12px 40px rgba(0,0,0,.28); animation: imcb-up .28s cubic-bezier(.2,.8,.2,1); transition: transform .15s ease-out; }
  .imcb-panel .imcb-grab { display: block; position: absolute; top: 7px; left: 50%; width: 38px; height: 4px; margin-left: -19px; border-radius: 2px; background: rgba(255,255,255,.35); z-index: 2; }
  .imcb-panel { position: relative; }
  .imcb-panel .imcb-head { padding: 18px 8px 12px 16px; }
  .imcb-panel .imcb-logo { height: 36px; }
  .imcb-panel .imcb-msgs { padding-top: 14px; overscroll-behavior: contain; }
  .imcb-panel .imcb-dock { padding-bottom: max(12px, env(safe-area-inset-bottom)); }
  .imcb-input { font-size: 16px; } /* stop iOS zoom */
}
@keyframes imcb-up { from { transform: translateY(100%); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .imcb *, .imcb-wrap * { animation: none !important; transition: none !important; }
}
