:root {
  --hm-text-primary: #3a4249;
  --hm-text-brand: #773232;
  --hm-bg-sand: #f4e8e0;
  --hm-bg-cream: #fff8f8;
  --hm-bg-peach: #f6d6cf;
  --hm-bg-butter: #e9e0cc;
  --hm-cta-coral: #f49898;
  --hm-highlight-blue: #87a1b2;
  --hm-mint: #d1e1d7;
  --hm-accent-magenta: #ff4363;
  --hm-border: #d0d5dd;
  --hm-shadow: 0 8px 30px rgb(0 0 0 / 0.06);
  --hm-fab-green: #25d366;
  --hm-font-headline: 'ITC Souvenir Demi Regular', sans-serif;
  --hm-font-body: 'Euclid Circular B Regular', sans-serif;
}

/* Tipografía: solo fuentes de marca en todo el chat */
.hm-chat-bubble-root,
.hm-chat-full-wrap,
.hm-chat-bubble-root .hm-chat-shell,
.hm-chat-full-wrap .hm-chat-shell {
  font-family: var(--hm-font-body);
}

.hm-chat-bubble-root *,
.hm-chat-full-wrap * {
  font-family: var(--hm-font-body);
}

.hm-chat-bubble-root .hm-chat-header__title,
.hm-chat-full-wrap .hm-chat-header__title {
  font-family: var(--hm-font-headline);
  font-weight: 400;
}

/*
 * Modo full: position fixed pegado al viewport exacto.
 * Funciona aunque el tema tenga márgenes o el teclado móvil cambie el viewport.
 * El header y el compositor siempre quedan visibles.
 */
.hm-chat-full-wrap {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
  background: transparent;
  margin: 0 !important;
  padding: 0 !important;
  z-index: 1;
}

/* Con sesión de admin: la barra #wpadminbar tapa el header si usamos inset: 0 */
body.admin-bar .hm-chat-full-wrap {
  top: 32px !important;
  height: calc(100% - 32px) !important;
  max-height: calc(100% - 32px) !important;
}

@media screen and (max-width: 782px) {
  body.admin-bar .hm-chat-full-wrap {
    top: 46px !important;
    height: calc(100% - 46px) !important;
    max-height: calc(100% - 46px) !important;
  }
}

.hm-chat-full-wrap > .hm-chat-shell.hm-chat-shell--full {
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* El hilo se encoge para dejar espacio al header y al composer — nunca empuja al header */
.hm-chat-shell--full .hm-chat-header,
.hm-chat-shell--full .hm-chat-composer {
  flex-shrink: 0;
  flex-grow: 0;
}

.hm-chat-shell--full .hm-chat-header {
  flex-shrink: 0;
}

.hm-chat-shell--full .hm-chat-thread-area {
  flex: 1 1 auto;
  min-height: 0;
}

.hm-chat-shell--full .hm-chat-thread {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
}

.hm-chat-shell--full .hm-chat-composer {
  flex-shrink: 0;
}

/* Elementor: el full-wrap ocupa toda la ventana, anulamos todos los contenedores intermedios */
.e-con:has(.hm-chat-full-wrap),
.e-con:has(.hm-chat-full-wrap) > .e-con-inner,
.e-con .elementor-element:has(.hm-chat-full-wrap),
.e-con .elementor-element.elementor-widget-shortcode:has(.hm-chat-full-wrap),
.e-con .elementor-element:has(.hm-chat-full-wrap) > .elementor-widget-container,
.elementor-widget-wrap:has(.hm-chat-full-wrap),
.elementor-section:has(.hm-chat-full-wrap),
.elementor-section:has(.hm-chat-full-wrap) > .elementor-container,
.elementor-column:has(.hm-chat-full-wrap),
.elementor-column:has(.hm-chat-full-wrap) > .elementor-widget-wrap {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 1 auto !important;
  align-items: stretch !important;
  align-self: stretch !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  height: 100% !important;
  min-height: 0 !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

.hm-chat-shell {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--hm-border);
  box-shadow: var(--hm-shadow);
  font-family: var(--hm-font-body);
  color: var(--hm-text-primary);
}

.hm-chat-full-wrap > .hm-chat-shell.hm-chat-shell--full,
.hm-chat-shell--full {
  border-radius: 0;
  border: none;
  box-shadow: none;
  position: relative;
}

.hm-chat-full-wrap {
  --hm-restart-top: 4.75rem;
  --hm-restart-right: 1rem;
}

body.admin-bar .hm-chat-full-wrap {
  --hm-restart-top: calc(32px + 4.75rem);
}

@media screen and (max-width: 782px) {
  body.admin-bar .hm-chat-full-wrap {
    --hm-restart-top: calc(46px + 4.75rem);
  }
}

.hm-chat-shell--compact {
  width: min(400px, calc(100vw - 24px));
  height: 100%;
  max-height: none;
  border-radius: 1.5rem;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.hm-chat-panel-wrap .hm-chat-shell--compact {
  height: 100%;
  max-height: 100%;
}

.hm-chat-shell--compact .hm-chat-thread {
  flex: 1;
  min-height: 0;
}

.hm-chat-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--hm-bg-sand);
  border-bottom: 1px solid rgba(209, 183, 175, 0.4);
  flex-shrink: 0;
  box-sizing: border-box;
}

/* Reset global: ningún hijo del header hereda márgenes del navegador */
.hm-chat-header *,
.hm-chat-header *::before,
.hm-chat-header *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Header mejorado modo full */
.hm-chat-header--full {
  padding: 1rem 2rem;
  background: linear-gradient(135deg, #fff8f5 0%, var(--hm-bg-sand) 55%, #f0e4dc 100%);
  border-bottom: 1px solid rgba(209, 183, 175, 0.5);
  position: relative;
}

@media (max-width: 767px) {
  .hm-chat-header--full {
    padding: 0.6rem 0.875rem;
    gap: 0.6rem;
  }

  /* Avatar más compacto en móvil */
  .hm-chat-header--full .hm-chat-header__avatar {
    width: 38px;
    height: 38px;
  }

  /* Punto online reposicionado al avatar más pequeño */
  .hm-chat-header__online {
    width: 10px;
    height: 10px;
    bottom: 1px;
    right: 1px;
  }

  /* Textos ligeramente más pequeños */
  .hm-chat-header__title {
    font-size: 1rem;
  }

  .hm-chat-header__subtitle {
    font-size: 0.72rem;
  }

  /* Logo más reducido pero visible */
  .hm-chat-header__logo {
    width: 80px;
  }

  .hm-chat-full-wrap {
    --hm-restart-right: 0.75rem;
  }

  .hm-chat-shell--compact {
    --hm-restart-top: 3.25rem;
    --hm-restart-right: 0.5rem;
  }

  .hm-chat-thread,
  .hm-chat-shell--full .hm-chat-thread {
    padding: 1rem;
    padding-top: 2.5rem;
  }

  body .hm-chat-full-wrap > .hm-chat-shell.hm-chat-shell--full > button.hm-chat-restart,
  body .hm-chat-bubble-root .hm-chat-shell.hm-chat-shell--compact > button.hm-chat-restart {
    font-size: 0.6875rem !important;
    padding: 0.35rem 0.6rem !important;
  }

  .hm-chat-msg {
    max-width: 90%;
  }

  .hm-chat-shell--full .hm-chat-msg--bot,
  .hm-chat-shell--full .hm-chat-msg--user {
    max-width: 90%;
  }

  .hm-chat-msg__bubble {
    font-size: 0.9375rem;
  }
}

.hm-chat-header--full::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 2rem;
  right: 2rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(119,50,50,0.15), transparent);
}

.hm-chat-shell--compact .hm-chat-header {
  padding: 0.75rem 1rem;
}

/* Avatar */

.hm-chat-header__avatar {
  width: 48px;
  height: 48px;
  border-radius: 50% !important;
  object-fit: cover;
  display: block;
  border: 2px solid rgba(255,255,255,0.9);
  box-shadow: 0 2px 8px rgb(0 0 0 / 0.12);
}

.hm-chat-header--full .hm-chat-header__avatar {
  width: 52px;
  height: 52px;
}

.hm-chat-header__online {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 12px;
  height: 12px;
  background: #22c55e;
  border-radius: 50%;
  border: 2px solid #fff8f5;
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.3);
  animation: hm-pulse-online 2.5s infinite;
}

@keyframes hm-pulse-online {
  0%, 100% { box-shadow: 0 0 0 1px rgba(34,197,94,0.3); }
  50%       { box-shadow: 0 0 0 4px rgba(34,197,94,0.12); }
}

.hm-chat-header__avatar-wrap {
  flex-shrink: 0;
  position: relative;
  align-self: center;
}

.hm-chat-header__avatar-btn {
  position: relative;
  display: block;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  border-radius: 50%;
  cursor: pointer;
  line-height: 0;
}

.hm-chat-header__avatar-btn:focus-visible {
  outline: 2px solid #773232;
  outline-offset: 3px;
}

.hm-chat-header__avatar-btn .hm-chat-header__online {
  pointer-events: none;
}

/* Modal avatar Clara */
.hm-chat-avatar-modal {
  position: fixed;
  inset: 0;
  z-index: 10000010;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  box-sizing: border-box;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}

.hm-chat-avatar-modal[hidden] {
  display: none !important;
}

.hm-chat-avatar-modal.is-open {
  pointer-events: auto;
  opacity: 1;
  visibility: visible;
}

.hm-chat-avatar-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgb(52 66 73 / 0.45);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.hm-chat-avatar-modal.is-open .hm-chat-avatar-modal__backdrop {
  opacity: 1;
}

.hm-chat-avatar-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 320px);
  margin: 0;
  padding: 1.25rem 1.25rem 1.5rem;
  border: 1px solid rgb(119 50 50 / 0.12);
  border-radius: 28px;
  background: linear-gradient(180deg, #fff 0%, #fdf8f6 100%);
  box-shadow: 0 20px 48px rgb(52 66 73 / 0.22);
  text-align: center;
  transform: scale(0.88) translateY(12px);
  opacity: 0;
  transition:
    transform 0.38s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.32s ease;
}

.hm-chat-avatar-modal.is-open .hm-chat-avatar-modal__dialog {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.hm-chat-avatar-modal__close {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgb(244 232 224 / 0.9);
  color: #773232;
  cursor: pointer;
  transition: background 0.18s ease;
}

.hm-chat-avatar-modal__close:hover {
  background: #f4e8e0;
}

.hm-chat-avatar-modal__media {
  margin: 0 auto 1rem;
  padding: 4px;
  border-radius: 50%;
  background: linear-gradient(145deg, #f5d6cf 0%, #fff 55%, #f4e8e0 100%);
  box-shadow: 0 8px 24px rgb(119 50 50 / 0.12);
  animation: hm-avatar-modal-pop 0.45s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both;
}

.hm-chat-avatar-modal.is-open .hm-chat-avatar-modal__media {
  animation: hm-avatar-modal-pop 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.08s both;
}

@keyframes hm-avatar-modal-pop {
  0% {
    transform: scale(0.92);
    opacity: 0.6;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.hm-chat-avatar-modal__img {
  display: block;
  width: min(72vw, 260px);
  height: min(72vw, 260px);
  max-width: 260px;
  max-height: 260px;
  margin: 0 auto;
  border-radius: 50% !important;
  object-fit: cover;
  border: none;
}

.hm-chat-avatar-modal__toast {
  margin: 0;
  padding: 0.75rem 0.85rem;
  border-radius: 16px;
  background: #f4e8e0;
  font-family: var(--hm-font-body);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.45;
  color: #344249;
  text-align: center;
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 0.35s ease 0.15s,
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1) 0.15s;
}

.hm-chat-avatar-modal.is-open .hm-chat-avatar-modal__toast {
  opacity: 1;
  transform: translateY(0);
}

body.hm-chat-avatar-modal-open {
  overflow: hidden;
}

.hm-chat-header__text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  min-width: 0;
  flex: 1 1 auto;
  align-self: center;
}

.hm-chat-header__title {
  margin: 0 !important;
  padding: 0 !important;
  font-family: var(--hm-font-headline);
  font-size: 1.125rem;
  font-weight: 400;
  color: var(--hm-text-brand);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hm-chat-header--full .hm-chat-header__title {
  font-size: 1.2rem;
}

.hm-chat-header__subtitle {
  margin: 0 !important;
  padding: 0 !important;
  font-size: 0.78rem;
  color: #22c55e;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1;
}

.hm-chat-header__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
  align-self: center;
  margin-left: auto;
}

.hm-chat-header__logo-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  opacity: 0.88;
  transition: opacity 0.15s;
  flex-shrink: 0;
  line-height: 0;
}

.hm-chat-header__logo-link:hover {
  opacity: 1;
}

.hm-chat-header__logo {
  display: block;
  width: 145px;
  height: auto;
  object-fit: contain;
  vertical-align: middle;
}

/* Red de seguridad: nunca mostrar el botón de cierre en el modo full */
.hm-chat-shell--full [data-hm-close] {
  display: none !important;
}

.hm-chat-icon-btn {
  border: none;
  background: transparent;
  color: #544342;
  border-radius: 9999px;
  padding: 0.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hm-chat-icon-btn:hover {
  background: #edf4fd;
  color: var(--hm-text-brand);
}

.hm-chat-thread-area {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Toast fijo arriba a la derecha del área de mensajes (no scrollea con el hilo) */
.hm-chat-shell > .hm-chat-restart {
  position: absolute;
  top: var(--hm-restart-top, 4.75rem);
  right: var(--hm-restart-right, 1rem);
  left: auto;
  bottom: auto;
  z-index: 100;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  padding: 0.4rem 0.75rem;
  border: none;
  border-radius: 9999px;
  background: #773232;
  color: #fff;
  font-family: var(--hm-font-body);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  pointer-events: auto;
  box-shadow: 0 4px 14px rgb(119 50 50 / 0.32);
  transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
}

.hm-chat-shell--compact {
  --hm-restart-top: 3.5rem;
  --hm-restart-right: 0.65rem;
}

.hm-chat-shell > .hm-chat-restart:hover:not(:disabled) {
  background: #5f2828;
  box-shadow: 0 5px 16px rgb(119 50 50 / 0.38);
}

.hm-chat-shell > .hm-chat-restart:active:not(:disabled) {
  transform: scale(0.97);
}

.hm-chat-shell > .hm-chat-restart:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.hm-chat-restart__icon {
  flex-shrink: 0;
}

.hm-chat-restart__label {
  white-space: nowrap;
}

.hm-chat-thread {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 1.5rem;
  padding-top: 2.75rem;
  background: var(--hm-bg-cream);
  scrollbar-width: none;
}

.hm-chat-shell--full .hm-chat-thread {
  padding: 3.25rem 2.5rem 1.5rem;
  background: var(--hm-bg-cream);
}

.hm-chat-thread::-webkit-scrollbar {
  display: none;
}

.hm-chat-shell--compact .hm-chat-thread {
  padding: 1rem;
}

.hm-chat-date-pill {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
}

.hm-chat-date-pill span {
  background: #e7eff8;
  color: #544342;
  font-family: var(--hm-font-body);
  font-size: 0.75rem;
  font-weight: 400;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
}

.hm-chat-msg {
  display: flex;
  gap: 0.75rem;
  max-width: 85%;
  min-width: 0;
  margin-bottom: 1rem;
  animation: hm-fade-up 0.35s ease-out forwards;
}

.hm-chat-msg--user {
  margin-left: auto;
  flex-direction: row-reverse;
}

.hm-chat-msg--bot {
  max-width: 88%;
}

.hm-chat-shell--full .hm-chat-msg--bot {
  max-width: 80%;
}

.hm-chat-shell--full .hm-chat-msg--user {
  max-width: 72%;
}

.hm-chat-msg__bubble {
  border-radius: 1.25rem;
  padding: 0.875rem 1.125rem;
  font-family: var(--hm-font-body);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.55;
  overflow-wrap: break-word;
  word-break: break-word;
  min-width: 0;
}

.hm-chat-msg--user .hm-chat-msg__bubble {
  background: linear-gradient(135deg, #f5a0a0 0%, var(--hm-cta-coral) 100%);
  color: #fff;
  border-bottom-right-radius: 0.35rem;
  box-shadow: 0 2px 10px rgb(244 152 152 / 0.35);
}

.hm-chat-msg--bot .hm-chat-msg__bubble {
  background: #fff;
  border: 1px solid rgba(209, 219, 230, 0.7);
  border-bottom-left-radius: 0.35rem;
  color: var(--hm-text-primary);
  box-shadow: 0 1px 6px rgb(0 0 0 / 0.05);
}

.hm-chat-msg__time {
  font-size: 0.75rem;
  color: #544342;
  margin-top: 0.25rem;
}

.hm-chat-msg--user .hm-chat-msg__time {
  text-align: right;
}

.hm-chat-msg__bubble p,
.hm-chat-msg__content p {
  margin: 0;
}

.hm-chat-msg__content p + p {
  margin-top: 0.5rem;
}

.hm-chat-msg--user .hm-chat-msg__bubble p:last-child {
  margin-bottom: 0;
}

.hm-chat-msg__content ul {
  margin: 0.25rem 0;
  padding-left: 1.25rem;
}

.hm-chat-msg__content a.hm-chat-link,
.hm-chat-msg__bubble a.hm-chat-link {
  color: var(--hm-text-brand);
  text-decoration: underline;
  text-underline-offset: 2px;
  word-break: break-all;
}

.hm-chat-msg--user .hm-chat-msg__content a.hm-chat-link,
.hm-chat-msg--user .hm-chat-msg__bubble a.hm-chat-link {
  color: #fff;
}

.hm-chat-msg__content a.hm-chat-link:hover,
.hm-chat-msg__bubble a.hm-chat-link:hover {
  opacity: 0.85;
}

.hm-chat-msg__content strong {
  font-family: var(--hm-font-body);
  font-weight: 400;
  color: var(--hm-text-brand);
}

.hm-chat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1rem 2.75rem;
}

.hm-chat-chip {
  border: none;
  border-radius: 9999px;
  padding: 0.5rem 1rem;
  font-family: var(--hm-font-body);
  font-size: 0.75rem;
  font-weight: 400;
  cursor: pointer;
  transition: transform 0.15s;
}

.hm-chat-chip--peach {
  background: var(--hm-bg-peach);
  color: #763131;
}

.hm-chat-chip--mint {
  background: var(--hm-mint);
  color: var(--hm-text-primary);
}

.hm-chat-chip--surface {
  background: #e7eff8;
  color: var(--hm-text-primary);
}

.hm-chat-chip:hover {
  transform: scale(1.02);
}

.hm-chat-composer {
  flex-shrink: 0;
  border-top: 1px solid rgba(209, 219, 230, 0.6);
  background: #fff;
  padding: 1rem;
}

.hm-chat-shell--full .hm-chat-composer {
  padding: 1.125rem 2.5rem 1.25rem;
  background: linear-gradient(180deg, #fff 0%, #fdf8f6 100%);
  border-top: 1px solid rgba(209, 183, 175, 0.35);
}

.hm-chat-shell--compact .hm-chat-composer {
  padding: 0.75rem;
}

.hm-chat-form {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  border: 1.5px solid rgba(220, 210, 206, 0.7);
  background: #fdf9f7;
  border-radius: 1.25rem;
  padding: 0.5rem 0.5rem 0.5rem 0.75rem;
  transition: border-color 0.18s, box-shadow 0.18s;
}

.hm-chat-shell--full .hm-chat-form {
  border-radius: 1.5rem;
  background: #fff;
  border-color: rgba(209, 183, 175, 0.6);
  box-shadow: 0 2px 12px rgb(0 0 0 / 0.04);
}

.hm-chat-form:focus-within {
  border-color: rgba(244, 152, 152, 0.65);
  box-shadow: 0 0 0 3px rgb(244 152 152 / 0.12);
}

.hm-chat-form textarea {
  flex: 1;
  border: none;
  background: transparent;
  resize: none;
  min-height: 44px;
  max-height: 128px;
  padding: 0.6rem 0.25rem;
  font-family: var(--hm-font-body);
  font-size: 1rem;
  color: var(--hm-text-primary);
  outline: none;
  line-height: 1.5;
}

.hm-chat-form textarea::placeholder {
  color: #b8a8a4;
}

.hm-chat-send {
  flex-shrink: 0;
  border: none;
  border-radius: 1rem;
  background: var(--hm-cta-coral);
  color: #fff;
  padding: 0.6rem 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.18s, transform 0.12s, box-shadow 0.18s;
  box-shadow: 0 2px 8px rgb(244 152 152 / 0.4);
}

.hm-chat-shell--full .hm-chat-send {
  border-radius: 1.125rem;
  padding: 0.65rem 0.9rem;
  background: linear-gradient(135deg, #f5a0a0 0%, var(--hm-cta-coral) 60%, #ee7f7f 100%);
  box-shadow: 0 3px 12px rgb(244 152 152 / 0.45);
}

.hm-chat-send:hover:not(:disabled) {
  background: #ee7f7f;
  transform: scale(1.05);
  box-shadow: 0 4px 14px rgb(244 152 152 / 0.5);
}

.hm-chat-send:active:not(:disabled) {
  transform: scale(0.97);
}

.hm-chat-send:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none;
}

.hm-chat-composer--ended .hm-chat-composer__active {
  display: none;
}

.hm-chat-composer__closed {
  padding: 4px 0 0;
  text-align: center;
}

.hm-chat-closure-text {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.5;
  color: #3b424a;
}

.hm-chat-new-consultation {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 22px;
  border: none;
  border-radius: 999px;
  background: #773232;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.hm-chat-new-consultation:hover {
  background: #5f2828;
}

.hm-chat-disclaimer-wrap {
  margin: 0;
  padding: 0;
  text-align: center;
  font-family: var(--hm-font-body);
  font-size: 10px;
  font-weight: 400;
  line-height: 1.45;
  color: rgb(84 67 66 / 0.65);
}

.hm-chat-disclaimer {
  margin: 0;
  padding: 0;
  text-align: center;
  font-family: var(--hm-font-body);
  font-size: 10px;
  font-weight: 400;
  line-height: 1.45;
  color: rgb(84 67 66 / 0.65);
}

.hm-chat-disclaimer__primary {
  display: block;
  margin: 0;
  padding: 0;
}

.hm-chat-disclaimer__primary [data-hm-disclaimer-ai],
.hm-chat-disclaimer__primary [data-hm-disclaimer-accept] {
  display: inline;
}

.hm-chat-disclaimer__extended {
  display: block;
  margin: 0;
  padding: 0;
}

.hm-chat-disclaimer__extended[hidden] {
  display: none !important;
}

.hm-chat-disclaimer__link {
  color: #773232 !important;
  text-decoration: underline !important;
  text-underline-offset: 2px;
  background: none !important;
}

.hm-chat-disclaimer__link:hover {
  color: #5f2828 !important;
}

.hm-chat-disclaimer__toggle {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: none !important;
  background-color: transparent !important;
  font-family: var(--hm-font-body);
  font-size: 10px;
  font-weight: 400;
  line-height: inherit;
  color: #773232 !important;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  vertical-align: baseline;
}

.hm-chat-disclaimer__toggle:hover,
.hm-chat-disclaimer__toggle:focus {
  color: #773232 !important;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
}

.hm-chat-disclaimer__toggle:focus-visible {
  outline: 1px solid #773232;
  outline-offset: 2px;
}

.hm-chat-typing {
  display: flex;
  max-width: 92%;
  margin-bottom: 1rem;
}

.hm-dot-pulse {
  position: relative;
  left: -9999px;
  width: 8px;
  height: 8px;
  border-radius: 5px;
  background: var(--hm-text-brand);
  box-shadow: 9999px 0 0 -5px var(--hm-text-brand);
  animation: hm-dot-pulse 1.5s infinite linear;
  animation-delay: 0.25s;
}

.hm-dot-pulse::before,
.hm-dot-pulse::after {
  content: '';
  position: absolute;
  top: 0;
  width: 8px;
  height: 8px;
  border-radius: 5px;
  background: var(--hm-text-brand);
}

.hm-dot-pulse::before {
  box-shadow: 9984px 0 0 -5px var(--hm-text-brand);
  animation: hm-dot-before 1.5s infinite linear;
}

.hm-dot-pulse::after {
  box-shadow: 10014px 0 0 -5px var(--hm-text-brand);
  animation: hm-dot-after 1.5s infinite linear;
  animation-delay: 0.5s;
}

@keyframes hm-fade-up {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes hm-scale-in {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(16px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes hm-dot-pulse {
  0% {
    box-shadow: 9999px 0 0 -5px var(--hm-text-brand);
  }
  30% {
    box-shadow: 9999px 0 0 2px var(--hm-text-brand);
  }
  60%,
  100% {
    box-shadow: 9999px 0 0 -5px var(--hm-text-brand);
  }
}

@keyframes hm-dot-before {
  0% {
    box-shadow: 9984px 0 0 -5px var(--hm-text-brand);
  }
  30% {
    box-shadow: 9984px 0 0 2px var(--hm-text-brand);
  }
  60%,
  100% {
    box-shadow: 9984px 0 0 -5px var(--hm-text-brand);
  }
}

@keyframes hm-dot-after {
  0% {
    box-shadow: 10014px 0 0 -5px var(--hm-text-brand);
  }
  30% {
    box-shadow: 10014px 0 0 2px var(--hm-text-brand);
  }
  60%,
  100% {
    box-shadow: 10014px 0 0 -5px var(--hm-text-brand);
  }
}

/* Bubble / FAB — fixed al viewport, z-index por encima de Elementor */
.hm-chat-bubble-root {
  --hm-bubble-bottom: 90px;
  --hm-bubble-left: 24px;
  --hm-fab-size: 45px;
  --hm-fab-gap: 12px;
  position: fixed;
  z-index: 9999990;
  bottom: 0;
  left: 0;
  width: 0;
  height: 0;
  overflow: visible;
  pointer-events: none;
}

.hm-chat-overlay {
  position: fixed;
  inset: 0;
  background: rgb(58 66 73 / 0.45);
  z-index: 9999998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s;
  pointer-events: none;
}

.hm-chat-overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.hm-chat-panel-wrap {
  position: fixed;
  z-index: 9999999;
  pointer-events: auto;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.32s cubic-bezier(0.16, 1, 0.3, 1), transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.32s;
}

@media (min-width: 768px) {
  .hm-chat-panel-wrap {
    top: 50%;
    bottom: auto;
    left: var(--hm-bubble-left, 24px);
    right: auto;
    width: auto;
    height: var(--hm-panel-height, 95vh);
    max-height: var(--hm-panel-height, 95vh);
    transform-origin: center left;
    transform: translateY(-50%) scale(0.96);
  }

  .hm-chat-panel-wrap.is-open {
    visibility: visible;
    opacity: 1;
    transform: translateY(-50%) scale(1);
  }

  .hm-chat-panel-wrap .hm-chat-shell--compact {
    height: 100%;
    max-height: 100%;
    min-height: 0;
  }
}

.hm-chat-panel-wrap.is-open {
  visibility: visible;
  opacity: 1;
}

.hm-chat-fab {
  position: fixed;
  bottom: var(--hm-bubble-bottom);
  left: var(--hm-bubble-left);
  z-index: 9999997;
  width: var(--hm-fab-size);
  height: var(--hm-fab-size);
  border-radius: 50%;
  border: none;
  outline: none;
  background-color: #25d366;
  background-image: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  pointer-events: auto;
  box-shadow: 0 4px 14px rgb(0 0 0 / 0.18);
  transition: transform 0.2s, box-shadow 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.hm-chat-fab:hover {
  transform: scale(1.05);
  background-color: #20bd5a;
}

.hm-chat-fab__icon--wa {
  display: block;
  color: #fff;
  fill: #fff;
  flex-shrink: 0;
}

@media (max-width: 767px) {
  .hm-chat-panel-wrap {
    top: 50%;
    left: 12px;
    right: 12px;
    bottom: auto;
    width: auto;
    transform-origin: center center;
    transform: translateY(-50%) scale(0.96);
  }

  .hm-chat-panel-wrap.is-open {
    transform: translateY(-50%) scale(1);
  }

  .hm-chat-panel-wrap .hm-chat-shell--compact {
    width: 100%;
    height: min(95dvh, calc(100dvh - 24px));
    max-height: min(95dvh, calc(100dvh - 24px));
  }
}

@media (prefers-reduced-motion: reduce) {
  .hm-chat-msg,
  .hm-chat-panel-wrap,
  .hm-chat-fab {
    animation: none !important;
    transition: none !important;
  }
}

/*
 * Mayor especificidad que Elementor Site Settings:
 * .elementor-kit-6 button, .elementor-kit-6 input[type="button"], etc.
 */
body[class*='elementor-kit'] .hm-chat-bubble-root,
body[class*='elementor-kit'] .hm-chat-full-wrap,
body .hm-chat-bubble-root,
body .hm-chat-full-wrap {
  font-family: var(--hm-font-body);
  color: var(--hm-text-primary);
  box-sizing: border-box;
}

body[class*='elementor-kit'] .hm-chat-bubble-root *,
body[class*='elementor-kit'] .hm-chat-full-wrap *,
body .hm-chat-bubble-root *,
body .hm-chat-full-wrap * {
  box-sizing: border-box;
  font-family: var(--hm-font-body) !important;
  font-weight: 400 !important;
}

body[class*='elementor-kit'] .hm-chat-bubble-root .hm-chat-header__title,
body[class*='elementor-kit'] .hm-chat-full-wrap .hm-chat-header__title,
body .hm-chat-bubble-root .hm-chat-header__title,
body .hm-chat-full-wrap .hm-chat-header__title {
  font-family: var(--hm-font-headline) !important;
  font-weight: 400 !important;
}

body[class*='elementor-kit'] .hm-chat-bubble-root .hm-chat-msg__bubble,
body[class*='elementor-kit'] .hm-chat-full-wrap .hm-chat-msg__bubble,
body[class*='elementor-kit'] .hm-chat-bubble-root .hm-chat-disclaimer,
body[class*='elementor-kit'] .hm-chat-full-wrap .hm-chat-disclaimer,
body[class*='elementor-kit'] .hm-chat-bubble-root .hm-chat-disclaimer-wrap,
body[class*='elementor-kit'] .hm-chat-full-wrap .hm-chat-disclaimer-wrap,
body[class*='elementor-kit'] .hm-chat-bubble-root .hm-chat-disclaimer__toggle,
body[class*='elementor-kit'] .hm-chat-full-wrap .hm-chat-disclaimer__toggle,
body[class*='elementor-kit'] .hm-chat-bubble-root .hm-chat-date-pill span,
body[class*='elementor-kit'] .hm-chat-full-wrap .hm-chat-date-pill span,
body .hm-chat-bubble-root .hm-chat-msg__bubble,
body .hm-chat-full-wrap .hm-chat-msg__bubble,
body .hm-chat-bubble-root .hm-chat-disclaimer,
body .hm-chat-full-wrap .hm-chat-disclaimer,
body .hm-chat-bubble-root .hm-chat-disclaimer-wrap,
body .hm-chat-full-wrap .hm-chat-disclaimer-wrap,
body .hm-chat-bubble-root .hm-chat-disclaimer__toggle,
body .hm-chat-full-wrap .hm-chat-disclaimer__toggle,
body .hm-chat-bubble-root .hm-chat-date-pill span,
body .hm-chat-full-wrap .hm-chat-date-pill span {
  font-family: var(--hm-font-body) !important;
  font-weight: 400 !important;
}

body[class*='elementor-kit'] .hm-chat-bubble-root .hm-chat-disclaimer-wrap,
body[class*='elementor-kit'] .hm-chat-full-wrap .hm-chat-disclaimer-wrap,
body[class*='elementor-kit'] .hm-chat-bubble-root .hm-chat-disclaimer,
body[class*='elementor-kit'] .hm-chat-full-wrap .hm-chat-disclaimer,
body[class*='elementor-kit'] .hm-chat-bubble-root .hm-chat-disclaimer__primary,
body[class*='elementor-kit'] .hm-chat-full-wrap .hm-chat-disclaimer__primary,
body[class*='elementor-kit'] .hm-chat-bubble-root .hm-chat-disclaimer__extended,
body[class*='elementor-kit'] .hm-chat-full-wrap .hm-chat-disclaimer__extended,
body .hm-chat-bubble-root .hm-chat-disclaimer-wrap,
body .hm-chat-full-wrap .hm-chat-disclaimer-wrap,
body .hm-chat-bubble-root .hm-chat-disclaimer,
body .hm-chat-full-wrap .hm-chat-disclaimer,
body .hm-chat-bubble-root .hm-chat-disclaimer__primary,
body .hm-chat-full-wrap .hm-chat-disclaimer__primary,
body .hm-chat-bubble-root .hm-chat-disclaimer__extended,
body .hm-chat-full-wrap .hm-chat-disclaimer__extended {
  margin: 0 !important;
  margin-block: 0 !important;
  margin-inline: 0 !important;
  padding: 0 !important;
}

body[class*='elementor-kit'] .hm-chat-bubble-root .hm-chat-disclaimer__toggle,
body[class*='elementor-kit'] .hm-chat-full-wrap .hm-chat-disclaimer__toggle,
body .hm-chat-bubble-root .hm-chat-disclaimer__toggle,
body .hm-chat-full-wrap .hm-chat-disclaimer__toggle {
  display: block !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  background: none !important;
  background-color: transparent !important;
  box-shadow: none !important;
  color: #773232 !important;
}

body[class*='elementor-kit'] .hm-chat-bubble-root .hm-chat-disclaimer__link,
body[class*='elementor-kit'] .hm-chat-full-wrap .hm-chat-disclaimer__link,
body .hm-chat-bubble-root .hm-chat-disclaimer__link,
body .hm-chat-full-wrap .hm-chat-disclaimer__link {
  color: #773232 !important;
  background: none !important;
  text-decoration: underline !important;
}

body[class*='elementor-kit'] .hm-chat-bubble-root .hm-chat-msg__bubble p,
body[class*='elementor-kit'] .hm-chat-full-wrap .hm-chat-msg__bubble p,
body .hm-chat-bubble-root .hm-chat-msg__bubble p,
body .hm-chat-full-wrap .hm-chat-msg__bubble p {
  margin: 0 !important;
  margin-block-end: 0 !important;
}

/* FAB WhatsApp */
body[class*='elementor-kit'] .hm-chat-bubble-root button.hm-chat-fab,
body[class*='elementor-kit'] .hm-chat-bubble-root .hm-chat-fab,
body .hm-chat-bubble-root button.hm-chat-fab,
body .hm-chat-bubble-root .hm-chat-fab {
  position: fixed !important;
  bottom: var(--hm-bubble-bottom) !important;
  left: var(--hm-bubble-left) !important;
  z-index: 9999997 !important;
  width: var(--hm-fab-size, 56px) !important;
  height: var(--hm-fab-size, 56px) !important;
  min-height: var(--hm-fab-size, 56px) !important;
  max-width: var(--hm-fab-size, 56px) !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  border-radius: 50% !important;
  background-color: #25d366 !important;
  background-image: none !important;
  color: #fff !important;
  font-family: var(--hm-font-body) !important;
  font-size: inherit !important;
  font-weight: 400 !important;
  line-height: 1 !important;
  letter-spacing: normal !important;
  text-transform: none !important;
  box-shadow: 0 4px 14px rgb(0 0 0 / 0.18) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  appearance: none !important;
  -webkit-appearance: none !important;
}

body[class*='elementor-kit'] .hm-chat-bubble-root button.hm-chat-fab:hover,
body .hm-chat-bubble-root button.hm-chat-fab:hover {
  background-color: #20bd5a !important;
  color: #fff !important;
  transform: scale(1.05);
}

/* Cerrar header, chips, enviar */
body[class*='elementor-kit'] .hm-chat-bubble-root button.hm-chat-icon-btn,
body[class*='elementor-kit'] .hm-chat-bubble-root button.hm-chat-chip,
body[class*='elementor-kit'] .hm-chat-bubble-root button.hm-chat-send,
body[class*='elementor-kit'] .hm-chat-full-wrap button.hm-chat-icon-btn,
body[class*='elementor-kit'] .hm-chat-full-wrap button.hm-chat-chip,
body[class*='elementor-kit'] .hm-chat-full-wrap button.hm-chat-send,
body[class*='elementor-kit'] .hm-chat-bubble-root button.hm-chat-restart,
body[class*='elementor-kit'] .hm-chat-full-wrap button.hm-chat-restart,
body .hm-chat-bubble-root button.hm-chat-icon-btn,
body .hm-chat-bubble-root button.hm-chat-chip,
body .hm-chat-bubble-root button.hm-chat-send,
body .hm-chat-bubble-root button.hm-chat-restart,
body .hm-chat-full-wrap button.hm-chat-icon-btn,
body .hm-chat-full-wrap button.hm-chat-chip,
body .hm-chat-full-wrap button.hm-chat-send,
body .hm-chat-full-wrap button.hm-chat-restart {
  font-family: var(--hm-font-body) !important;
  font-size: inherit !important;
  font-weight: 400 !important;
  line-height: 1.4 !important;
  letter-spacing: normal !important;
  text-transform: none !important;
  text-decoration: none !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  cursor: pointer !important;
}

body[class*='elementor-kit'] .hm-chat-bubble-root button.hm-chat-icon-btn,
body[class*='elementor-kit'] .hm-chat-full-wrap button.hm-chat-icon-btn,
body .hm-chat-bubble-root button.hm-chat-icon-btn,
body .hm-chat-full-wrap button.hm-chat-icon-btn {
  background: transparent !important;
  border: none !important;
  border-radius: 9999px !important;
  padding: 0.5rem !important;
  color: #544342 !important;
  min-height: auto !important;
  width: auto !important;
  box-shadow: none !important;
}

body[class*='elementor-kit'] .hm-chat-bubble-root button.hm-chat-send,
body[class*='elementor-kit'] .hm-chat-full-wrap button.hm-chat-send,
body .hm-chat-bubble-root button.hm-chat-send,
body .hm-chat-full-wrap button.hm-chat-send {
  background: var(--hm-cta-coral) !important;
  border: none !important;
  border-radius: 0.75rem !important;
  color: #fff !important;
  padding: 0.75rem !important;
  min-height: auto !important;
  width: auto !important;
  box-shadow: none !important;
}

body[class*='elementor-kit'] .hm-chat-bubble-root button.hm-chat-restart,
body[class*='elementor-kit'] .hm-chat-full-wrap button.hm-chat-restart,
body .hm-chat-bubble-root button.hm-chat-restart,
body .hm-chat-full-wrap button.hm-chat-restart {
  background: #773232 !important;
  border: none !important;
  border-radius: 9999px !important;
  color: #fff !important;
  padding: 0.4rem 0.75rem !important;
  min-height: auto !important;
  width: auto !important;
  max-width: none !important;
  height: auto !important;
  box-shadow: 0 4px 14px rgb(119 50 50 / 0.32) !important;
}

/* Fijar toast a la derecha: anula position/static de Elementor */
body[class*='elementor-kit'] .hm-chat-full-wrap .hm-chat-shell.hm-chat-shell--full > button.hm-chat-restart,
body[class*='elementor-kit'] .hm-chat-bubble-root .hm-chat-shell.hm-chat-shell--compact > button.hm-chat-restart,
body .hm-chat-full-wrap .hm-chat-shell.hm-chat-shell--full > button.hm-chat-restart,
body .hm-chat-bubble-root .hm-chat-shell.hm-chat-shell--compact > button.hm-chat-restart {
  position: absolute !important;
  top: var(--hm-restart-top, 4.75rem) !important;
  right: var(--hm-restart-right, 1rem) !important;
  left: auto !important;
  bottom: auto !important;
  margin: 0 !important;
  float: none !important;
  transform: none !important;
  inset: auto !important;
  inset-block-start: var(--hm-restart-top, 4.75rem) !important;
  inset-inline-end: var(--hm-restart-right, 1rem) !important;
  z-index: 100050 !important;
  pointer-events: auto !important;
}

/* Modo full: toast anclado al viewport del chat (no se mueve al hacer scroll) */
body[class*='elementor-kit'] .hm-chat-full-wrap > .hm-chat-shell.hm-chat-shell--full > button.hm-chat-restart,
body .hm-chat-full-wrap > .hm-chat-shell.hm-chat-shell--full > button.hm-chat-restart {
  position: fixed !important;
  top: var(--hm-restart-top, 4.75rem) !important;
  right: var(--hm-restart-right, 1rem) !important;
  left: auto !important;
  bottom: auto !important;
  inset-block-start: var(--hm-restart-top, 4.75rem) !important;
  inset-inline-end: var(--hm-restart-right, 1rem) !important;
  z-index: 100050 !important;
}

body[class*='elementor-kit'] .hm-chat-full-wrap > .hm-chat-shell.hm-chat-shell--full,
body .hm-chat-full-wrap > .hm-chat-shell.hm-chat-shell--full {
  position: relative !important;
}

body[class*='elementor-kit'] .hm-chat-bubble-root button.hm-chat-send:disabled,
body[class*='elementor-kit'] .hm-chat-full-wrap button.hm-chat-send:disabled,
body .hm-chat-bubble-root button.hm-chat-send:disabled,
body .hm-chat-full-wrap button.hm-chat-send:disabled {
  opacity: 0.4 !important;
  cursor: not-allowed !important;
}

body[class*='elementor-kit'] .hm-chat-bubble-root button.hm-chat-chip,
body[class*='elementor-kit'] .hm-chat-full-wrap button.hm-chat-chip,
body .hm-chat-bubble-root button.hm-chat-chip,
body .hm-chat-full-wrap button.hm-chat-chip {
  border: none !important;
  border-radius: 9999px !important;
  padding: 0.5rem 1rem !important;
  font-size: 0.75rem !important;
  min-height: auto !important;
  width: auto !important;
  box-shadow: none !important;
}

body[class*='elementor-kit'] .hm-chat-bubble-root button.hm-chat-chip--peach,
body[class*='elementor-kit'] .hm-chat-full-wrap button.hm-chat-chip--peach,
body .hm-chat-bubble-root button.hm-chat-chip--peach,
body .hm-chat-full-wrap button.hm-chat-chip--peach {
  background: var(--hm-bg-peach) !important;
  color: #763131 !important;
}

body[class*='elementor-kit'] .hm-chat-bubble-root button.hm-chat-chip--mint,
body[class*='elementor-kit'] .hm-chat-full-wrap button.hm-chat-chip--mint,
body .hm-chat-bubble-root button.hm-chat-chip--mint,
body .hm-chat-full-wrap button.hm-chat-chip--mint {
  background: var(--hm-mint) !important;
  color: var(--hm-text-primary) !important;
}

body[class*='elementor-kit'] .hm-chat-bubble-root button.hm-chat-chip--surface,
body[class*='elementor-kit'] .hm-chat-full-wrap button.hm-chat-chip--surface,
body .hm-chat-bubble-root button.hm-chat-chip--surface,
body .hm-chat-full-wrap button.hm-chat-chip--surface {
  background: #e7eff8 !important;
  color: var(--hm-text-primary) !important;
}

/* Textarea / inputs del composer */
body[class*='elementor-kit'] .hm-chat-bubble-root .hm-chat-form textarea,
body[class*='elementor-kit'] .hm-chat-full-wrap .hm-chat-form textarea,
body .hm-chat-bubble-root .hm-chat-form textarea,
body .hm-chat-full-wrap .hm-chat-form textarea {
  font-family: var(--hm-font-body) !important;
  font-size: 1rem !important;
  font-weight: 400 !important;
  line-height: 1.5 !important;
  color: var(--hm-text-primary) !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 0.75rem !important;
  min-height: 48px !important;
  box-shadow: none !important;
  appearance: none !important;
}

/* Overlay */
body[class*='elementor-kit'] .hm-chat-bubble-root .hm-chat-overlay,
body .hm-chat-bubble-root .hm-chat-overlay {
  position: fixed !important;
  inset: 0 !important;
  z-index: 9999998 !important;
}

@media (max-width: 767px) {
  body[class*='elementor-kit'] .hm-chat-bubble-root .hm-chat-panel-wrap,
  body .hm-chat-bubble-root .hm-chat-panel-wrap {
    top: 50% !important;
    bottom: auto !important;
    left: 12px !important;
    right: 12px !important;
    height: auto !important;
    max-height: none !important;
    transform: translateY(-50%) scale(0.96) !important;
    transform-origin: center center !important;
  }

  body[class*='elementor-kit'] .hm-chat-bubble-root .hm-chat-panel-wrap.is-open,
  body .hm-chat-bubble-root .hm-chat-panel-wrap.is-open {
    transform: translateY(-50%) scale(1) !important;
  }

  body[class*='elementor-kit'] .hm-chat-bubble-root .hm-chat-panel-wrap .hm-chat-shell--compact,
  body .hm-chat-bubble-root .hm-chat-panel-wrap .hm-chat-shell--compact {
    height: min(95dvh, calc(100dvh - 24px)) !important;
    max-height: min(95dvh, calc(100dvh - 24px)) !important;
  }
}

/*
 * Escritorio: panel 95vh centrado verticalmente en el viewport.
 * Máxima especificidad vs Elementor.
 */
@media (min-width: 768px) {
  html body[class*='elementor-kit'] .hm-chat-bubble-root[data-hm-bubble-root] .hm-chat-panel-wrap[data-hm-panel-wrap],
  html body .hm-chat-bubble-root[data-hm-bubble-root] .hm-chat-panel-wrap[data-hm-panel-wrap] {
    position: fixed !important;
    top: 50% !important;
    right: auto !important;
    bottom: auto !important;
    left: var(--hm-bubble-left, 24px) !important;
    width: auto !important;
    height: var(--hm-panel-height, 95vh) !important;
    max-height: var(--hm-panel-height, 95vh) !important;
    min-height: var(--hm-panel-height, 95vh) !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    z-index: 9999999 !important;
    transform-origin: center left !important;
    transform: translateY(-50%) scale(0.96) !important;
  }

  html body[class*='elementor-kit'] .hm-chat-bubble-root[data-hm-bubble-root] .hm-chat-panel-wrap[data-hm-panel-wrap].is-open,
  html body .hm-chat-bubble-root[data-hm-bubble-root] .hm-chat-panel-wrap[data-hm-panel-wrap].is-open {
    visibility: visible !important;
    opacity: 1 !important;
    transform: translateY(-50%) scale(1) !important;
  }

  html body[class*='elementor-kit'] .hm-chat-bubble-root[data-hm-bubble-root] .hm-chat-panel-wrap[data-hm-panel-wrap] .hm-chat-shell.hm-chat-shell--compact,
  html body .hm-chat-bubble-root[data-hm-bubble-root] .hm-chat-panel-wrap[data-hm-panel-wrap] .hm-chat-shell.hm-chat-shell--compact {
    display: flex !important;
    flex-direction: column !important;
    box-sizing: border-box !important;
    width: 400px !important;
    max-width: 400px !important;
    height: 100% !important;
    max-height: 100% !important;
    min-height: 0 !important;
  }
}
