.pulse-ai-root,
.pulse-ai-root * {
  box-sizing: border-box;
}

.pulse-ai-root {
  --pulse-ai-primary: #20c4d4;
  --pulse-ai-primary-strong: #08aabd;
  --pulse-ai-dark: #003b64;
  --pulse-ai-deep: #002b4a;
  --pulse-ai-text: #183247;
  --pulse-ai-muted: #6c7f8e;
  --pulse-ai-surface: #ffffff;
  --pulse-ai-soft: #f2fbfd;
  position: fixed;
  right: 24px !important;
  left: auto !important;
  bottom: 24px;
  z-index: 2147483000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  color: var(--pulse-ai-text);
  line-height: 1.55;
  transition: opacity .3s ease, transform .3s ease, visibility .3s ease;
}

.pulse-ai-root.is-waiting {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
}

.pulse-ai-root.is-ready {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}

.pulse-ai-launcher {
  position: relative;
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  align-self: flex-end;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, .9);
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(145deg, var(--pulse-ai-primary) 0%, #10b5c6 45%, var(--pulse-ai-dark) 100%);
  box-shadow: 0 14px 34px rgba(0, 59, 100, .28), 0 4px 12px rgba(0, 59, 100, .18);
  transition: transform .2s ease, box-shadow .2s ease;
}

.pulse-ai-launcher:hover,
.pulse-ai-launcher:focus-visible {
  transform: translateY(-2px) scale(1.035);
  box-shadow: 0 18px 42px rgba(0, 59, 100, .34), 0 5px 14px rgba(0, 59, 100, .18);
  outline: none;
}

.pulse-ai-launcher svg {
  width: 29px;
  height: 29px;
  filter: drop-shadow(0 2px 3px rgba(0, 43, 74, .2));
}

.pulse-ai-launcher-ring {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 13px;
  height: 13px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #36d690;
  box-shadow: 0 0 0 2px rgba(54, 214, 144, .18);
}

.pulse-ai-panel {
  width: min(410px, calc(100vw - 32px));
  height: min(640px, calc(100dvh - 118px));
  margin: 0 0 14px;
  display: none;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid rgba(0, 59, 100, .1);
  border-radius: 24px;
  background: var(--pulse-ai-surface);
  box-shadow: 0 30px 80px rgba(0, 43, 74, .25), 0 10px 28px rgba(0, 59, 100, .14);
}

.pulse-ai-root.is-open .pulse-ai-panel {
  display: grid;
  animation: pulseAiOpen .3s cubic-bezier(.2, .75, .25, 1);
}

@keyframes pulseAiOpen {
  from { opacity: 0; transform: translateY(14px) scale(.975); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.pulse-ai-header {
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 82px;
  padding: 13px 15px;
  color: #fff;
  overflow: hidden;
  background:
    radial-gradient(circle at 92% -20%, rgba(77, 210, 222, .4), transparent 44%),
    linear-gradient(135deg, var(--pulse-ai-dark) 0%, var(--pulse-ai-deep) 100%);
}

.pulse-ai-header::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--pulse-ai-primary), #51d1de, transparent 86%);
}

.pulse-ai-avatar {
  position: relative;
  z-index: 1;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, .85);
  border-radius: 17px;
  color: var(--pulse-ai-dark);
  font-size: 22px;
  font-weight: 800;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 7px 18px rgba(0, 24, 43, .2);
}

.pulse-ai-logo {
  display: block;
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.pulse-ai-heading {
  position: relative;
  z-index: 1;
  min-width: 0;
  flex: 1;
}

.pulse-ai-brand {
  display: block;
  margin: 0 0 1px;
  color: var(--pulse-ai-primary);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 1.6px;
  line-height: 1.2;
}

.pulse-ai-title {
  margin: 0;
  color: #fff;
  font-size: 16px;
  font-weight: 750;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pulse-ai-status {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 4px 0 0;
  color: rgba(255, 255, 255, .76);
  font-size: 10.5px;
  line-height: 1.2;
}

.pulse-ai-status::before {
  content: "";
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #43dd99;
  box-shadow: 0 0 0 3px rgba(67, 221, 153, .15);
}

.pulse-ai-close {
  position: relative;
  z-index: 1;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 12px;
  color: #fff;
  background: rgba(255, 255, 255, .08);
  cursor: pointer;
  transition: background .18s ease, transform .18s ease;
}

.pulse-ai-close:hover,
.pulse-ai-close:focus-visible {
  background: rgba(255, 255, 255, .16);
  transform: rotate(4deg);
  outline: none;
}

.pulse-ai-close svg {
  width: 18px;
  height: 18px;
}

.pulse-ai-messages {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 19px 16px 13px;
  background:
    radial-gradient(circle at 100% 0, rgba(32, 196, 212, .08), transparent 29%),
    linear-gradient(180deg, #f3fafc 0%, #f8fcfd 26%, #fff 100%);
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 59, 100, .22) transparent;
}

.pulse-ai-messages::-webkit-scrollbar { width: 6px; }
.pulse-ai-messages::-webkit-scrollbar-track { background: transparent; }
.pulse-ai-messages::-webkit-scrollbar-thumb { border-radius: 99px; background: rgba(0, 59, 100, .2); }

.pulse-ai-row {
  display: flex;
  margin: 0 0 12px;
}

.pulse-ai-row.is-user { justify-content: flex-end; }

.pulse-ai-bubble {
  max-width: 88%;
  padding: 11px 13px;
  border: 1px solid rgba(0, 59, 100, .08);
  border-radius: 17px 17px 17px 6px;
  color: var(--pulse-ai-text);
  background: #fff;
  box-shadow: 0 6px 18px rgba(0, 59, 100, .065);
  overflow-wrap: anywhere;
  font-size: 13.5px;
  line-height: 1.65;
}

.pulse-ai-bubble p {
  margin: 0 0 8px;
}

.pulse-ai-bubble p:last-child { margin-bottom: 0; }

.pulse-ai-bubble strong {
  color: var(--pulse-ai-dark);
  font-weight: 750;
}

.pulse-ai-phone {
  display: inline-block;
  direction: ltr;
  unicode-bidi: isolate;
  white-space: nowrap;
}

.pulse-ai-bubble ul {
  margin: 4px 0 8px;
  padding-inline-start: 19px;
}

.pulse-ai-bubble ul:last-child { margin-bottom: 0; }
.pulse-ai-bubble li { margin: 2px 0; }

.pulse-ai-row.is-user .pulse-ai-bubble {
  color: #fff;
  border-color: transparent;
  border-radius: 17px 17px 6px 17px;
  background: linear-gradient(135deg, var(--pulse-ai-dark), var(--pulse-ai-deep));
  box-shadow: 0 7px 18px rgba(0, 59, 100, .18);
}

.pulse-ai-row.is-user .pulse-ai-bubble strong { color: #fff; }

.pulse-ai-bubble[dir="rtl"] {
  border-radius: 17px 17px 6px 17px;
  text-align: right;
}

.pulse-ai-row.is-user .pulse-ai-bubble[dir="rtl"] {
  border-radius: 17px 17px 17px 6px;
}

.pulse-ai-typing .pulse-ai-bubble {
  display: flex;
  align-items: center;
  gap: 4px;
  width: auto;
  min-width: 52px;
  min-height: 36px;
  padding: 11px 14px;
}

.pulse-ai-typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--pulse-ai-primary-strong);
  animation: pulseAiTyping 1.1s ease-in-out infinite;
}

.pulse-ai-typing span:nth-child(2) { animation-delay: .14s; }
.pulse-ai-typing span:nth-child(3) { animation-delay: .28s; }

@keyframes pulseAiTyping {
  0%, 60%, 100% { opacity: .35; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}

.pulse-ai-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 2px 0 15px;
}

.pulse-ai-suggestion {
  min-height: 32px;
  padding: 7px 11px;
  border: 1px solid rgba(8, 170, 189, .32);
  border-radius: 999px;
  color: var(--pulse-ai-dark);
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 3px 10px rgba(0, 59, 100, .045);
  cursor: pointer;
  font: inherit;
  font-size: 11.5px;
  font-weight: 650;
  line-height: 1.25;
  text-decoration: none;
  transition: color .18s ease, background .18s ease, border-color .18s ease, transform .18s ease;
}

.pulse-ai-suggestion:hover,
.pulse-ai-suggestion:focus-visible {
  color: #fff;
  border-color: var(--pulse-ai-primary-strong);
  background: linear-gradient(135deg, var(--pulse-ai-primary-strong), var(--pulse-ai-primary));
  transform: translateY(-1px);
  outline: none;
}

.pulse-ai-footer {
  padding: 11px 12px 12px;
  border-top: 1px solid rgba(0, 59, 100, .08);
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 -8px 24px rgba(0, 59, 100, .035);
}

.pulse-ai-form {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.pulse-ai-input {
  width: 100%;
  min-height: 44px;
  max-height: 100px;
  resize: none;
  padding: 11px 13px;
  border: 1px solid #d5e3e9;
  border-radius: 14px;
  outline: none;
  color: var(--pulse-ai-text);
  background: #fbfdfe;
  font: inherit;
  font-size: 13px;
  line-height: 1.45;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.pulse-ai-input::placeholder { color: #8a9aa6; }

.pulse-ai-input:focus {
  border-color: var(--pulse-ai-primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(32, 196, 212, .12);
}

.pulse-ai-send {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(145deg, var(--pulse-ai-primary), var(--pulse-ai-primary-strong));
  box-shadow: 0 7px 16px rgba(8, 170, 189, .24);
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease;
}

.pulse-ai-send:hover,
.pulse-ai-send:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 9px 20px rgba(8, 170, 189, .3);
  outline: none;
}

.pulse-ai-send:disabled {
  opacity: .5;
  cursor: wait;
  transform: none;
}

.pulse-ai-send svg {
  width: 19px;
  height: 19px;
}

.pulse-ai-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 9px;
  margin-top: 8px;
}

.pulse-ai-privacy {
  max-width: 64%;
  margin: 0;
  color: var(--pulse-ai-muted);
  font-size: 9px;
  line-height: 1.35;
}

.pulse-ai-whatsapp {
  color: #078b85;
  font-size: 10px;
  font-weight: 750;
  line-height: 1.25;
  text-decoration: none;
  white-space: nowrap;
}

.pulse-ai-whatsapp:hover { color: var(--pulse-ai-dark); }
.pulse-ai-root[dir="rtl"] .pulse-ai-send svg { transform: scaleX(-1); }

/* Isolate interactive controls from Elementor/theme-wide button styles. */
.pulse-ai-root button.pulse-ai-close {
  width: 36px !important;
  min-width: 36px !important;
  max-width: 36px !important;
  height: 36px !important;
  min-height: 36px !important;
  max-height: 36px !important;
  display: grid !important;
  place-items: center !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 36px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 1px solid rgba(255, 255, 255, .2) !important;
  border-radius: 12px !important;
  color: var(--pulse-ai-dark) !important;
  background: var(--pulse-ai-primary) !important;
  box-shadow: none !important;
  line-height: 0 !important;
  text-align: center !important;
  transform: none !important;
}

.pulse-ai-root button.pulse-ai-close:hover,
.pulse-ai-root button.pulse-ai-close:focus-visible {
  color: #fff !important;
  border-color: var(--pulse-ai-deep) !important;
  background: var(--pulse-ai-deep) !important;
  box-shadow: 0 7px 16px rgba(0, 43, 74, .24) !important;
  transform: none !important;
}

.pulse-ai-root button.pulse-ai-close svg {
  position: static !important;
  inset: auto !important;
  display: block !important;
  width: 18px !important;
  height: 18px !important;
  margin: 0 !important;
  padding: 0 !important;
  transform: none !important;
}

.pulse-ai-root button.pulse-ai-send {
  width: 44px !important;
  min-width: 44px !important;
  max-width: 44px !important;
  height: 44px !important;
  min-height: 44px !important;
  max-height: 44px !important;
  display: grid !important;
  place-items: center !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 44px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 14px !important;
  color: var(--pulse-ai-dark) !important;
  background: linear-gradient(145deg, var(--pulse-ai-primary), var(--pulse-ai-primary-strong)) !important;
  box-shadow: 0 7px 16px rgba(8, 170, 189, .24) !important;
  line-height: 0 !important;
  text-align: center !important;
}

.pulse-ai-root button.pulse-ai-send:hover,
.pulse-ai-root button.pulse-ai-send:focus-visible {
  color: #fff !important;
  background: linear-gradient(145deg, var(--pulse-ai-primary-strong), var(--pulse-ai-dark)) !important;
}

.pulse-ai-root button.pulse-ai-send svg {
  position: static !important;
  inset: auto !important;
  display: block !important;
  width: 19px !important;
  height: 19px !important;
  margin: 0 !important;
  padding: 0 !important;
}

.pulse-ai-root[dir="rtl"] button.pulse-ai-send svg {
  transform: scaleX(-1) !important;
}

.pulse-ai-root button.pulse-ai-suggestion {
  width: auto !important;
  min-width: 0 !important;
  max-width: 100% !important;
  height: auto !important;
  min-height: 32px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
  padding: 7px 11px !important;
  border: 1px solid rgba(8, 170, 189, .32) !important;
  border-radius: 999px !important;
  color: var(--pulse-ai-dark) !important;
  background: rgba(255, 255, 255, .96) !important;
  box-shadow: 0 3px 10px rgba(0, 59, 100, .045) !important;
  font: inherit !important;
  font-size: 11.5px !important;
  font-weight: 650 !important;
  line-height: 1.25 !important;
  text-transform: none !important;
  letter-spacing: normal !important;
}

.pulse-ai-root button.pulse-ai-suggestion:hover,
.pulse-ai-root button.pulse-ai-suggestion:focus-visible {
  color: #fff !important;
  border-color: var(--pulse-ai-primary-strong) !important;
  background: linear-gradient(135deg, var(--pulse-ai-primary-strong), var(--pulse-ai-primary)) !important;
}

.pulse-ai-root button.pulse-ai-launcher {
  width: 64px !important;
  min-width: 64px !important;
  max-width: 64px !important;
  height: 64px !important;
  min-height: 64px !important;
  max-height: 64px !important;
  display: grid !important;
  place-items: center !important;
  margin: 0 !important;
  padding: 0 !important;
}

@media (max-width: 520px) {
  .pulse-ai-root {
    right: 12px !important;
    left: auto !important;
    bottom: calc(13px + env(safe-area-inset-bottom));
    width: calc(100vw - 24px);
    align-items: flex-end;
  }

  .pulse-ai-panel {
    width: 100%;
    height: min(640px, calc(var(--pulse-ai-visual-height, 100dvh) - 96px));
    max-height: calc(var(--pulse-ai-visual-height, 100dvh) - 96px);
    border-radius: 21px;
  }

  .pulse-ai-root.has-mobile-keyboard {
    top: calc(var(--pulse-ai-visual-top, 0px) + 8px) !important;
    right: 8px !important;
    bottom: auto !important;
    width: calc(100vw - 16px);
  }

  .pulse-ai-root.has-mobile-keyboard .pulse-ai-panel {
    height: calc(var(--pulse-ai-visual-height, 100dvh) - 16px);
    max-height: calc(var(--pulse-ai-visual-height, 100dvh) - 16px);
    margin: 0;
    border-radius: 17px;
  }

  .pulse-ai-root.has-mobile-keyboard button.pulse-ai-launcher {
    display: none !important;
  }

  .pulse-ai-root.has-mobile-keyboard .pulse-ai-header {
    min-height: 64px;
    padding: 8px 10px;
    gap: 9px;
  }

  .pulse-ai-root.has-mobile-keyboard .pulse-ai-avatar {
    width: 44px;
    height: 44px;
    border-radius: 13px;
  }

  .pulse-ai-root.has-mobile-keyboard .pulse-ai-logo {
    width: 38px;
    height: 38px;
  }

  .pulse-ai-root.has-mobile-keyboard .pulse-ai-brand {
    font-size: 8px;
  }

  .pulse-ai-root.has-mobile-keyboard .pulse-ai-title {
    font-size: 14px;
  }

  .pulse-ai-root.has-mobile-keyboard .pulse-ai-status {
    margin-top: 2px;
    font-size: 9.5px;
  }

  .pulse-ai-root.has-mobile-keyboard .pulse-ai-messages {
    padding: 11px 11px 7px;
    scroll-padding-bottom: 8px;
  }

  .pulse-ai-root.has-mobile-keyboard .pulse-ai-row {
    margin-bottom: 8px;
  }

  .pulse-ai-root.has-mobile-keyboard .pulse-ai-bubble {
    padding: 8px 10px;
    font-size: 12px;
    line-height: 1.5;
  }

  .pulse-ai-root.has-mobile-keyboard .pulse-ai-suggestions {
    gap: 5px;
    margin-bottom: 8px;
  }

  .pulse-ai-root.has-mobile-keyboard .pulse-ai-footer {
    padding: 8px 9px calc(8px + env(safe-area-inset-bottom));
  }

  .pulse-ai-root.has-mobile-keyboard .pulse-ai-input {
    min-height: 42px;
    max-height: 72px;
    padding: 10px 11px;
    font-size: 12px;
  }

  .pulse-ai-root.has-mobile-keyboard .pulse-ai-meta {
    margin-top: 5px;
  }

  .pulse-ai-root.has-mobile-keyboard .pulse-ai-privacy {
    font-size: 8px;
  }

  .pulse-ai-root.has-mobile-keyboard .pulse-ai-whatsapp {
    font-size: 9px;
  }

  .pulse-ai-root button.pulse-ai-launcher {
    width: 58px !important;
    min-width: 58px !important;
    max-width: 58px !important;
    height: 58px !important;
    min-height: 58px !important;
    max-height: 58px !important;
  }

  .pulse-ai-header {
    min-height: 77px;
    padding: 11px 13px;
  }

  .pulse-ai-avatar {
    width: 50px;
    height: 50px;
    border-radius: 15px;
  }

  .pulse-ai-logo {
    width: 44px;
    height: 44px;
  }

  .pulse-ai-messages { padding: 16px 13px 10px; }
  .pulse-ai-bubble { max-width: 90%; font-size: 13px; }
}

@media (max-height: 660px) and (min-width: 521px) {
  .pulse-ai-panel { height: calc(100dvh - 100px); }
}

@media (prefers-reduced-motion: reduce) {
  .pulse-ai-root *,
  .pulse-ai-root *::before,
  .pulse-ai-root *::after {
    animation: none !important;
    transition: none !important;
  }
}


/* =========================================================
   Pulse AI Agent v1.4.0 — stable mirrored widget geometry
   ---------------------------------------------------------
   The launcher is the fixed anchor. The chat panel is
   absolutely positioned above it, so opening/closing the
   panel never moves the launcher.
   English anchors to the right; Arabic mirrors to the left.
   ========================================================= */

.pulse-ai-root {
  width: 64px !important;
  height: 64px !important;
  right: auto !important;
  left: auto !important;
  bottom: 24px !important;
  display: block !important;
  direction: ltr; /* geometry is independent of text direction */
}

.pulse-ai-root[data-position="right"] {
  right: 24px !important;
  left: auto !important;
}

.pulse-ai-root[data-position="left"] {
  left: 24px !important;
  right: auto !important;
}

.pulse-ai-panel {
  position: absolute !important;
  bottom: 78px !important;
  width: min(340px, calc(100vw - 48px)) !important;
  height: min(460px, calc(100dvh - 130px)) !important;
  max-height: 460px !important;
  margin: 0 !important;
  border-radius: 20px !important;
  direction: inherit;
}

.pulse-ai-root[data-position="right"] .pulse-ai-panel {
  right: 0 !important;
  left: auto !important;
}

.pulse-ai-root[data-position="left"] .pulse-ai-panel {
  left: 0 !important;
  right: auto !important;
}

.pulse-ai-root[dir="rtl"] .pulse-ai-panel {
  direction: rtl;
}

.pulse-ai-root[dir="ltr"] .pulse-ai-panel {
  direction: ltr;
}

.pulse-ai-root button.pulse-ai-launcher,
.pulse-ai-launcher {
  position: absolute !important;
  right: auto !important;
  left: auto !important;
  bottom: 0 !important;
  margin: 0 !important;
  transform-origin: center center;
}

.pulse-ai-root[data-position="right"] button.pulse-ai-launcher {
  right: 0 !important;
  left: auto !important;
}

.pulse-ai-root[data-position="left"] button.pulse-ai-launcher {
  left: 0 !important;
  right: auto !important;
}

/* Keep the launcher physically fixed while preserving a subtle hover effect. */
.pulse-ai-launcher:hover,
.pulse-ai-launcher:focus-visible {
  transform: scale(1.035) !important;
}

/* Compact desktop spacing to match the reduced panel size. */
.pulse-ai-header {
  min-height: 72px;
  padding: 10px 12px;
  gap: 10px;
}

.pulse-ai-avatar {
  width: 48px;
  height: 48px;
}

.pulse-ai-logo {
  width: 42px;
  height: 42px;
}

.pulse-ai-messages {
  padding-top: 14px;
}

@media (max-width: 520px) {
  .pulse-ai-root {
    width: 58px !important;
    height: 58px !important;
    bottom: calc(13px + env(safe-area-inset-bottom)) !important;
  }

  .pulse-ai-root[data-position="right"] {
    right: 12px !important;
    left: auto !important;
  }

  .pulse-ai-root[data-position="left"] {
    left: 12px !important;
    right: auto !important;
  }

  .pulse-ai-root button.pulse-ai-launcher {
    width: 58px !important;
    min-width: 58px !important;
    max-width: 58px !important;
    height: 58px !important;
    min-height: 58px !important;
    max-height: 58px !important;
  }

  .pulse-ai-panel {
    bottom: 70px !important;
    width: calc(100vw - 24px) !important;
    height: min(500px, calc(var(--pulse-ai-visual-height, 100dvh) - 96px)) !important;
    max-height: calc(var(--pulse-ai-visual-height, 100dvh) - 96px) !important;
    border-radius: 18px !important;
  }

  /* When the mobile keyboard is open, the panel may use the full visual viewport,
     but the launcher stays hidden so there is no jump or overlap. */
  .pulse-ai-root.has-mobile-keyboard {
    top: calc(var(--pulse-ai-visual-top, 0px) + 8px) !important;
    bottom: auto !important;
    width: calc(100vw - 16px) !important;
    height: calc(var(--pulse-ai-visual-height, 100dvh) - 16px) !important;
  }

  .pulse-ai-root.has-mobile-keyboard[data-position="right"] {
    right: 8px !important;
    left: auto !important;
  }

  .pulse-ai-root.has-mobile-keyboard[data-position="left"] {
    left: 8px !important;
    right: auto !important;
  }

  .pulse-ai-root.has-mobile-keyboard .pulse-ai-panel {
    top: 0 !important;
    bottom: auto !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    margin: 0 !important;
  }
}
