/* Aislamiento exclusivo para WordPress/Elementor. El diseño base es el de la web. */
#ith-chat-root .ith-chat-widget button,
#ith-chat-root .ith-chat-widget textarea {
  margin: 0;
  text-transform: none;
  letter-spacing: normal;
  box-shadow: none;
}

#ith-chat-root .ith-chat-widget button {
  appearance: none;
  -webkit-appearance: none;
}

#ith-chat-root .ith-chat-widget button:hover,
#ith-chat-root .ith-chat-widget button:focus,
#ith-chat-root .ith-chat-widget button:active {
  filter: none;
  text-shadow: none;
}

#ith-chat-root .ith-header-actions button:hover,
#ith-chat-root .ith-header-actions button:focus,
#ith-chat-root .ith-input-wrap > button:hover,
#ith-chat-root .ith-input-wrap > button:focus,
#ith-chat-root .ith-email-actions button:hover,
#ith-chat-root .ith-email-actions button:focus {
  box-shadow: none;
}

#ith-chat-root .ith-launcher,
#ith-chat-root .ith-launcher:hover,
#ith-chat-root .ith-launcher:focus {
  box-shadow: 0 12px 30px rgba(1, 148, 211, .34);
}

#ith-chat-root .ith-welcome-bubble,
#ith-chat-root .ith-welcome-bubble:hover,
#ith-chat-root .ith-welcome-bubble:focus {
  box-shadow: 0 9px 30px rgba(1, 49, 69, .13);
}

#ith-chat-root .ith-message-list {
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  scrollbar-gutter: stable;
}

#ith-chat-root .ith-quick-actions:not(.is-compact) {
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

#ith-chat-root .ith-quick-actions:not(.is-compact) button {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}

#ith-chat-root .ith-composer,
#ith-chat-root .ith-input-wrap {
  min-width: 0;
  overflow: hidden;
}

#ith-chat-root .ith-input-wrap {
  width: 100%;
}

#ith-chat-root .ith-input-wrap > textarea {
  min-width: 0;
  flex: 1 1 auto;
  margin: 0;
  box-shadow: none;
}

#ith-chat-root .ith-input-wrap > button {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  max-width: 36px;
  max-height: 36px;
  flex: 0 0 36px;
  overflow: hidden;
  margin: 0;
  padding: 0;
  line-height: 0;
  box-shadow: none;
}

#ith-chat-root .ith-input-wrap > button svg {
  width: 19px;
  height: 19px;
  min-width: 19px;
  max-width: 19px;
  display: block;
  flex: 0 0 19px;
}

#ith-chat-root .ith-quick-actions button span svg {
  width: 18px;
  height: 18px;
  min-width: 18px;
  max-width: 18px;
  display: block;
}

#ith-chat-root .ith-quick-actions::-webkit-scrollbar {
  height: 4px;
}

#ith-chat-root .ith-quick-actions::-webkit-scrollbar-track {
  background: transparent;
}

#ith-chat-root .ith-quick-actions::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #c9dce3;
}

#ith-chat-root .ith-quick-actions::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

@media (max-width: 560px) {
  #ith-chat-root .ith-quick-actions {
    display: flex;
    gap: 7px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 6px 14px 8px;
  }

  #ith-chat-root .ith-quick-actions button {
    width: max-content;
    min-width: max-content;
    max-width: none;
    flex: 0 0 auto;
    min-height: 34px;
    padding: 6px 5px;
    overflow: visible;
    border: 0;
    border-radius: 0;
    color: var(--ith-ink);
    background: transparent;
    box-shadow: none;
    white-space: nowrap;
    overflow-wrap: normal;
    line-height: 1.25;
    transform: none;
  }

  #ith-chat-root .ith-quick-actions button:hover {
    border: 0;
    color: var(--ith-blue);
    background: transparent;
    box-shadow: none;
    transform: none;
  }

  #ith-chat-root .ith-quick-actions button:focus-visible {
    border: 0;
    color: var(--ith-blue);
    background: transparent;
    box-shadow: none;
    outline: 2px solid var(--ith-blue);
    outline-offset: 1px;
    transform: none;
  }

  #ith-chat-root .ith-quick-actions button span {
    width: 24px;
    height: 24px;
    flex-basis: 24px;
  }

  #ith-chat-root .ith-quick-actions:not(.is-compact) button {
    width: max-content;
    min-width: max-content;
    max-width: none;
    flex: 0 0 auto;
  }

  #ith-chat-root .ith-chat-panel.is-open ~ .ith-launcher-wrap {
    display: none;
  }
}

@media (max-height: 700px) and (min-width: 561px) {
  #ith-chat-root .ith-chat-widget,
  #ith-chat-root .ith-chat-widget.ith-position-left {
    right: 16px;
    left: auto;
    bottom: 12px;
  }

  #ith-chat-root .ith-chat-panel,
  #ith-chat-root .ith-position-left .ith-chat-panel {
    right: 16px;
    left: auto;
    bottom: 72px;
    width: min(350px, calc(100vw - 24px));
    height: calc(100dvh - 84px);
    min-height: 0;
    max-height: calc(100dvh - 84px);
    border-radius: 18px;
  }

  body.admin-bar #ith-chat-root .ith-chat-panel {
    height: calc(100dvh - 116px);
    max-height: calc(100dvh - 116px);
  }

  #ith-chat-root .ith-chat-header {
    min-height: 64px;
    padding: 10px 12px 10px 14px;
  }

  #ith-chat-root .ith-agent {
    gap: 9px;
    min-width: 0;
  }

  #ith-chat-root .ith-agent > div {
    min-width: 0;
  }

  #ith-chat-root .ith-agent .ith-brand-mark.is-compact {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
  }

  #ith-chat-root .ith-agent strong {
    max-width: 178px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
  }

  #ith-chat-root .ith-agent span {
    font-size: 10px;
  }

  #ith-chat-root .ith-header-actions button {
    width: 30px;
    height: 30px;
  }

  #ith-chat-root .ith-message-list {
    padding: 10px 12px 5px;
  }

  #ith-chat-root .ith-day-divider {
    margin: 0 0 9px;
  }

  #ith-chat-root .ith-message {
    margin-bottom: 10px;
  }

  #ith-chat-root .ith-quick-actions {
    display: flex;
    gap: 7px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 5px 12px 7px;
  }

  #ith-chat-root .ith-quick-actions button {
    width: max-content;
    min-width: max-content;
    max-width: none;
    flex: 0 0 auto;
    min-height: 34px;
    padding: 6px 5px;
    overflow: visible;
    border: 0;
    border-radius: 0;
    color: var(--ith-ink);
    background: transparent;
    box-shadow: none;
    white-space: nowrap;
    overflow-wrap: normal;
    line-height: 1.25;
    transform: none;
  }

  #ith-chat-root .ith-quick-actions button:hover {
    border: 0;
    color: var(--ith-blue);
    background: transparent;
    box-shadow: none;
    transform: none;
  }

  #ith-chat-root .ith-quick-actions button:focus-visible {
    border: 0;
    color: var(--ith-blue);
    background: transparent;
    box-shadow: none;
    outline: 2px solid var(--ith-blue);
    outline-offset: 1px;
    transform: none;
  }

  #ith-chat-root .ith-quick-actions button span {
    width: 24px;
    height: 24px;
    flex-basis: 24px;
  }

  #ith-chat-root .ith-quick-actions:not(.is-compact) button {
    width: max-content;
    min-width: max-content;
    max-width: none;
    flex: 0 0 auto;
  }

  #ith-chat-root .ith-composer {
    padding: 8px 10px 7px;
  }

  #ith-chat-root .ith-input-wrap {
    padding: 4px 5px 4px 10px;
  }

  #ith-chat-root .ith-input-wrap > button {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    max-width: 32px;
    max-height: 32px;
    flex-basis: 32px;
  }

  #ith-chat-root .ith-input-wrap > button svg {
    width: 17px;
    height: 17px;
    min-width: 17px;
    max-width: 17px;
    flex-basis: 17px;
  }

  #ith-chat-root .ith-composer > p {
    margin-top: 4px;
  }

  #ith-chat-root .ith-launcher {
    width: 50px;
    height: 50px;
  }
}

@media (max-width: 560px), (max-height: 700px) and (min-width: 561px) {
  #ith-chat-root .ith-quick-actions::-webkit-scrollbar {
    width: 0;
    height: 0;
  }
}
