.chat-plugin button {
    cursor: pointer;
    text-transform: none;
    font-family: inherit;
    font-feature-settings: inherit;
    font-variation-settings: inherit;
    font-size: 100%;
    font-weight: inherit;
    line-height: inherit;
    letter-spacing: inherit;
    color: inherit;
    margin: 0;
    padding: 0;
    border: 2px solid #eee;
    transition: all 300ms linear 0ms;
}

.chat-plugin .cursor-pointer{
  cursor: pointer;
}

.chat-plugin form {
    display: block;
    margin-top: 0em;
    unicode-bidi: isolate;
}

.chat-plugin input:not([type="image" i], [type="range" i], [type="checkbox" i], [type="radio" i]) {
    overflow-clip-margin: 0px !important;
    overflow: clip !important;
}

.chat-plugin input[type="text" i] {
    padding-block: 1px;
    padding-inline: 2px;
}

.chat-plugin .btn-close {
  padding: 10px;
}

.chat-plugin .font-bold {
  font-weight: 700;
}

.chat-plugin .text-xl{
  font-size: 1.25rem; /* 20px */
  line-height: 1.75rem; /* 28px */
}

.chat-plugin .text-left {
  text-align: left;
}

.chat-plugin .link-white{
  color: #ffff ;
}

.chat-plugin .text-2xl {
    font-size: 1.25rem;
    line-height: 1.75rem;
}

.chat-plugin .text-4xl {
  font-size: 2rem;
  line-height: 2.25rem;
} 

.chat-plugin .text-base {
  font-size: 1rem; /* 16px */
  line-height: 1.5rem; /* 24px */
}

.chat-plugin .mt-3 {
  margin-top: 0.75rem !important;
}

.chat-plugin .mt-5 {
  margin-top: 1.25rem !important;
}

.chat-plugin .ml-6 {
  margin-left: 1.5rem !important;
}

.chat-plugin .ml-7 {
  margin-left: 1.75rem !important;
}

.chat-plugin .fixed {
  position: fixed;
}

.chat-plugin .bottom-6 {
  bottom: 1.5rem !important;
}

.chat-plugin .right-2 {
  right: 0.5rem !important;
}

.chat-plugin .right-3 {
  right: 0.75rem !important;
}

.chat-plugin .absolute {
    position: absolute;
}

.chat-plugin .z-10 {
  z-index: 10;
} 

.chat-plugin .z-50 {
  z-index: 50;
} 

.chat-plugin .p-0 {
  padding: 0px;
}

.chat-plugin .bg-transparent {
  background-color: transparent !important;
  border-color: transparent !important;
}

.chat-plugin .bg-transparent:hover {
  background-color: transparent !important;
  border-color: transparent !important;
}

.chat-plugin .border-none {
  border-style: none;
}

.chat-plugin .transition-transform {
  transition-property: transform;
  transition-timing-function: 
  cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

.chat-plugin .duration-300 {
  transition-duration: 300ms;
}

.chat-plugin .h-24 {
  height: 6rem;
}

.chat-plugin .h-48 {
  height: 12rem;
}

.chat-plugin .h-65p {
  height: 65% !important;
}

.chat-plugin .w-96 {
  width: 24rem !important;
}

.chat-plugin img {
  -webkit-user-drag: none; /* Safari/iOS */
  user-drag: none;
  pointer-events: none;     /* evita interacción directa */
  max-width: 100%;
  height: auto;
  display: block;
  vertical-align: middle;
}

.chat-plugin .w-full {
  width: 100%;
}

.chat-plugin .h-full {
  height: 100%;
}

.chat-plugin #chat-container {
  width: min(60rem, 90vw);
  height: min(34rem, 75vh);
}

.chat-plugin .max-w-6xl {
  max-width: 60rem;
}

.chat-plugin .chat-inner {
  width: 100%;
  margin: 0;
}

.chat-plugin .chat-content {
  width: 100%;
}

.chat-plugin .beta-row {
  width: 100%;
  justify-content: flex-start;
}

.chat-plugin .max-w-3xl{
  max-width: 48rem;
}

.chat-plugin .fondo-chat {
  background-color: rgba(234, 234, 234, 0.5);
}

.chat-plugin .shadow-lg {
  --tw-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);
  box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
}

.chat-plugin .flex {
  display: flex;
}

.chat-plugin .flex-1 {
    flex: 1 1 0%;
}

.chat-plugin .flex-col {
  flex-direction: column;
}

.chat-plugin .overflow-hidden {
  overflow: hidden;
}

.chat-plugin .overflow-y-auto {
    overflow-y: auto;
}

.chat-plugin .bottom-12 {
  bottom: 3rem;
}

.chat-plugin .right-12 {
  right: 3rem;
}

.chat-plugin .z-40 {
  z-index: 40;
}

.chat-plugin .mb-3 {
  margin-bottom: 0.75rem;
}

.chat-plugin .mb-4 {
    margin-bottom: 1rem;
}

.chat-plugin .px-3 {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

.chat-plugin .px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}

.chat-plugin .py-2 {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.chat-plugin .relative {
  position: relative;
}

.chat-plugin .items-start {
    align-items: flex-start;
}

.chat-plugin .items-end {
    align-items: flex-end;
}

.chat-plugin .gap-2 {
    gap: 0.5rem;
}

/* Scroll del chat */
.chat-plugin #chat-box::-webkit-scrollbar {
  width: 4px;
}

.chat-plugin #chat-box::-webkit-scrollbar-thumb {
  background-color: #d4d4d4;
  border-radius: 2px;
}

.chat-plugin .scroll-smooth {
    scroll-behavior: smooth;
}

.chat-plugin .animate-blue-pulse {
  background-size: 200% 200%;
  animation: bluePulse 5s ease infinite;
}

/* ======== BODY ======== */
.chat-plugin body {
  font-family: 'Segoe UI', sans-serif;
  background-color: #f9fafb;
  color: #1f2937;
  margin: 0;
}

/* ======== CHAT BUBBLES ======== */
.chat-plugin .bubble {
  padding: 0.1rem 0.75rem;
  font-size: 1rem;
  max-width: 65%;
  word-wrap: break-word;
  animation: fadeIn 0.2s ease-in;
  line-height: 1.6;
  white-space: pre-wrap; /* Mantiene saltos de línea */
}

.chat-plugin .bubble li strong {
  font-weight: normal !important;
}

.chat-plugin .bubble p {
  margin: 0 0 0.5rem;
}

.chat-plugin .bubble.bot {
  border-top-left-radius: 1.2rem; /* 8px */
  border-bottom-left-radius: 1.2rem; /* 8px */
  border-bottom-right-radius: 1.2rem; /* 8px */
  background-color: #002660; /* gray-200 */
  padding-bottom: 0.5rem; /* 8px */
  padding-top: 0.5rem; /* 8px */
  color: #ffff; /* gray-900 */
  align-self: flex-start;
}

.chat-plugin .bubble.user {
  border-top-right-radius: 1.2rem; /* 8px */
  border-bottom-right-radius: 1.2rem; /* 8px */
  border-bottom-left-radius: 1.2rem; /* 8px */
  background-color: #ffff;
  color: #002660;
  align-self: flex-end;
  margin-right: 4rem;
  box-sizing: border-box;
  transition: background-color 0.3s ease;
}

.chat-plugin .rounded-lg {
   border-radius: 0.5rem; /* 8px */
}

.chat-plugin .rounded-xl	{
  border-radius: 0.75rem; /* 12px */
}

.chat-plugin .rounded-t-lg {
    border-top-left-radius: 2rem;
    border-top-right-radius: 2rem;
}

.chat-plugin .rounded-2xl {
    border-radius: 2rem;
}

.chat-plugin .bubble.user:hover {
  background-color: #BFBFBF;
}

/* Listas dentro de burbujas */
.chat-plugin .bubble ul{
  margin-left: 1.5rem;
  padding-left: 1rem;
  margin-bottom: 0.5rem;
}

.chat-plugin .bubble ul {
  list-style: disc;
  padding-left: 1.5rem;
  margin: 0 0 0.5rem 0;
}

.chat-plugin .bubble li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
  color: inherit;           /* hereda color correcto */
  font-weight: normal;      /* asegura que no sea más negrita que el resto */
}

.chat-plugin .bubble ol {
  margin-left: 1.5rem;
  padding-left: 1rem;
  margin-bottom: 0.5rem;
  list-style-type: decimal;
}

.chat-plugin .bubble ol[type="i"] {
  list-style-type: lower-roman;
}

/* ======== SCROLLBAR PERSONALIZADO ======== */
.chat-plugin #chat-box::-webkit-scrollbar {
  width: 6px;
}

.chat-plugin #chat-box::-webkit-scrollbar-thumb {
  background-color: #d1d5db;
  border-radius: 3px;
}

/* ======== INPUT FOCUS ======== */
.chat-plugin input:focus {
  outline: none;
  border-color: #144186 !important;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
}

.chat-plugin input::placeholder {
  color: #999 !important; /* color del texto del placeholder */
}

/* ======== ESCRIBIENDO (TYPING INDICATOR) ======== */
.chat-plugin .typing-indicator::after {
  content: '...';
  animation: dots 1.5s infinite steps(1);
  color: #9ca3af;
  font-weight: 500;
}


.chat-plugin .animate-blue-pulse {
  background-size: 200% 200%;
  animation: bluePulse 5s ease infinite;
}

/* Fuente */
.chat-plugin .roboto-condensed {
  font-family: 'Roboto Condensed', sans-serif;
}

/* Clase para ocultar elementos */
.chat-plugin .hidden {
  display: none !important;
}



.chat-plugin .animate-green-pulse {
  animation: green-pulse 3s ease-in-out infinite;
}



.chat-plugin .animate-red-pulse {
  background-size: 200% 200%;
  animation: redPulse 5s ease infinite;
}

.chat-plugin #editar-respuesta {
  overflow-y: hidden;
  resize: none;
  min-height: 60px;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.5;
}

.chat-plugin .fondo-titulo {
  background-color: #002660;
  color: #ffff;
}

.chat-plugin .fondo-chat {
  background-color: rgba(234, 234, 234, 0.5); /* gris con 50% de opacidad */
}

.chat-plugin .send-button {
  background-color: #002660;
  color: #ffff;
  border-color: transparent !important;
  height: 44px !important;
  width: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-plugin .send-button:hover {
  background-color: #144186;
  border-color: transparent !important;
}

.chat-plugin .menu-button {
  background-color: #ffff;
  color: #144186;
  border-color: transparent !important;
}

.chat-plugin .menu-button:hover {
  background-color: #BDF5FF;
  color: #144186;
  border-color: transparent !important;
}

.chat-plugin .chat-area {
  background-color: #fff !important;
  color: #002660 !important;
}

.chat-plugin .bubble.bot form {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 1rem;
}

.chat-plugin .bubble.bot form input {
  border-radius: 0.65rem;
  border: 2px solid #144186;
  background-color: #fff;
  color: #002660;
  font-size: 1rem;
  padding: 0.4rem 0.85rem;
  outline: none;
  width: 100%;
  box-sizing: border-box;
}

.chat-plugin .bubble.bot form input:focus {
  border-color: #00b4ff;
  box-shadow: 0 0 0 2px rgba(0, 180, 255, 0.25);
}

.chat-plugin .bubble.bot form button {
  align-self: flex-end;
  padding: 0.45rem 1.5rem;
  border-radius: 0.6rem;
  font-size: 0.95rem;
}

.chat-plugin .sparkles-button {
  background-color: #BDF5FF;
  color: #144186;
}

.chat-plugin .beta-text {
  color: #144186;
}

.chat-plugin .input-row {
  align-items: center;
  gap: 0.75rem;
  margin-left: 0 !important;
}

.chat-plugin .input-row textarea {
  flex: 1 1 60%;
  max-width: 60%;
}

.chat-plugin .input-row button {
  flex-shrink: 0;
}

.chat-plugin textarea {
    min-height: 44px;
    font-size: 1.1rem;
    line-height: 1.5rem;
    max-width: 100%;
    padding: 0.5rem 0.75rem;
}

.chat-plugin textarea:focus {
  outline: none;
  border-color: #002660 !important;
  box-shadow: 0 0 0 2px rgba(58, 94, 211, 0.2);
}

.chat-plugin .hover\:text-blue-600 {
  background-color: transparent !important;
  border-color: transparent !important;
}

.chat-plugin .hover\:text-blue-600:hover {
  --tw-text-opacity:1;
  color: rgb(37 99 235 / var(--tw-text-opacity,1));
  background-color: transparent !important;
  border-color: transparent !important;

}

.chat-plugin .text-gray-400 {
    --tw-text-opacity: 1;
    color: rgb(156 163 175 / var(--tw-text-opacity, 1));
}

.chat-plugin .bg-green-600 {
    --tw-bg-opacity: 1;
    background-color: rgb(22 163 74 / var(--tw-bg-opacity, 1));
}

.chat-plugin .hover\:bg-green-700 {
  border-color: transparent !important;
}

.chat-plugin .hover\:bg-green-700{
  --tw-text-opacity:1;
  color: rgb(21 128 61 / var(--tw-text-opacity,1));
  border-color: transparent !important;
}

.chat-plugin h1 {
  color: #ffff !important;
}

.chat-plugin h3 {
  color: #ffff !important;
}

.chat-plugin top-3 {
  top: 0.75rem !important;
}

.chat-plugin .text-white {
    --tw-text-opacity: 1;
    color: rgb(255 255 255 / var(--tw-text-opacity, 1)) !important;
}

.chat-plugin .btn-green:focus {
  background-color: rgb(22 163 74 / var(--tw-bg-opacity, 1)) !important;
  border-color: transparent !important;
}

.chat-plugin .p-6 {
    padding: 1.5rem;
}

.chat-plugin .space-y-2 > :not([hidden]) ~ :not([hidden]) {
    --tw-space-y-reverse: 0;
    margin-top: calc(0.5rem * calc(1 - var(--tw-space-y-reverse)));
    margin-bottom: calc(0.5rem * var(--tw-space-y-reverse));
}

.chat-plugin .disabled\:opacity-50:disabled {
    opacity: 0.5;
}

.chat-plugin .disabled\:cursor-not-allowed:disabled {
    cursor: not-allowed;
}

@media (min-width: 1024px) {
  .chat-plugin .chat-content {
    max-width: calc(100% - 18rem);
    width: calc(100% - 18rem);
    margin-left: 1.5rem;
    margin-right: auto;
    padding-right: 1rem;
  }

  .chat-plugin .chat-content #chat-box,
  .chat-plugin .chat-content .input-row,
  .chat-plugin .chat-content .beta-row {
    width: 100%;
  }

  .chat-plugin .chat-content #chat-box {
    padding-right: 1.5rem;
    box-sizing: border-box;
  }

  .chat-plugin .chat-content .input-row,
  .chat-plugin .chat-content .beta-row {
    margin-left: 0 !important;
    margin-right: auto !important;
  }

  .chat-plugin .chat-content .sparkles-button {
    margin-left: 0 !important;
  }
}

@media (max-width: 768px) {
  .chat-plugin {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 9999; /* encima de todo */
  }

  .chat-plugin .h-48 {
    height: 6rem;
  }

  .chat-plugin .w-96 {
    width: 12rem !important;
  }

  .chat-plugin #chat-container {
    width: 100% !important;
    height: 100% !important;
  }

  .chat-plugin .max-w-6xl {
    width: 100% !important;
  }

  .chat-plugin .chat-inner {
    width: 94%;
  }

  .chat-plugin .bubble.user {
    margin-right: 0;
  }

  .chat-plugin .max-w-3xl{
    max-width: 100% !important;
  }

  .chat-plugin .h-65p {
    height: 100% !important;
  }

  .chat-plugin .bottom-6 {
    bottom: 2.3rem;
  }

  .chat-plugin .right-2 {
    right: 0.1rem;
  }

  .chat-plugin .bottom-12 {
    bottom: 0rem;
  }

  .chat-plugin .right-12 {
    right: 0rem;
  }

}
