/* Copilot floating button + chat window — Intcomex Copilot style (portal reference) */
.chat-copilot-root {
  position: relative;
}

@keyframes chat-window-slide-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.floatingchatbutton {
  display: flex;
  align-items: center;
  padding-left: 11px;
  gap: 6px;
  position: fixed;
  z-index: 2147483647;
  bottom: 11px;
  right: 27px;
  width: 98px;
  height: 45px;
  color: white;
  border: none;
  border-radius: 2px;
  cursor: pointer;
  background-color: #0aa8cc;
  font: normal normal bold 14px/19px "Open Sans", Arial, sans-serif;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: background-color 0.2s, transform 0.1s;
}

.floatingchatbutton:active,
.floatingchatbutton:focus {
  color: white !important;
  background-color: #086dbf !important;
}

.floatingchatbutton img {
  width: 26px;
}

@media (max-width: 576px) {
  .floatingchatbutton {
    bottom: 11px;
  }
}

.chat-window-copilot {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 360px;
  height: 700px;
  max-height: calc(100vh - 120px);
  display: flex;
  flex-direction: column;
  background: white;
  border: 0;
  border-radius: 4px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  z-index: 999;
  animation: chat-window-slide-in 0.3s ease-out;
}

@media (max-width: 768px) {
  .chat-window-copilot {
    width: 100vw;
    height: 100vh;
    max-height: none;
    bottom: 0;
    right: 0;
    border-radius: 0;
    border: none;
  }
}

.chat-window-copilot__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  height: 56px;
  min-height: 56px;
  max-height: 56px;
  padding: 0 16px;
  margin: 0;
  box-sizing: border-box;
  background-color: #1d3969;
  color: #fff;
  font-family: "Open Sans", "Segoe UI", Arial, sans-serif;
  font-weight: 450;
  font-size: 16px;
  flex-shrink: 0;
  overflow: hidden;
}

.chat-window-copilot__title {
  margin: 0;
  font-size: 16px;
  font-weight: 450;
  line-height: 1.2;
  color: #fff;
}

.chat-window-copilot__header-actions {
  display: flex;
  align-items: center;
  align-self: stretch;
  gap: 12px;
}

.chat-window-copilot__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: transparent;
  border: none;
  color: #fff;
  font-family: Arial, sans-serif;
  width: 20px;
  min-width: 20px;
  height: 100%;
  padding: 0;
  margin: 0;
  transition: opacity 0.2s;
}

.chat-window-copilot__btn:hover {
  opacity: 0.7;
}

.chat-window-copilot__btn--minimize {
  font-size: 30px;
  font-weight: normal;
  line-height: 1;
}

.chat-window-copilot__btn--close {
  font-size: 22px;
  line-height: 1;
}

.chat-window-copilot__body {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

/* Ocultar citaciones PVA/Web Chat (misma idea que el HTML de referencia) */
.chat-window-copilot__body .webchat__render-markdown__citation,
.chat-window-copilot__body button[aria-label^="Citation"] {
  display: none !important;
}

.chat-window-copilot__body sup {
  display: none !important;
}

/* Web Chat bubble overrides — usuario #1D3969 */
.chat-window-copilot__body .webchat__bubble--from-user .webchat__bubble__content,
.chat-window-copilot__body .webchat__bubble--from-user .webchat__bubble__content p,
.chat-window-copilot__body .webchat__bubble--from-user .webchat__bubble__content span,
.chat-window-copilot__body .webchat__bubble--from-user .webchat__bubble__content li,
.chat-window-copilot__body .webchat__bubble--from-user .webchat__bubble__content a {
  color: #fff !important;
}

.chatomnichannelwidget--show {
  opacity: 1 !important;
  bottom: 20px !important;
  right: 20px !important;
  z-index: 2147483646 !important;
}

.chatomnichannelwidget--hide {
  opacity: 0;
  z-index: -1 !important;
}
