/* Ask Interpool: chat widget styles. All selectors are scoped under .ipa-root. */

.ipa-root {
  --ipa-navy: #221F18;            /* walnut deep, the brand's dark ground */
  --ipa-header: #1A1A1A;          /* the chat header bar */
  --ipa-purple-mid: #4E352B;      /* walnut */
  --ipa-primary: #D71920;         /* Interpool red */
  --ipa-teal: #C7B69F;            /* cloth, the warm secondary */
  --ipa-lavender: #D5C7AD;        /* sand, for light text on the dark header */
  --ipa-tint: #EFF0EC;            /* ivory */
  --ipa-text: #3A362F;
  --ipa-ink: #1A1A1A;
  --ipa-muted: #7A7468;
  --ipa-line: #E2DED4;
  --ipa-grad: linear-gradient(90deg, #9E1017 0%, #D71920 55%, #FF0202 100%);
  /* Quicksand is the Interpool body face. It is not loaded by this plugin: if the page
     already has it the widget matches the site, and if not it falls back cleanly. */
  --ipa-font: Quicksand, Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ipa-ease: cubic-bezier(.2, .8, .2, 1);
  --ipa-ring: 0 0 0 3px rgba(199, 182, 159, .55);
}

/* ---------- Reset (defend against theme and Elementor globals) ---------- */
.ipa-root,
.ipa-root *,
.ipa-root *::before,
.ipa-root *::after {
  box-sizing: border-box;
}
.ipa-root * {
  font-family: var(--ipa-font);
  letter-spacing: normal;
  text-transform: none;
  text-shadow: none;
  word-spacing: normal;
}
.ipa-root p,
.ipa-root h2,
.ipa-root h3,
.ipa-root ul,
.ipa-root ol,
.ipa-root li,
.ipa-root form,
.ipa-root label {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
  font-weight: inherit;
}
.ipa-root button,
.ipa-root input,
.ipa-root textarea {
  margin: 0;
  padding: 0;
  border-radius: 0;
  max-width: none;
  font: inherit;
  font-family: var(--ipa-font);
  color: inherit;
  text-transform: none;
  letter-spacing: normal;
  box-shadow: none;
  min-height: 0;
  min-width: 0;
  width: auto;
  height: auto;
  line-height: inherit;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.ipa-root button {
  background: none;
  border: 0;
  border-radius: 0;
  padding: 0;
  cursor: pointer;
  text-decoration: none;
  white-space: normal;
}
.ipa-root button:hover,
.ipa-root button:focus {
  background-color: transparent;
  color: inherit;
}
.ipa-root a {
  text-decoration: none;
  box-shadow: none;
  border: 0;
}
.ipa-root img {
  max-width: none;
  border: 0;
  box-shadow: none;
  border-radius: 0;
}
.ipa-root [hidden] { display: none !important; }

.ipa-root .ipa-sr {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.ipa-root .ipa-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  line-height: 0;
}
.ipa-root .ipa-icon svg { display: block; }

/* Teal focus ring on every control */
.ipa-root a:focus-visible,
.ipa-root button:focus-visible,
.ipa-root input:focus-visible,
.ipa-root textarea:focus-visible,
.ipa-root .ipa-log:focus-visible {
  outline: 2px solid var(--ipa-teal);
  outline-offset: 2px;
}

/* ---------- Launcher ---------- */
.ipa-root .ipa-launcher {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 99990;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  height: 60px;
  padding: 0 22px 0 16px;
  border-radius: 999px;
  background: var(--ipa-grad);
  background-size: 100% 100%;
  background-position: 0% 50%;
  color: #fff;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 12px 30px -8px rgba(26, 26, 26, .55), 0 2px 6px rgba(26, 26, 26, .18), inset 0 1px 0 rgba(255, 255, 255, .22);
  opacity: 0;
  transform: translateY(16px) scale(.96);
  transition: box-shadow .25s ease, transform .25s var(--ipa-ease), padding .25s var(--ipa-ease), width .25s var(--ipa-ease);
}
.ipa-root.ipa-ready .ipa-launcher {
  opacity: 1;
  transform: none;
  animation: ipa-rise .6s var(--ipa-ease) .25s backwards;
}
.ipa-root .ipa-launcher:hover {
  background: var(--ipa-grad);
  background-size: 100% 100%;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 16px 36px -8px rgba(26, 26, 26, .6), 0 3px 8px rgba(26, 26, 26, .2), inset 0 1px 0 rgba(255, 255, 255, .22);
}
.ipa-root .ipa-launcher:focus { background: var(--ipa-grad); background-size: 100% 100%; color: #fff; }
.ipa-root .ipa-launcher:focus-visible { outline: 0; box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--ipa-teal), 0 12px 30px -8px rgba(26, 26, 26, .55); }
.ipa-root .ipa-launcher:active { transform: scale(.97); }

/* The mark: a spotted ball, the one shape this company owns. */
.ipa-root .ipa-launcher-mark svg { width: 28px; height: 28px; }
.ipa-root .ipa-launcher-close { display: none; }

.ipa-root .ipa-launcher-label {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  color: #fff;
  text-align: left;
}
.ipa-root .ipa-launcher-title { font-size: 15px; font-weight: 700; line-height: 1; color: #fff; }
.ipa-root .ipa-launcher-sub { font-size: 12.5px; font-weight: 600; line-height: 1; color: rgba(255, 255, 255, .88); }

/* First visit attention: two pulse rings, then still. JS adds the class once. */
.ipa-root .ipa-launcher--pulse::before {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: 0 0 0 0 rgba(215, 25, 32, .55);
  animation: ipa-pulse 1.5s ease-out 1.2s 2 both;
}

/* Panel open: a compact round close control */
.ipa-root.ipa-is-open .ipa-launcher {
  width: 52px;
  height: 52px;
  padding: 0;
  justify-content: center;
  background: var(--ipa-navy);
}
.ipa-root.ipa-is-open .ipa-launcher:hover,
.ipa-root.ipa-is-open .ipa-launcher:focus { background: var(--ipa-header); }
.ipa-root.ipa-is-open .ipa-launcher-label,
.ipa-root.ipa-is-open .ipa-launcher-mark { display: none; }
.ipa-root.ipa-is-open .ipa-launcher-close { display: inline-flex; }
.ipa-root.ipa-is-open .ipa-launcher--pulse::before { display: none; }

@keyframes ipa-rise {
  from { opacity: 0; transform: translateY(16px) scale(.96); }
  to { opacity: 1; transform: none; }
}
@keyframes ipa-pulse {
  0% { box-shadow: 0 0 0 0 rgba(215, 25, 32, .55); }
  100% { box-shadow: 0 0 0 20px rgba(215, 25, 32, 0); }
}

/* ---------- Nudge bubble ---------- */
.ipa-root .ipa-nudge {
  position: fixed;
  right: 24px;
  bottom: 96px;
  z-index: 99990;
  display: flex;
  align-items: center;
  gap: 4px;
  max-width: min(320px, calc(100vw - 48px));
  padding: 4px 4px 4px 16px;
  border-radius: 14px;
  background: #fff;
  color: var(--ipa-ink);
  box-shadow: 0 14px 34px -12px rgba(26, 26, 26, .45), 0 0 0 1px rgba(26, 26, 26, .08);
  animation: ipa-nudge-in .35s var(--ipa-ease) both;
}
.ipa-root .ipa-nudge::after {
  content: "";
  position: absolute;
  right: 28px;
  bottom: -6px;
  width: 12px;
  height: 12px;
  background: #fff;
  transform: rotate(45deg);
  box-shadow: 1px 1px 0 0 rgba(26, 26, 26, .08);
}
.ipa-root .ipa-nudge-text {
  min-height: 44px;
  padding: 6px 6px 6px 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ipa-ink);
  text-align: left;
  white-space: normal;
}
.ipa-root .ipa-nudge-text:hover,
.ipa-root .ipa-nudge-text:focus { color: var(--ipa-primary); }
.ipa-root .ipa-nudge-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  color: var(--ipa-muted);
}
.ipa-root .ipa-nudge-close:hover,
.ipa-root .ipa-nudge-close:focus-visible { background-color: var(--ipa-tint); color: var(--ipa-ink); }
.ipa-root .ipa-nudge-close svg { width: 16px; height: 16px; }
.ipa-root .ipa-nudge--out { animation: ipa-nudge-out .2s ease both; }
@keyframes ipa-nudge-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
@keyframes ipa-nudge-out {
  from { opacity: 1; }
  to { opacity: 0; transform: translateY(6px); }
}

/* ---------- Panel ---------- */
.ipa-root .ipa-panel {
  position: fixed;
  right: 24px;
  bottom: 96px;
  z-index: 99991;
  display: flex;
  flex-direction: column;
  width: 540px;
  max-width: calc(100vw - 48px);
  height: min(74vh, 660px);
  min-height: 420px;
  max-height: calc(100vh - 120px);
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  color: var(--ipa-text);
  font-family: var(--ipa-font);
  font-size: 15px;
  line-height: 1.55;
  text-align: left;
  box-shadow: 0 28px 64px -20px rgba(26, 26, 26, .5), 0 10px 24px -12px rgba(26, 26, 26, .25), 0 0 0 1px rgba(26, 26, 26, .07);
  visibility: hidden;
  opacity: 0;
  transform: translateY(14px) scale(.985);
  transform-origin: bottom right;
  transition: opacity .22s ease, transform .28s var(--ipa-ease), visibility 0s linear .28s;
}
.ipa-root.ipa-is-open .ipa-panel {
  visibility: visible;
  opacity: 1;
  transform: none;
  transition: opacity .22s ease, transform .28s var(--ipa-ease), visibility 0s;
}

.ipa-root .ipa-header {
  position: relative;
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px 10px 12px 18px;
  background:
    radial-gradient(120% 160% at 100% 0%, rgba(199, 182, 159, .24) 0%, rgba(199, 182, 159, 0) 46%),
    radial-gradient(90% 140% at 0% 100%, rgba(158, 16, 23, .6) 0%, rgba(158, 16, 23, 0) 62%),
    var(--ipa-header);
  color: #fff;
}
.ipa-root .ipa-header--nologo { padding-top: 16px; padding-bottom: 16px; }
.ipa-root .ipa-header::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--ipa-grad);
  opacity: .9;
}
.ipa-root .ipa-htop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 34px;
}
.ipa-root .ipa-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.ipa-root .ipa-logo {
  display: block;
  height: 26px;
  width: auto;
  max-width: 120px;
  flex: none;
}
.ipa-root .ipa-titles { min-width: 0; padding-right: 8px; }
.ipa-root .ipa-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.01em;
  color: #fff;
  white-space: nowrap;
}
.ipa-root .ipa-title-mark svg { width: 18px; height: 18px; }
.ipa-root .ipa-subtitle {
  margin-top: 2px;
  font-size: 12px;
  line-height: 1.3;
  color: var(--ipa-lavender);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ipa-root .ipa-hactions {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: none;
}
.ipa-root .ipa-hbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  min-width: 34px;
  padding: 0 8px;
  border-radius: 10px;
  color: var(--ipa-lavender);
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.ipa-root .ipa-hbtn:hover,
.ipa-root .ipa-hbtn:focus-visible {
  background-color: rgba(255, 255, 255, .1);
  color: #fff;
}
.ipa-root .ipa-newchat {
  height: 30px;
  padding: 0 11px 0 9px;
  margin-right: 4px;
  border: 1px solid rgba(199, 182, 159, .35);
  border-radius: 999px;
}
.ipa-root .ipa-newchat:hover { border-color: rgba(255, 255, 255, .5); }

/* Scroll area */
.ipa-root .ipa-scroll {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  background:
    radial-gradient(140% 60% at 50% 0%, rgba(239, 240, 236, .95) 0%, rgba(255, 255, 255, 0) 70%),
    #fff;
  scrollbar-width: thin;
  scrollbar-color: #D9D2C4 transparent;
}
.ipa-root .ipa-scroll::-webkit-scrollbar { width: 8px; }
.ipa-root .ipa-scroll::-webkit-scrollbar-thumb { background: #D9D2C4; border-radius: 8px; border: 2px solid #fff; }
.ipa-root .ipa-log {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px 18px 18px;
  outline: none;
}

/* Empty state */
/* Empty state: guided first screen */
.ipa-root .ipa-empty { display: flex; flex-direction: column; gap: 16px; }
.ipa-root .ipa-intro { padding: 2px 2px 0; }
.ipa-root .ipa-intro-title {
  font-size: 19px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -.01em;
  color: var(--ipa-ink);
}
.ipa-root .ipa-intro-text {
  margin-top: 5px;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--ipa-muted);
  max-width: 44ch;
}
.ipa-root .ipa-paths {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.ipa-root .ipa-path {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 4px;
  width: 100%;
  min-height: 70px;
  padding: 11px 34px 11px 14px;
  border: 1px solid var(--ipa-line);
  border-radius: 14px;
  background: #fff;
  color: var(--ipa-ink);
  text-align: left;
  box-shadow: 0 1px 2px rgba(26, 26, 26, .04);
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s var(--ipa-ease);
}
.ipa-root .ipa-path::after {
  content: "";
  position: absolute;
  right: 16px;
  top: 50%;
  width: 8px;
  height: 8px;
  margin-top: -5px;
  border-right: 2px solid var(--ipa-primary);
  border-bottom: 2px solid var(--ipa-primary);
  transform: rotate(-45deg);
  opacity: .7;
  transition: opacity .15s ease, transform .15s var(--ipa-ease);
}
.ipa-root .ipa-path:hover,
.ipa-root .ipa-path:focus-visible {
  border-color: var(--ipa-teal);
  background-color: #fff;
  color: var(--ipa-ink);
  box-shadow: 0 8px 20px -12px rgba(26, 26, 26, .45);
  transform: translateY(-1px);
}
.ipa-root .ipa-path:hover::after { opacity: 1; transform: translate(2px, 0) rotate(-45deg); }
.ipa-root .ipa-path:active { transform: translateY(0); }
.ipa-root .ipa-path-title { font-size: 15px; font-weight: 700; line-height: 1.25; color: var(--ipa-navy); }
.ipa-root .ipa-path-hint { font-size: 13px; line-height: 1.35; color: var(--ipa-muted); }

/* Paths as chips after an answer */
.ipa-root .ipa-suggestions--paths { margin-top: 6px; }
.ipa-root .ipa-suggestions-label {
  width: 100%;
  margin: 0 0 2px 2px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ipa-muted);
}
.ipa-root .ipa-chip--path { color: var(--ipa-navy); border-color: var(--ipa-line); background: #FBFAF7; }
.ipa-root .ipa-chip--path:hover,
.ipa-root .ipa-chip--path:focus-visible { border-color: var(--ipa-teal); background-color: #F6F4EF; color: var(--ipa-primary); }
.ipa-root .ipa-chip--restart { color: var(--ipa-muted); border-style: dashed; background: #fff; }
.ipa-root .ipa-chip--restart:hover,
.ipa-root .ipa-chip--restart:focus-visible { color: var(--ipa-navy); border-color: var(--ipa-navy); border-style: solid; background: #fff; }
.ipa-root .ipa-chip--restart .ipa-icon svg { width: 13px; height: 13px; margin-right: 5px; }

/* Messages */
.ipa-root .ipa-msg {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 100%;
  animation: ipa-in .28s var(--ipa-ease) both;
}
.ipa-root .ipa-msg--user { align-items: flex-end; }
.ipa-root .ipa-bubble {
  position: relative;
  max-width: 88%;
  padding: 11px 15px;
  border-radius: 16px;
  overflow-wrap: anywhere;
  word-break: normal;
}
.ipa-root .ipa-msg--user .ipa-bubble {
  max-width: 80%;
  background: var(--ipa-navy);
  color: #fff;
  border-bottom-right-radius: 6px;
  white-space: pre-wrap;
  box-shadow: 0 6px 16px -10px rgba(34, 31, 24, .7);
}
.ipa-root .ipa-msg--assistant .ipa-bubble {
  background: var(--ipa-tint);
  color: var(--ipa-ink);
  border-bottom-left-radius: 6px;
}
.ipa-root .ipa-msg--error .ipa-bubble {
  background: #FFF6EC;
  color: #5B3A16;
  box-shadow: inset 3px 0 0 #E9A55A;
}
.ipa-root .ipa-msg--confirm .ipa-bubble {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: linear-gradient(135deg, rgba(199, 182, 159, .26), rgba(239, 240, 236, .9));
  box-shadow: inset 0 0 0 1px rgba(157, 137, 113, .45);
}
.ipa-root .ipa-confirm-icon {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--ipa-teal);
  color: #fff;
  margin-top: 1px;
}
.ipa-root .ipa-confirm-icon svg { width: 15px; height: 15px; }

@keyframes ipa-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* Markdown inside assistant bubbles */
.ipa-root .ipa-bubble p + p,
.ipa-root .ipa-bubble p + .ipa-md-list,
.ipa-root .ipa-bubble .ipa-md-list + p,
.ipa-root .ipa-bubble .ipa-md-list + .ipa-md-list { margin-top: 9px; }
.ipa-root .ipa-bubble strong { font-weight: 650; color: var(--ipa-navy); }
.ipa-root .ipa-msg--user .ipa-bubble strong { color: #fff; }
.ipa-root .ipa-md-h { font-weight: 650; color: var(--ipa-navy); }
.ipa-root .ipa-md-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.ipa-root .ipa-md-list li {
  position: relative;
  padding-left: 18px;
  margin: 0;
  list-style: none;
}
.ipa-root .ipa-md-list li + li { margin-top: 5px; }
.ipa-root .ipa-md-list li::before {
  content: "";
  position: absolute;
  left: 3px;
  top: .62em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ipa-teal);
}
.ipa-root .ipa-md-ol { counter-reset: ipa-ol; }
.ipa-root .ipa-md-ol li { counter-increment: ipa-ol; padding-left: 22px; }
.ipa-root .ipa-md-ol li::before {
  content: counter(ipa-ol) ".";
  top: 0;
  left: 0;
  width: auto;
  height: auto;
  background: none;
  border-radius: 0;
  font-weight: 650;
  color: var(--ipa-primary);
}
.ipa-root .ipa-link {
  color: var(--ipa-primary);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: rgba(158, 16, 23, .35);
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
  transition: text-decoration-color .15s ease, color .15s ease;
}
.ipa-root .ipa-link:hover { color: var(--ipa-navy); text-decoration-color: var(--ipa-teal); }
.ipa-root .ipa-msg--error .ipa-link { color: #7A4310; }

/* Page cards */
.ipa-root .ipa-cards-label {
  margin: 12px 0 6px 2px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ipa-muted);
}
.ipa-root .ipa-cards {
  display: flex;
  flex-direction: column;
  gap: 7px;
  width: 90%;
}
.ipa-root .ipa-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px 11px 14px;
  border: 1px solid var(--ipa-line);
  border-radius: 12px;
  background: #fff;
  color: var(--ipa-ink);
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(34, 31, 24, .04);
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s var(--ipa-ease);
}
.ipa-root .ipa-card:hover,
.ipa-root .ipa-card:focus-visible {
  border-color: var(--ipa-teal);
  box-shadow: 0 8px 20px -12px rgba(34, 31, 24, .45);
  transform: translateY(-1px);
  color: var(--ipa-ink);
}
.ipa-root .ipa-card-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1 1 auto;
}
.ipa-root .ipa-card-title {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ipa-navy);
}
.ipa-root .ipa-card-why {
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--ipa-muted);
}
.ipa-root .ipa-card-arrow {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--ipa-tint);
  color: var(--ipa-primary);
  transition: background .15s ease, color .15s ease, transform .15s var(--ipa-ease);
}
.ipa-root .ipa-card:hover .ipa-card-arrow,
.ipa-root .ipa-card:focus-visible .ipa-card-arrow {
  background: var(--ipa-grad);
  color: #fff;
  transform: translateX(2px);
}

/* CTA row and buttons */
.ipa-root .ipa-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}
.ipa-root .ipa-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  transition: background-position .4s var(--ipa-ease), box-shadow .2s ease, border-color .15s ease, color .15s ease, transform .15s var(--ipa-ease);
}
.ipa-root .ipa-btn--primary,
.ipa-root .ipa-btn--primary:focus,
.ipa-root button.ipa-btn--primary:hover {
  background: var(--ipa-grad);
  background-size: 100% 100%;
  background-position: 0% 50%;
  color: #fff;
  box-shadow: 0 8px 18px -10px rgba(158, 16, 23, .8);
}
.ipa-root .ipa-btn--primary:hover,
.ipa-root button.ipa-btn--primary:hover {
  color: #fff;
  filter: saturate(1.12) brightness(1.03);
  box-shadow: 0 10px 22px -10px rgba(158, 16, 23, .9);
}
.ipa-root .ipa-btn--primary[disabled] { opacity: .7; cursor: progress; }
.ipa-root .ipa-btn--ghost {
  border: 1px solid var(--ipa-line);
  background: #fff;
  color: var(--ipa-primary);
}
.ipa-root .ipa-btn--ghost:hover,
.ipa-root .ipa-btn--ghost:focus-visible {
  border-color: var(--ipa-primary);
  background: #fff;
  color: var(--ipa-primary);
}
.ipa-root .ipa-btn--text {
  height: 40px;
  padding: 0 12px;
  color: var(--ipa-muted);
  font-weight: 500;
}
.ipa-root .ipa-btn--text:hover { color: var(--ipa-navy); }

/* Suggestions */
.ipa-root .ipa-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: -2px;
  animation: ipa-in .3s var(--ipa-ease) .08s both;
}
.ipa-root .ipa-chip {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border: 1px solid #E2DED4;
  border-radius: 999px;
  background: #fff;
  color: var(--ipa-primary);
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.3;
  text-align: left;
  transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}
.ipa-root .ipa-chip:hover,
.ipa-root .ipa-chip:focus-visible {
  border-color: var(--ipa-teal);
  background-color: #F6F4EF;
  color: var(--ipa-navy);
}

/* Typing indicator */
.ipa-root .ipa-typing .ipa-bubble {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 14px 16px;
}
.ipa-root .ipa-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ipa-primary);
  opacity: .35;
  animation: ipa-bounce 1.2s ease-in-out infinite;
}
.ipa-root .ipa-dot:nth-child(3) { animation-delay: .15s; }
.ipa-root .ipa-dot:nth-child(4) { animation-delay: .3s; }
@keyframes ipa-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: .35; }
  30% { transform: translateY(-4px); opacity: .9; }
}

/* ---------- Lead form ---------- */
.ipa-root .ipa-lead {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px 16px 16px;
  border: 1px solid var(--ipa-line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 14px 30px -20px rgba(34, 31, 24, .5);
  animation: ipa-in .3s var(--ipa-ease) both;
  position: relative;
  overflow: hidden;
}
.ipa-root .ipa-lead::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--ipa-grad);
}
.ipa-root .ipa-lead-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ipa-navy);
}
.ipa-root .ipa-lead-intro {
  margin-top: 2px;
  font-size: 12.5px;
  color: var(--ipa-muted);
}
.ipa-root .ipa-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.ipa-root .ipa-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1 1 100%;
  min-width: 0;
}
.ipa-root .ipa-field--half { flex: 1 1 calc(50% - 5px); }
.ipa-root .ipa-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ipa-navy);
}
.ipa-root .ipa-req { color: var(--ipa-primary); }
.ipa-root .ipa-field-input {
  display: block;
  width: 100%;
  height: 38px;
  padding: 8px 11px;
  border: 1px solid #E2DED4;
  border-radius: 10px;
  background: #FBFAF7;
  color: var(--ipa-ink);
  font-size: 14px;
  line-height: 1.4;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.ipa-root textarea.ipa-field-input {
  height: auto;
  min-height: 70px;
  resize: vertical;
}
.ipa-root .ipa-field-input:hover { border-color: #C7B69F; }
.ipa-root .ipa-field-input:focus,
.ipa-root .ipa-field-input:focus-visible {
  outline: 0;
  border-color: var(--ipa-teal);
  background: #fff;
  box-shadow: var(--ipa-ring);
}
.ipa-root .ipa-field-input[aria-invalid="true"] { border-color: #D71920; }
.ipa-root .ipa-field-error {
  font-size: 12px;
  line-height: 1.3;
  color: #9E1017;
}
.ipa-root .ipa-field-error:empty { display: none; }
.ipa-root .ipa-consent {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 4px 10px;
  align-items: start;
}
.ipa-root .ipa-check {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  border: 1.5px solid #B9B1A3;
  border-radius: 5px;
  background: #fff;
  cursor: pointer;
  display: inline-grid;
  place-content: center;
  transition: background-color .15s ease, border-color .15s ease;
}
.ipa-root .ipa-check::after {
  content: "";
  width: 9px;
  height: 5px;
  border: 2px solid #fff;
  border-top: 0;
  border-right: 0;
  transform: rotate(-45deg) translate(1px, -1px);
  opacity: 0;
}
.ipa-root .ipa-check:checked { background: var(--ipa-primary); border-color: var(--ipa-primary); }
.ipa-root .ipa-check:checked::after { opacity: 1; }
.ipa-root .ipa-check[aria-invalid="true"] { border-color: #D71920; }
.ipa-root .ipa-check:focus-visible { outline: 2px solid var(--ipa-teal); outline-offset: 2px; }
.ipa-root .ipa-consent-label {
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--ipa-text);
  cursor: pointer;
}
.ipa-root .ipa-consent .ipa-field-error { grid-column: 2; }
.ipa-root .ipa-hp {
  position: absolute !important;
  left: -10000px !important;
  top: auto !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}
.ipa-root .ipa-lead-status:empty { display: none; }
.ipa-root .ipa-lead-status--error {
  padding: 10px 12px;
  border-radius: 10px;
  background: #FBF0F0;
  color: #8A2236;
  font-size: 13px;
  line-height: 1.45;
}
.ipa-root .ipa-lead-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ---------- Footer / composer ---------- */
.ipa-root .ipa-footer {
  flex: none;
  padding: 12px 14px 10px;
  border-top: 1px solid var(--ipa-line);
  background: #fff;
}
.ipa-root .ipa-composer { position: relative; }
.ipa-root .ipa-inputwrap {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 6px 6px 6px 14px;
  border: 1px solid #E2DED4;
  border-radius: 16px;
  background: #FBFAF7;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.ipa-root .ipa-inputwrap:focus-within {
  border-color: var(--ipa-teal);
  background: #fff;
  box-shadow: var(--ipa-ring);
}
.ipa-root .ipa-input {
  display: block;
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  height: 22px;
  max-height: 120px;
  padding: 7px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ipa-ink);
  font-size: 14.5px;
  line-height: 22px;
  resize: none;
  overflow-y: hidden;
  box-sizing: content-box;
}
.ipa-root .ipa-input:focus,
.ipa-root .ipa-input:focus-visible { outline: 0; border: 0; box-shadow: none; background: transparent; }
.ipa-root .ipa-input::placeholder { color: #8C867A; opacity: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ipa-root .ipa-send {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--ipa-grad);
  color: #fff;
  box-shadow: 0 6px 14px -8px rgba(158, 16, 23, .9);
  transition: opacity .15s ease, transform .15s var(--ipa-ease), filter .15s ease;
}
.ipa-root .ipa-send:hover,
.ipa-root .ipa-send:focus { background: var(--ipa-grad); color: #fff; }
.ipa-root .ipa-send:hover:not([disabled]) { transform: translateY(-1px); filter: saturate(1.15); }
.ipa-root .ipa-send[disabled] {
  background: #E7E3DA;
  color: #A6A096;
  box-shadow: none;
  cursor: default;
}
.ipa-root .ipa-busy .ipa-send[disabled] { cursor: progress; }
.ipa-root .ipa-counter {
  display: none;
  position: absolute;
  right: 54px;
  top: -20px;
  padding: 1px 7px;
  border-radius: 999px;
  background: #fff;
  font-size: 11px;
  font-weight: 500;
  line-height: 16px;
  color: var(--ipa-muted);
  font-variant-numeric: tabular-nums;
}
.ipa-root .ipa-counter--show { display: block; }
.ipa-root .ipa-counter--max { color: #9E1017; }
.ipa-root .ipa-note {
  margin-top: 8px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ipa-muted);
  text-align: center;
}
.ipa-root .ipa-note .ipa-link { font-weight: 500; color: var(--ipa-primary); }
.ipa-root .ipa-notebtn { all: unset; cursor: pointer; font: inherit; font-weight: 600; color: var(--ipa-primary); text-decoration: underline; text-underline-offset: 2px; }
.ipa-root .ipa-notebtn:hover { color: var(--ipa-navy); }
.ipa-root .ipa-notebtn:focus-visible { outline: 2px solid var(--ipa-primary); outline-offset: 2px; border-radius: 3px; }

/* ---------- Left corner (default: WhatsApp owns the bottom right on interpoolme.com) ---------- */
.ipa-root.ipa-root--left .ipa-launcher { right: auto; left: 24px; }
.ipa-root.ipa-root--left .ipa-nudge { right: auto; left: 24px; }
.ipa-root.ipa-root--left .ipa-nudge::after { right: auto; left: 28px; }
.ipa-root.ipa-root--left .ipa-panel { right: auto; left: 24px; transform-origin: bottom left; }

/* ---------- Mobile ---------- */
@media (max-width: 599.98px) {
  .ipa-root .ipa-launcher {
    right: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    height: 56px;
    gap: 9px;
    padding: 0 20px 0 14px;
  }
  .ipa-root .ipa-launcher-mark svg { width: 26px; height: 26px; }
  .ipa-root .ipa-launcher-sub { display: none; }
  .ipa-root.ipa-is-open .ipa-launcher { display: none; }
  .ipa-root .ipa-nudge {
    right: 16px;
    bottom: calc(82px + env(safe-area-inset-bottom, 0px));
    max-width: calc(100vw - 32px);
  }
  .ipa-root .ipa-nudge::after { right: 24px; }
  .ipa-root.ipa-root--left .ipa-launcher { right: auto; left: 16px; }
  .ipa-root.ipa-root--left .ipa-nudge { right: auto; left: 16px; }
  .ipa-root.ipa-root--left .ipa-nudge::after { right: auto; left: 24px; }
  .ipa-root.ipa-root--left .ipa-panel { left: 0; right: 0; }

  .ipa-root .ipa-panel {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    max-width: none;
    height: 100%;
    height: 100dvh;
    max-height: none;
    border-radius: 0;
    transform: translateY(24px);
    transform-origin: bottom center;
  }
  .ipa-root .ipa-header {
    gap: 8px;
    padding: 8px 6px 10px 14px;
    padding-top: calc(8px + env(safe-area-inset-top, 0px));
  }
  .ipa-root .ipa-close { width: 44px; height: 44px; }
  .ipa-root .ipa-newchat { height: 32px; }
  .ipa-root .ipa-log { padding: 18px 14px 16px; }
  .ipa-root .ipa-footer { padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px)); }
  .ipa-root .ipa-input { font-size: 16px; }
  .ipa-root .ipa-field-input { font-size: 16px; }
  .ipa-root .ipa-cards { width: 100%; }
  .ipa-root .ipa-bubble { max-width: 94%; }
}
@media (max-width: 380px) {
  .ipa-root .ipa-logo { max-width: 100px; }
}
html.ipa-lock,
html.ipa-lock body {
  overflow: hidden !important;
}

/* Short desktop viewports */
/* Interpool's traffic is about 90% mobile, and the house rule is that anything a thumb
   has to hit on a phone is at least 54px for a field and 44px for a control. */
@media (max-width: 599.98px) {
  .ipa-root .ipa-input { height: 26px; padding: 14px 0; font-size: 16px; }
  .ipa-root .ipa-send { width: 44px; height: 44px; }
  .ipa-root .ipa-newchat { height: 44px; }
  .ipa-root .ipa-field-input { min-height: 54px; }
  .ipa-root .ipa-btn { min-height: 44px; }
  .ipa-root .ipa-note .ipa-link,
  .ipa-root .ipa-notebtn { display: inline; padding: 12px 2px; margin: 0 -2px; }
  .ipa-root .ipa-note { font-size: 13px; }
  .ipa-root .ipa-chip { min-height: 44px; padding-top: 10px; padding-bottom: 10px; }
  /* No side by side fields on a phone */
  .ipa-root .ipa-field--half { flex-basis: 100%; }
  /* The guided first screen at 390px */
  .ipa-root .ipa-paths { gap: 10px; }
  .ipa-root .ipa-path { min-height: 84px; padding: 12px 30px 12px 13px; border-radius: 12px; }
  .ipa-root .ipa-path::after { right: 13px; }
  .ipa-root .ipa-path-hint { font-size: 12.5px; }
  .ipa-root .ipa-intro-title { font-size: 20px; }
  .ipa-root .ipa-intro-text { font-size: 15px; }
  .ipa-root .ipa-bubble { font-size: 16px; }
  .ipa-root .ipa-card { min-height: 56px; }
  .ipa-root .ipa-check { width: 24px; height: 24px; }
  .ipa-root .ipa-consent { grid-template-columns: 24px 1fr; }
}

@media (min-width: 600px) and (max-height: 560px) {
  .ipa-root .ipa-panel { bottom: 88px; min-height: 0; max-height: calc(100vh - 104px); }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .ipa-root *,
  .ipa-root *::before,
  .ipa-root *::after {
    animation-duration: .001ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    transition-delay: 0s !important;
    scroll-behavior: auto !important;
  }
  .ipa-root .ipa-launcher { opacity: 1; transform: none; }
  .ipa-root .ipa-launcher--pulse::before { animation: none !important; display: none; }
  .ipa-root .ipa-nudge { animation: none !important; }
}

/* ---------- Print ---------- */
@media print {
  .ipa-root { display: none !important; }
}
