:root {
  --color-1: #7d54d1;
  --color-2: #56b3cb;
  --color-3: #cd2aa0;
  --color-4: #ea635c;

  --color-black: #000000;
  --color-white: #ffffff;
  --color-gray: #212123;
  --color-gray-2: #424242;
}

/*
  Añade esta clase a tu archivo CSS.
  Evitará que el body pueda ser escrolado cuando el sidebar esté visible.
*/
body.no-scroll {
    overflow: hidden;
}

/* ==== GENERAL ==== */
html,
body {
  height: 100%;
}

body {
  background-color: #1d1d1d;
  font-family: Arial, sans-serif;
  margin: 0;
  height: 100vh;
  /* width: 100vw; */
}

.form-control,
.form-select,
.btn,
.list-group,
.card {
  border-radius: 0;
}

.form-floating > label::after {
  background-color: unset !important;
}

.btn {
  border-radius: 0;
  border: 0;
  font-weight: 900;
}

.btn.loading {
  opacity: 0.5;
  pointer-events: none;
}

.btn.btn-lg {
  padding: 20px;
}

.btn.btn-primary {
  background-color: var(--color-1);
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.btn.btn-chat {
  background-color: var(--color-1);
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 20px;
  border-top-right-radius: 20px;
  color: white;
}

.btn.btn-primary:hover {
  background-color: color-mix(in srgb, var(--color-1) 80%, var(--color-black) 20%);
}

.btn.btn-primary:focus,
.btn.btn-primary:focus-visible,
.btn.btn-primary:active {
  background-color: color-mix(in srgb, var(--color-1) 60%, var(--color-black) 40%);
}

.btn.btn-link {
  line-height: 1;
}

.text-lightgray {
  color: #888888 !important;
}

/* ==== LOGIN ==== */
#main-section {
  height: 100vh;
}

.text-center-mb-4 {
  margin-bottom: 0rem !important;
  text-align: center !important;
}

#main-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
}

#main-container .login-title {
  color: white;
  font-weight: 900;
}

#main-container .login-title span {
  background: linear-gradient(45deg, var(--color-2), var(--color-3), var(--color-4));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  white-space: nowrap;
}

.content-wrapper {
  width: 450px;
}

@media (max-width: 500px) {
  .content-wrapper {
    width: 95% !important;
    padding-bottom: 50px;
    margin-left: 20px;
    margin-right: 20PX;
  }

  #main-container {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  width: 100%;
  height: 100%;
}
}

.change-password-visibility {
  padding-right: 45px !important;
}

/* === ESTILOS PARA TARJETA DE REFERIDO === */
.referrer-card {
    max-width: 400px;
    border-radius: 1rem !important;
    border: 2px solid var(--color-1) !important; /* Color del botón Crear cuenta */
    background-color: rgba(245, 245, 245, 0.1) !important; /* Fondo gris claro transparente */
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1) !important;
    backdrop-filter: blur(4px);
}

.referrer-avatar {
    width: 56px !important;
    height: 56px !important;
    object-fit: cover !important;
    border-radius: 50% !important;
    border: 2px solid #d1d5db !important;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08) !important;
    margin-right: 16px !important;
}

.referrer-info {
    line-height: 1.3;
}

.referrer-label {
    color: rgba(255, 255, 255, 0.8) !important;
    font-size: 1rem !important;
    margin-bottom: 2px !important;
}

.referrer-name {
    color: white !important;
    font-weight: 600 !important;
    font-size: 1.2rem !important; /* Texto más grande */
    letter-spacing: 0.3px;
}

/* Efecto hover para mejor interactividad */
.referrer-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15) !important;
    transition: all 0.3s ease;
}

/* Versión responsive */
@media (max-width: 500px) {
    .referrer-card {
        max-width: 100% !important;
    }
    
    .referrer-name {
        font-size: 1rem !important;
    }
}

/* ==== CHAT ==== */
#chat-section {
  display: flex;
  height: 100vh;
  background-color: var(--color-black);
}

body.loading #chat-section {
  overflow: hidden;
  pointer-events: none;
  opacity: 0.5;
}

.spinner {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9999;
  text-align: center;
}

body.loading .spinner {
  display: block;
}

.accordion-wrapper {
  max-height: calc(100vh - 139px);
  overflow: auto;
  width: 90%!important;
}

#accordion-chat-list .accordion-button {
  background-color: var(--color-gray-2);
  border-radius: 0 !important;
  color: var(--color-white);
}

#accordion-chat-list .accordion-button::after {
  margin-left: 5px;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23ffffff'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e") !important;
}

#accordion-chat-list .accordion-button:focus {
  box-shadow: 0 0 0 0.25rem #7d54d140;
}

#accordion-chat-list .accordion-button:not(.collapsed) {
  background-color: var(--color-1);
}

#accordion-chat-list .accordion-item {
  border-radius: 0 !important;
  border: 0;
}

#accordion-chat-list .accordion-item .accordion-body {
  padding: 0;
}

#accordion-chat-list .change-chat {
  cursor: pointer;
  border: 0;
  border-bottom: 5px solid #e2dee6;
  transition: background-color 0.3s;
  -o-transition: background-color 0.3s;
  -moz-transition: background-color 0.3s;
  -webkit-transition: background-color 0.3s;
}

#accordion-chat-list .change-chat:hover {
  background-color: #e6ceff;
}

.badge-text-bg-primary-ms-auto {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 8px;
  margin-left: auto;
  border-radius: 12px; /* Forma circular */
  background-color: #c8187a; /* Color primario azul */
  color: white;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.sidebar {
  position: relative;
  top: 0;
  left: 0;
  width: 300px;
  height: 100vh;
  z-index: 9999; 
  background:black;
}

@media (max-width: 500px) {
  .sidebar {
    width: 0 !important;
    min-width: 0 !important;
    max-width: 0 !important;
    transition: width 0.3s !important;
    overflow: hidden !important;
    position: fixed !important;
    left: 0;
    top: 0;
    height: 100vh;
    z-index: 10000;
    background: transparent !important; /* Fondo transparente cuando está cerrado */
  }
  .sidebar.sidebar-expandida {
    width: 100vw !important;
    min-width: 100vw !important;
    max-width: 100vw !important;
    box-shadow: 0 0 20px #0008;
    background: #000 !important; /* Fondo negro solo cuando está abierto */
    overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  }
  .sidebar-toggle-icon {
    position: fixed !important;
    top: 16px !important;
    left: 16px !important;
    right: auto !important;
    z-index: 10001 !important;
    display: block !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    transition: left 0.3s, right 0.3s;
  }
  .sidebar-toggle-icon.toggle-right {
    left: auto !important;
    right: 16px !important;
  }
}

.contenedor-acordeon {
  position: absolute;
  top: 65px;
  bottom: 70px;
  left: 0;
  right: 0;
  padding: 0 1rem;
}

.chat-area {
  height: 100vh;
  width: calc(-300px + 100vw);
  display: flex;
  flex-direction: column;
}

.chat-title {
}

.chat-list {
  list-style: none;
  padding: 0;
}

.chat-list li {
  cursor: pointer;
}

.chat-content-wrapper {
  background-color: var(--color-gray);
  border-top-left-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
}

.chat-content {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  height: auto;
}

#typing-message {
  color: #ffffff;
  padding-left: 10px;
  padding-bottom: 0;
  margin: 0;
  min-height: unset;
  height: auto;
  font-size: 1em;
  line-height: 1.2;
}

/* Ajuste específico para móvil */
@media (max-width: 500px) {
  #typing-message {
    padding-bottom: 4px;
    margin: 0;
    min-height: unset;
    height: auto;
    font-size: 14px;
    line-height: 1.1;
  }

  .contenedor-acordeon {
  position: absolute;
  top: 65px;
  bottom: 50px;
  left: 0;
  right: 0;
  padding: 0 1rem;
}
}

.message-images {
  margin-bottom: 30px;
  width: 100%;
}

.msg-img {
  max-width: 100%;
  margin-top: 30px;
  margin-bottom: 30px;
}

.message .message-content {
  padding: 10px;
}

/* Asegura que imágenes en chat se ajusten al contenedor */
.chat-image {
  text-align: center;
  margin: 20px 0;
}
.chat-image img,
.message .message-content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* Burbuja de mensaje: no ocupar más del 90% del ancho en móvil */
.message .message-content {
  max-width: 90vw;   /* hasta el 90% del ancho de la ventana */
  word-wrap: break-word;  /* corta las palabras largas */
}

/* Para pantallas muy pequeñas, un poco más ceñido */
@media (max-width: 400px) {
  .message .message-content {
    max-width: 95vw;  /* casi todo el ancho, pero con un pequeño margen */
    padding: 10px;    /* ajustar padding si fuera necesario */
  }
}


.message.sent {
  text-align: right;
  margin-left: auto;
}

.message.received {
  text-align: left;
  margin-right: auto;
}

.message.sent .message-content {
    background-image: linear-gradient(45deg, var(--color-2), var(--color-3), var(--color-4));
    color: #ffffff;
    border-radius: 6px 6px 0 6px;
    margin-left: 15px;
    margin-top: 15px;
    margin-bottom: 15px;
    display: flex;
    flex-direction: column-reverse;
    align-items: flex-end;
    width: 90%;
    max-width: 90%;
}

.message.received .message-content {
    color: #ffffff;
    border-radius: 6px 6px 6px 0;
    padding: 30px;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

@media (max-width: 500px) {
    .message.received .message-content {
        /* background-color: var(--color-gray-2); */
        color: #ffffff;
        border-radius: 6px 6px 6px 0;
        margin-right: 10px;
        flex-direction: column;
        padding: 20px;
        font-size: 17px;
    }

  .message.sent {
  text-align: right;
  margin-left: auto;
  display: flex;
  justify-content: center;

}
}

.therapy-main-title {
  font-family: 'Montserrat', sans-serif; /* Fuente moderna */
  font-size: 2.2rem; /* Tamaño grande */
  font-weight: 700; /* Negrita */
  text-align: center; /* Centrado */
  margin: 25px 0; /* Espaciado */
  padding: 15px 0; /* Padding interno */
  line-height: 1.3; /* Altura de línea */
  text-shadow: 1px 1px 3px rgba(0,0,0,0.1); /* Sutil sombra */
  border-bottom: 2px solid #e9e1f9; /* Borde inferior */
  border-top: 2px solid #e9e1f9; /* Borde superior */
}

.therapy-section-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.5rem;
  font-weight: 600;
  margin: 30px 0 15px 0;
  padding: 10px 15px;
  border-radius: 8px;
  display: flex;
  align-items: center;
}

.preparation-title {
  background-color: #e8f5e9; /* Fondo verde claro */
  border-left: 5px solid #4caf50; /* Borde lateral verde */
  color: #2e7d32; /* Texto verde oscuro */
}

/* Estilo específico para Sesión (azul) */
.session-title {
  background-color: #e3f2fd; /* Fondo azul claro */
  border-left: 5px solid #2196f3; /* Borde lateral azul */
  color: #1565c0; /* Texto azul oscuro */
}

/* Estilo específico para Post-terapia (morado) */
.posttherapy-title {
  background-color: #f3e5f5; /* Fondo morado claro */
  border-left: 5px solid #9c27b0; /* Borde lateral morado */
  color: #7b1fa2; /* Texto morado oscuro */
}

/* Estilo específico para Precauciones (naranja/rojo) */
.warning-title {
  background-color: #fff3e0; /* Fondo naranja claro */
  border-left: 5px solid #ff9800; /* Borde lateral naranja */
  color: #e65100; /* Texto naranja oscuro */
}

/* Estilos para los iconos de los títulos */
.title-icon {
  margin-right: 12px;
  font-size: 1.3em;
  vertical-align: middle;
}

/* Icono específico para precauciones */
.warning-icon {
  color: #ff5722; /* Color rojo/anaranjado */
}

.therapy-title {
  font-size: 1.3rem;
  margin: 15px 0 10px 0;
  font-weight: 600;
}

.therapy-subtitle {
  font-size: 1.1rem;
  margin: 12px 0 8px 0;
  font-weight: 500;
}

.therapy-item, .therapy-point {
  margin: 8px 0;
  padding-left: 5px;
  list-style-type: none;
}

.therapy-item i, .therapy-point i {
  margin-right: 8px;
  font-size: 0.6rem;
}

.therapy-step {
  padding: 10px;
  border-radius: 5px;
  margin: 15px 0;
}

.therapy-step i {
  margin-right: 8px;
}

.therapy-divider {
  border-top: 1px dashed #ccc;
  margin: 20px 0;
}

.therapy-image {
  max-width: 100%;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  margin: 10px auto;
}

.image-caption {
  font-size: 0.8rem;
  color: #ffffff;
  text-align: center;
  margin-top: 5px;
}

.therapy-note {
  background-color: #fff8e1;
  padding: 10px;
  border-left: 3px solid #ffc107;
  margin: 15px 0;
  font-size: 0.9rem;
}

.therapy-example {
  color: #666;
  font-style: italic;
  font-size: 0.9rem;
}

/*INICIO*/
.welcome-assistant {
    position: relative;
    padding: 17px;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    z-index: 1;
}

/* Para pantallas menores a 1440px */
@media (max-width: 1440px) {
  .welcome-assistant {
    padding: 5px; /* Solo cambia esto en pantallas pequeñas */
  }
}

@media (max-width: 1024px) {
  .welcome-container {
    gap: 8px; /* Reducir el espacio entre elementos */
  }
}

@keyframes rotateLight {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Mejoras para el contenido */
.welcome-text h3 {
    text-shadow: 0 0 10px rgba(94, 234, 212, 0.7);
    position: relative;
}

.welcome-text h3::after {
    content: '';
    display: block;
    width: 50px;
    height: 2px;
    background: linear-gradient(90deg, #5eead4, transparent);
    margin: 5px 0;
}

.btn-outline-light {
    transition: all 0.3s ease;
    z-index: 2;
}

.btn-outline-light:hover {
    background-color: rgba(94, 234, 212, 0.2);
    box-shadow: 0 0 10px rgba(94, 234, 212, 0.5);
}


/* Efecto galáctico completo solo para Chamán Korí */
.welcome-assistant[data-id="chaman_kori"] {
    position: relative;
    overflow: hidden;
    border: none;
    background: linear-gradient(145deg, #0f0c29, #302b63);
    box-shadow: 0 4px 20px rgba(200, 24, 122, 0.3);
}

/* -------------------------------------------------- */
/* EFECTO GALÁCTICO (fondo estrellado y nebulosas) */
/* -------------------------------------------------- */

/* Galaxia de fondo - Nebulosas de colores */
.welcome-assistant[data-id="chaman_kori"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(200, 24, 122, 0.15) 0%, transparent 25%),
        radial-gradient(circle at 80% 70%, rgba(148, 87, 235, 0.15) 0%, transparent 25%),
        radial-gradient(circle at 40% 60%, rgba(94, 234, 212, 0.1) 0%, transparent 25%);
    background-size: 200% 200%;
    animation: galaxyMove 20s infinite alternate;
    z-index: 0;
}

/* Estrellas titilantes */
.welcome-assistant[data-id="chaman_kori"]::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 10% 20%, white 1px, transparent 2px),
        radial-gradient(circle at 90% 80%, white 1px, transparent 2px),
        radial-gradient(circle at 30% 50%, white 1px, transparent 2px),
        radial-gradient(circle at 70% 30%, white 1px, transparent 2px);
    background-size: 100px 100px;
    animation: twinkle 5s infinite ease-in-out;
    opacity: 0.5;
    z-index: 0;
}

/* Nebulosa que se mueve */
.welcome-assistant[data-id="chaman_kori"] .galaxy-nebula {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(200, 24, 122, 0.1) 0%, transparent 50%);
    animation: nebulaRotate 15s linear infinite;
    z-index: 0;
}

/* -------------------------------------------------- */
/* EFECTO COMETA ROSA EN EL BORDE (#c8187a) */
/* -------------------------------------------------- */

.welcome-assistant[data-id="chaman_kori"] .cometa-border {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 8px;
    background: linear-gradient(
        90deg,
        rgba(200, 24, 122, 0) 0%,
        rgba(200, 24, 122, 0.8) 50%,
        rgba(200, 24, 122, 0) 100%
    );
    background-size: 200% 100%;
    -webkit-mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    padding: 2px;
    animation: borderRunner 3s linear infinite;
    z-index: 1;
}

/* -------------------------------------------------- */
/* ANIMACIONES */
/* -------------------------------------------------- */

@keyframes galaxyMove {
    0% {
        background-position: 0% 0%;
    }
    100% {
        background-position: 100% 100%;
    }
}

@keyframes twinkle {
    0%, 100% {
        opacity: 0.3;
    }
    50% {
        opacity: 0.8;
    }
}

@keyframes nebulaRotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes borderRunner {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* -------------------------------------------------- */
/* ESTILOS DEL CONTENIDO */
/* -------------------------------------------------- */

/* Asegurar que el contenido esté sobre los efectos */
.welcome-assistant[data-id="chaman_kori"] > * {
    position: relative;
    z-index: 2;
}

/* Estilo especial para el texto */
.welcome-assistant[data-id="chaman_kori"] .welcome-text h3 {
    color: #c8187a;
    text-shadow: 0 0 8px rgba(200, 24, 122, 0.4);
}

/* Efecto en la imagen */
.welcome-assistant[data-id="chaman_kori"] img {
    filter: drop-shadow(0 0 5px rgba(200, 24, 122, 0.5));
    transition: transform 0.3s ease;
}

.welcome-assistant[data-id="chaman_kori"]:hover img {
    transform: scale(1.05);
}

/*FIN*/

.welcome-wrapper {
  display: flex;
  align-items: center;
  height: 100%;
  position: relative;
}

.welcome-logo {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  z-index: 0;
  opacity: 0.5;
}

.welcome-container {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  gap: 16px;
  z-index: 1;
}

.welcome-container .welcome-assistant {
  flex-basis: calc(50% - 16px);
  width: calc(50% - 16px);
  display: flex;
  align-items: center;
  gap: 16px;
  border: 2px solid #999999;
  background-color: var(--color-gray-2);
  cursor: pointer;
  transition: transform 0.5s, box-shadow 0.5s;
  -o-transition: transform 0.5s, box-shadow 0.5s;
  -moz-transition: transform 0.5s, box-shadow 0.5s;
  -webkit-transition: transform 0.5s, box-shadow 0.5s;
}

.welcome-container .welcome-assistant:hover {
  transform: scale(1.05);
  -o-transform: scale(1.05);
  -moz-transform: scale(1.05);
  -webkit-transform: scale(1.05);
  box-shadow: 0 0 10px 0 #7d54d1;
}

.welcome-container .welcome-assistant:active {
  transform: scale(1.03);
  -o-transform: scale(1.03);
  -moz-transform: scale(1.03);
  -webkit-transform: scale(1.03);
  box-shadow: 0 0 5px 0 #7d54d1;
}

.welcome-container .welcome-assistant img {
  padding: 10px;
  height: 140px;
}

#input-msg {
  height: 85px;
  resize: none;
  background-color: var(--color-gray-2);
  color: var(--color-white);
  border-bottom-left-radius: 20px;
  border-top-left-radius: 20px;
}

#input-msg::placeholder {
  color: var(--color-white);
}

#input-msg:focus {
  outline: none;
  box-shadow: 0 0 0 0.25rem #7d54d140;
}

.input-group {
    position: relative;
    display: flex
;
    flex-wrap: wrap;
    align-items: stretch;
    width: 100%;
    padding: 5px;
}

.chat-avatar {
  /* background: var(--color-gray);; */
  margin-right: 8px;
  /* overflow: hidden; */
  display: inline-block;
}

.chat-avatar img {
  width: 35px;
  height: 35px;
  margin-bottom: 3px;
  object-fit: cover;
  border-radius: 50%; /* Hace la imagen completamente redonda */
  border: 2px solid #fff; /* Borde blanco de 2px */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Opcional: sombra suave */
  box-sizing: border-box; /* Asegura que el borde no aumente el tamaño total */
}

.chat-name {
  font-size: 18px;
}

.menu-avatar {
  height: 24px;
  object-fit: cover;
}

.btn-btn-primary-flags{
  background-color: var(--color-1);
  padding: 12px;
  color: white;
  font-weight: 700;
  font-size: 17px;
}

.btn-btn-primary-flags.dropdown-toggle::after {
    display: inline-block;
    margin-left: 8px;
    vertical-align: middle;
    content: "";
    border-top: 0.35em solid white;
    border-right: 0.35em solid transparent;
    border-bottom: 0;
    border-left: 0.35em solid transparent;
    transition: transform 0.3s ease;
}

@media (max-width: 768px) {
        .btn-btn-primary-flags{
        background-color: var(--color-1);
        padding: 10px;
        color: white;
        font-weight: 600;
        font-size: 15px;
      }
}

/* Versión móvil (max-width: 768px) */
@media (max-width: 768px) {
  .btn-user {
        padding: 8px 12px !important;
        font-size: 17px !important;
        font-weight: 600;
        min-width: 120px;
        background-color: #7d54d1 !important;
        border-color: #7d54d1 !important;
        color: white !important;
        display: flex !important
;
        align-items: center;
        justify-content: space-between;
    }

  .menu-avatar {
    /* Tamaño de la imagen de perfil reducido */
    height: 28px !important;
    object-fit: cover;
    margin-right: 3px;
  }

  .dropdown-toggle::after {
    /* Ajuste del icono de flecha */
    margin-left: 4px !important;
    font-size: 12px;
  }

  /* Efecto hover para móvil */
  .btn-user:hover {
    background-color: #7d54d1 !important;
    transform: scale(1.02);
  }

  /* Estado activo */
  .btn-user:active {
    transform: scale(0.98);
  }
}

/* Versión desktop (opcional para mantener consistencia) */
@media (min-width: 769px) {
  .btn-user {
    padding: 10px 16px;
    font-size: 16px;
  }
  
  .menu-avatar {
    width: 32px;
    height: 32px;
  }
}

.punto {
  opacity: 0;
  animation: puntoAnim 1.5s infinite;
  margin-left: 2px;
}

.punto:nth-child(2) {
  animation-delay: 0.5s;
}

.punto:nth-child(3) {
  animation-delay: 1s;
}

@keyframes puntoAnim {
  0% {
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

#input-msg,
#button-send {
  transition: opacity 0.3s ease-in-out;
}

#input-msg:disabled,
#button-send:disabled {
  opacity: 0.3;
}

.new-chat-btn {
  width: 100%;
  height: 42px;
}

.div-chat-btn {
  position: absolute;
  top: 65px;
  z-index: 10000;
  width: 90%;
}

.div-chats {
  position: absolute;
  top: 50px;
  bottom: 1px;
  z-index: 10000;
  width: 269px;
}

.disp-none {
  display: none;
}

.profile-header {
  background-color: var(--color-black);
}

.dropdown-item i {
  width: 20px;
  text-align: center;
  margin-right: 1px;
}

.dropdown-item {
    display: block;
    width: 100%;
    padding: 6px 16px; /* Más altura (original: ~8px 16px) */
    line-height: 1.5; /* Mejor alineación vertical */
    clear: both;
    font-weight: 400;
    font-size: 18px;
    color: var(--bs-dropdown-link-color);
    text-align: inherit;
    text-decoration: none;
    white-space: nowrap;
    background-color: transparent;
    border: 0;
    border-radius: var(--bs-dropdown-item-border-radius, 0);
    transition: all 0.3s ease; /* Suaviza efectos hover/active */
}

.dropdown-item:hover {
    background-color: #f0f8ff; /* Azul claro (cambia al color que prefieras) */
    color: #984fc8; /* Color de texto al hacer hover */
}

.dropdown-item.active {
    background-color: #ffffff; /* Color de fondo para activo */
    color: hsl(0, 0%, 0%); /* Color de texto para activo */
}

.dropdown-menu {
  color: var(--bs-dropdown-link-active-color);
  text-decoration: none;
  background-color: #ffffff;
}

.edit-profile,
.accounting {
  margin-top: 80px;
}
.edit-profile .row {
  justify-content: center;
}

.show-avatar {
  width: 300px;
  height: 300px;
  object-fit: cover;
}

.edit-avatar {
  position: relative;
  width: 326px;
}

.btn-hide-menu {
  all: unset;
  cursor: pointer;
}

.btn-show-menu {
  all: unset;
  cursor: pointer;
  display: none;
}

.div-assist {
  background-color: #212123;
  color: white;
  font-size: 18px;
  height: 100%;
}

.div-assist:hover {
  background-color: #7d54d1;
}

.div-buy {
  background-color: #7d54d1;
  color: white;
  font-size: 18px;
  height: 100%;
  width: 100%;
}

.div-buy:hover {
  background-color: #cd2aa0;
}

.div-btns {
  width: auto;
}

.btn-share {
  padding: 0px 10px;
  border-radius: 20px;
}

.btn-share:hover {
  background-color: #7d54d1;
  color: white;
}

.menu-assist {
  background-color: #424242;
  color: white;
  left: 290px;
  border-radius: 15px;
  border: 1px solid grey;
}

.menu-assist > ul {
  list-style-type: none;
  padding-left: 10px;
}

.li-share:hover {
  color: #b692ff;
}

.li-rename:hover {
  color: #b692ff;
}

.li-delete:hover {
  color: red;
}

.li-gen-delete:hover {
  color: red;
}

.li-gen-rename:hover {
  color: #b692ff;
}

#editPopUp {
  display: none;
}

.logo-welcome {
  width: 150px;
  height: auto;
}

.modal-rename {
  color: var(--color-white);
  background-color: var(--color-gray-2);
}

.modal-share {
  color: var(--color-white);
  background-color: var(--color-gray-2);
}

.logo-share > img {
  width: 300px;
  height: auto;
}

.link {
  all: unset;
  color: var(--color-3);
  cursor: pointer;
}

.chat-content-share {
  border-radius: 12px;
}

.affiliate-hero {
            background-color: #2c3e50;
            color: white;
            padding: 3rem 0;
            border-radius: 0 0 30px 30px;
            margin-bottom: 2rem;
        }
        
        .affiliate-content {
            padding: 1rem;
        }
        
        .affiliate-content h1 {
            font-size: 2.5rem;
            margin-bottom: 1.5rem;
            font-weight: bold;
        }
        
        .affiliate-content p {
            margin-bottom: 1rem;
            font-size: 1.1rem;
        }
        
        .affiliate-content p.lead {
            font-size: 1.3rem;
            font-weight: 500;
        }
        
        .affiliate-content p.highlight {
            font-weight: bold;
            color: #f8d347;
        }
        
        .affiliate-benefits {
            list-style-type: none;
            padding-left: 0;
            margin: 1.5rem 0;
        }
        
        .affiliate-benefits li {
            margin-bottom: 0.8rem;
            padding-left: 1.5rem;
            position: relative;
            font-size: 1.1rem;
        }
        
        .affiliate-benefits li:before {
            content: "•";
            color: #f8d347;
            font-size: 1.5rem;
            position: absolute;
            left: 0;
            top: -3px;
        }
        
        .affiliate-image img {
            border-radius: 15px;
            box-shadow: 0 10px 20px rgba(0,0,0,0.2);
            background-color: #fff;
            max-height: 400px;
            width: auto;
            margin: 0 auto;
            display: block;
        }
        
        @media (max-width: 768px) {
            .affiliate-hero {
                padding: 2rem 0;
                border-radius: 0 0 20px 20px;
            }
            
            .affiliate-content {
                text-align: center;
                padding: 1rem 0.5rem;
            }
            
            .affiliate-content h1 {
                font-size: 2rem;
            }
            
            .affiliate-image {
                margin-bottom: 1.5rem;
                text-align: center;
            }
            
            .affiliate-image img {
                max-height: 300px;
            }
            
            .affiliate-benefits {
                text-align: left;
                display: inline-block;
            }
            .div-btns {
            width: 90%;
}
        }

.referrals {
  margin-top: 0px;
}

.referrals-table {
  width: 350px;
  word-break: break-word;
  white-space: normal;
}

@media (max-width: 500px) {
  .logo-head{
    margin-top: 4px !important;
    position: absolute;
  }

  .edit-profile,
  .accounting {
    margin-top: 50px;
  }

  .edit-avatar-buttom {
    width: 35px;
    height: 35px;
  }

  .show-avatar {
    width: 180px;
    height: 180px;
    object-fit: cover;
  }

  .edit-avatar {
    width: 204px;
  }

  #form-profile {
    margin-top: 70px !important;
  }

  .message {
    margin-bottom: 30px;
    width: 100%;
  }

  .chat-area {
    width: 100% !important;
    height: 100dvh;
    min-height: 0;
    max-height: 100dvh;
    display: flex;
    flex-direction: column;
  }
  .chat-content-wrapper {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
    max-height: 100dvh;
  }
  .chat-content {
    flex: 1 1 auto;
    min-height: 0;
    height: 0;
    margin: 0 !important;
    padding: 0 !important;
    overflow-y: auto;
  }
}

.edit-avatar-buttom {
  background-color: var(--color-black);
  padding: 25px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  position: absolute;
  bottom: 0px;
  right: 15px;
  cursor: pointer;
}

.edit-avatar-buttom i {
  color: var(--color-white);
}

#avatar-file {
  display: none;
}

#form-profile {
  margin-top: 100px;
}

.btn-custom {
  background-color: transparent;
  border: 0px;
  color: var(--color-white);
}

.accounting h3,
.accounting h4,
.accounting hr,
.accounting p {
  color: var(--color-white);
}

#accountingChart {
  background-color: black;
  border-radius: 10px;
  min-width: 100%;
  min-height: 175px;
}

.menu-refer {
  border: 2px solid var(--color-1);
  padding: 8px;
  width: 265px;
  height: 60px;
  margin: 30px;
}

.swal2-container {
  z-index: 999999;
}

@media (max-width: 1199px) {
  .message {
    margin-bottom: 10px;
    max-width: unset;
  }

  .welcome-container {
  
  }

  .welcome-container .welcome-assistant {
    width: unset;
  }

  .welcome-wrapper {
    height: unset;
    min-height: 90%;
  }

  .welcome-logo {
    top: -19%;
  }
}

@media (max-width: 500px) {
  .welcome-wrapper {
    align-items: center;
    position: fixed;
    width: 100%;
  }

  .welcome-container {
    flex-direction: row;
    justify-content: center;        
  }

  .welcome-assistant {
    flex-direction: column;
    width: 50% !important;
    padding: 5px;
  }

  .welcome-message{
    display: none;
  }

  .welcome-container .welcome-assistant img {
    padding: 10px;
    padding-bottom: 0px;
    height: 75px;
  } 

  .welcome-container .welcome-text {
    text-align: center;
    font-size: 10px;
  }

  .welcome-logo {
    top: -30%;
  }

  .menu-assist {
    left: 200px;
    top: 30px;
  }

  .logo-index-text{
    font-size: 32px !important;
    font-weight: 700;
    
  }
  

  .welcome-logo img {
    width: 135px;
  }

  .logo-welcome{
    margin-bottom: 0 !important;
  }

  .chat-content{
    margin: 0 !important;
    padding: 0 !important;
  }

  .welcome-text h3{
    font-size: 15px;
  }

  .chat-content {
    /*height: calc(-240px + 100dvh);*/
    height: auto;
    min-height: 120px;
    flex: 1 1 auto;
  }

  #input-msg {
    height: 90px!important;
    font-size: 18px;
  }

  /*.text-container{
    position: fixed;
    bottom: 0px;
    padding-bottom: 0!important;
  }
  */

  #typing-message {
    font-size: 14px;
  }

  .chat-title {
      font-size: 20px;
  }
}

.chat-logo-img {
    width: 200px; /* Puedes ajustar este valor según necesites */
    height: auto; /* Mantiene la proporción de la imagen */
}

.sidebar-toggle-icon {
    width: 28px;       /* Puedes ajustar el tamaño aquí */
    height: 28px;
    filter: brightness(0) invert(1); /* Hace la imagen blanca */
    cursor: pointer;
    transition: transform 0.3s ease;
}

@media (max-width: 768px) {
      .sidebar-toggle-icon {
    width: 35px;
    height: 35px;
    filter: brightness(0) invert(1);
    cursor: pointer;
    transition: transform 0.3s ease;
  }

  .sidebar {
  position: fixed;
  }

  .div-chats {
    position: absolute;
    top: 50px;
    bottom: 50px;
    z-index: 10000;
    width: 269px;
  }

}

.sidebar-toggle-icon.rotated {
    transform: rotate(180deg);
}

@media (max-width: 500px) {
  .hide-mobile {
    display: none !important;
  }
}


@media (max-width: 768px) {
    .chat-logo-img {
        width: 220px;
    }
}

@media (max-width: 1200px) {
  .chat-header {
    margin-left: 45px;
  }

  .titulo-acordeon .fa-solid {
    position: relative;
    z-index: 10;
  }

  .chat-content-wrapper {
    background-color: var(--color-gray);
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    overflow: hidden;
    padding-bottom: 10px;
  }
}

.button-container {
  display: flex;
  background-color: var(--color-1);
  min-width: 310px;
  padding: 0 10px;
  height: 40px;
  align-items: center;
  justify-content: center;
  gap: 10px;
}


.button-refer {
  outline: 0 !important;
  border: 0 !important;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: all ease-in-out 0.3s;
  cursor: pointer;
}

.button-refer:hover {
  transform: translateY(-3px);
}

.button-refer.active {
  color: black;
}

.icon {
  font-size: 20px;
}

.pagination-container {
    display: flex;
    justify-content: center;
    gap: 5px;
}

.pagination-container button {
    min-width: 32px;
    text-align: center;
}

.pagination-container .active-page {
    background-color: var(--color-1);
    color: #fff;
}



#pagination2, #pagination3 {
    display: none;
}

button.active-page {
    background-color: var(--color-1) !important;
    color: #fff !important;
    border-color: #fff !important;
}



.dot-spinner {
  --uib-size: 2.8rem;
  --uib-speed: 0.9s;
  --uib-color: #183153;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  height: var(--uib-size);
  width: var(--uib-size);
}

.dot-spinner__dot {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  height: 100%;
  width: 100%;
}

.dot-spinner__dot::before {
  content: "";
  height: 20%;
  width: 20%;
  border-radius: 50%;
  background-color: var(--color-1);
  transform: scale(0);
  opacity: 0.5;
  animation: pulse0112 calc(var(--uib-speed) * 1.111) ease-in-out infinite;
  box-shadow: 0 0 20px var(--color-1, 0.1);
}

.dot-spinner__dot:nth-child(2) {
  transform: rotate(45deg);
}

.dot-spinner__dot:nth-child(2)::before {
  animation-delay: calc(var(--uib-speed) * -0.875);
}

.dot-spinner__dot:nth-child(3) {
  transform: rotate(90deg);
}

.dot-spinner__dot:nth-child(3)::before {
  animation-delay: calc(var(--uib-speed) * -0.75);
}

.dot-spinner__dot:nth-child(4) {
  transform: rotate(135deg);
}

.dot-spinner__dot:nth-child(4)::before {
  animation-delay: calc(var(--uib-speed) * -0.625);
}

.dot-spinner__dot:nth-child(5) {
  transform: rotate(180deg);
}

.dot-spinner__dot:nth-child(5)::before {
  animation-delay: calc(var(--uib-speed) * -0.5);
}

.dot-spinner__dot:nth-child(6) {
  transform: rotate(225deg);
}

.dot-spinner__dot:nth-child(6)::before {
  animation-delay: calc(var(--uib-speed) * -0.375);
}

.dot-spinner__dot:nth-child(7) {
  transform: rotate(270deg);
}

.dot-spinner__dot:nth-child(7)::before {
  animation-delay: calc(var(--uib-speed) * -0.25);
}

.dot-spinner__dot:nth-child(8) {
  transform: rotate(315deg);
}

.dot-spinner__dot:nth-child(8)::before {
  animation-delay: calc(var(--uib-speed) * -0.125);
}

@keyframes pulse0112 {
  0%,
  100% {
    transform: scale(0);
    opacity: 0.5;
  }

  50% {
    transform: scale(1);
    opacity: 1;
  }
}

.logo-index{
  width: 46px;
}

.logo-index-text{
  font-size: 29px;
  background: linear-gradient(45deg, var(--color-2), var(--color-3), var(--color-4));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  white-space: nowrap;
  cursor: default;
  user-select: none;
}

.btn-btn-cap-bot {
  background-color: #c81081;
  color: white;
  width: 100% !important;
  padding: 15px;
  font-size: 20px;
  font-weight: bold;
}

.btn.btn-cap {
  background-color: #c81081;
  margin: 10px;
  color: white;
}

.referral-card {
    background-color: #1e1e1e;
    border: 1px solid #444;
    color: white;
}
.referral-card strong {
    color: #b9b9b9;
}
.referral-card img {
    border: 2px solid #ccc;
}

/* Variables de color */
:root {
  --wallet-bg: #7e3ff2;    /* Púrpura */
  --wallet-text: #ffffff;  /* Blanco */
}

/* Contenedor de tarjetas */
.wallets {
  display: flex !important;
  flex-wrap: nowrap;       /* Una sola línea */
  align-items: flex-start; /* Arriba de todo */
  margin-bottom: 2rem;
}

/* Columnas que contienen tarjeta */
.wallet-card {
  flex: 0 0 140px; /* ancho fijo igual para todas */
}

/* 2) La gran tarjeta ocupa el espacio restante */
.subscription-card-col {
  flex: 1 1 auto;          /* crece para llenar espacio sobrante */
  min-width: 45%;        /* ancho mínimo */
}

/* Asegurar que rellene su contenedor */
.subscription-card {
  width: 100%;
}

/* 3) Las wallet-card mantienen ancho fijo */
.wallet-card {
  flex: 0 0 140px;
}

/* 4) Ajustes responsive: en móviles apilan */
@media (max-width: 768px) {
  .wallets {
    flex-wrap: wrap;       /* permitir varias filas */
    justify-content: center;
  }
  .subscription-card-col,
  .wallet-card {
    flex: 0 0 100%;        /* ocupan todo el ancho */
    max-width: 400px;      /* opcional */
  }
}

/* Estilo de la tarjeta interna */
.wallet-card .card {
  background-color: var(--wallet-bg) !important;
  color: var(--wallet-text) !important;
  border: none;
  border-radius: 1rem;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
}

.wallet-card .card:hover {
  transform: translateY(-4px);
}

/* Título pequeño */
.wallet-card .card h6 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: 0.5rem;
}

/* Número grande */
.wallet-card .card p.h4 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
}

/* Botón “USAR” */
.wallet-card .card .btn-sm {
  margin-top: 0.5rem;
  background-color: var(--wallet-text) !important;
  color: var(--wallet-bg) !important;
  border-radius: 1rem;
  padding: 0.3rem 0.8rem;
  font-size: 0.75rem;
  font-weight: 600;
  transition: background-color 0.2s;
}

.wallet-card .card .btn-sm:hover {
  background-color: #f0f0f0 !important;
}

/* Responsive en móviles */
@media (max-width: 576px) {
  .wallets {
    justify-content: center;
  }
  .wallet-card {
    flex: 0 0 45%;
  }
}

:root {
  --wallet-bg: #7e3ff2;
  --wallet-text: #fff;
  --sub-bg: #f3e8ff;
  --sub-border: #7e3ff2;
}

/* Contenedor principal de las 4 columnas */
.row.wallets {
  display: flex !important;
  flex-wrap: nowrap;
  margin-bottom: 2rem;
  align-items: flex-start;
}

/* Columna Suscripción */
.subscription-card-col {
  flex: 1 1 0%;
  min-width: 0;
}

/* --------------------------------------------------
   Subscripción / Compra única card
   -------------------------------------------------- */
.subscription-card {
  background: var(--sub-bg);
  border: 2px solid var(--sub-border);
  border-radius: 2rem;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.subscription-card .plans {
  display: flex;
  width: 100%;
  align-items: center;
  color: var(--color-black);
}

.subscription-card .plans-chaman {
  display: flex;
  width: 100%;
  align-items: center;
  color: var(--color-black);
}
.subscription-card-btn {
  margin-top: 1rem;
  border-radius: 1rem;
  align-self: center;
}

.row-gy-3 {
  display: flex;
  flex-direction: column;
}

@media (max-width: 768px) {
  .row-gy-3 {
  display: flex;
  flex-direction: row;
  justify-content: space-around;
}
.subscription-card .plans-chaman {
  display: flex;
  width: 100%;
  align-items: center;
  color: var(--color-black);
  flex-direction: column;
}
  
}

/* Tarjetas pequeñas */
.wallet-card {
  background-color: var(--wallet-bg);
  color: var(--wallet-text);
  border-radius: 1rem;
  padding: 1rem;
  text-align: center;
  margin: 5px;
  max-width: 95%;
  max-height: 135px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.wallet-card h6 {
  font-size: 0.75rem;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.wallet-card p.h4 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
}

/* Tarjeta grande Ganados disponibles */
.wallet-card-large {
  background-color: var(--wallet-bg);
  color: var(--wallet-text);
  border-radius: 1.5rem;
  padding: 1.5rem;
  text-align: center;
  min-height: 285px;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
}

.wallet-card-large h6 {
  font-size: 22px;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.wallet-card-large p.h4 {
  font-size: 2rem;
  font-weight: 700;
  margin: 0.5rem 0;
}
.wallet-card-large .btn-sm {
  background: var(--wallet-text);
  color: var(--wallet-bg);
  border-radius: 1rem;
  padding: 0.3rem 0.8rem;
}

.plans {
    position: relative; /* Necesario para que el posicionamiento absoluto funcione correctamente */
}

/* Estilos específicos para la tarjeta VIP */
.plans .plan.vip h5,
.plans .plan.vip p,
.plans .plan.vip .price,
.plans .plan.vip strong {
  color: var(--color-black) !important; /* Fuerza el color negro */
}

/* Estilos para el badge de oferta (opcional) */
.plans .badge-offer {
  color: var(--color-white) !important;
  background-color: var(--color-primary) !important;
}

/* Estilos para la tarjeta de compra única (si es necesario) */
.plans .plan.onetime h5,
.plans .plan.onetime p,
.plans .plan.onetime .price,
.plans .plan.onetime strong {
  color: black !important;
}

.h5, h5 {
    font-size: 1.25rem;
    font-weight: 800;
}

.badge-fixed {
    position: absolute;
    right: -25px;
    top: 20px;
    z-index: 10;
}

.fixed-badge-image {
    width: 80px;       /* Tamaño fijo en píxeles (ajusta según necesites) */
    height: auto;      /* Mantiene la proporción de la imagen */
    display: block;    /* Elimina espacios no deseados */
}

.iconos-chat {
    margin-left: 20px;
    margin-top: 5px;
}

.lesson-indicator {
    font-size: 0.8em;
    color: #777;
    margin-top: 8px;
    display: block;
}

/* --- ESTILOS FINALES CON ESTADO 'is-loading' --- */

.input-area-top {
  display: flex;
  align-items: center;
  padding: 5px 10px;
  background-color: #000;
}

.upload-container {
  width: 48%;
  display: flex;
  align-items: center;
  gap: 10px;
}

.spinner-container {
  width: 55%;
  height: 45px;
  display: flex;
  justify-content: left;
  align-items: center;
}


/* 2. ESTILOS DE LA ANIMACIÓN */

/* Contenedor del spinner */
#spinner-wrapper {
  position: relative;
  width: 40px;
  height: 40px;
}

/* Círculo exterior: OCULTO POR DEFECTO */
#outer-spinner {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 5px solid rgba(125, 84, 209, 0.2);
  border-top-color: #7d54d1;
  animation: spin 1s linear infinite;
}

/* Estrella interior: SIEMPRE VISIBLE Y ESTÁTICA POR DEFECTO */
#inner-star {
  position: absolute;
  animation: heartbeat 2s infinite ease-in-out;
  will-change: filter, transform;
  image-rendering: auto;
  top: 50%;
  left: 50%;
  /* La centramos y la dejamos derecha (rotate(0deg)) por defecto */
  transform: translate(-50%, -50%) rotate(0deg); 
  height: 30px;
  width: 30px;
  /* IMPORTANTE: La propiedad 'animation' se ha movido al estado .is-loading */
}

/* 3. ESTADOS CUANDO SE ESTÁ CARGANDO */

/* Cuando el wrapper tiene la clase .is-loading, el CÍRCULO APARECE */
#spinner-wrapper.is-loading #outer-spinner {
  display: block;
}

/* Cuando el wrapper tiene la clase .is-loading, APLICAMOS LA ANIMACIÓN a la ESTRELLA */
#spinner-wrapper.is-loading #inner-star {
  /* Al añadir la clase, la animación se aplica y comienza a ejecutarse */
  animation: spin-paused 5s infinite;
}


/* 4. DEFINICIÓN DE LAS ANIMACIONES */
@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes spin-paused {
  /* Este transform es necesario para que la estrella no se "mueva" al iniciar la animación */
  0%   { transform: translate(-50%, -50%) rotate(0deg); }
  90%  { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes heartbeat {
    0%, 100% {
        filter: brightness(1) drop-shadow(0 0 5px #c8187a);
    }
    50% {
        filter: brightness(2) drop-shadow(0 0 8px #7d54d1);
    }
}

#inner-star {
    animation: heartbeat 4s infinite ease-in-out;
}

/* 1) Cada hilo es relativo para posicionar el dropdown dentro */
.list-group-item.change-chat {
  position: relative; /* antes no lo tenía */
}

/* 2) El dropdown ya no es fixed, sino absolute */
.menu-assist.position-fixed {
  position: absolute !important;
}

.upload-icon-container {
  display: flex; align-items: center; gap: 10px; padding: 10px; color: white;
}

.message.error .message-content {
    background-color: #ffe5e5;
    color: #d63638;
    border-left: 4px solid #d63638;
    padding: 10px;
    margin: 5px 0;
    border-radius: 5px;
}


/* Estilo de la etiqueta de frecuencia */
.frequency-label {
    font-size: 14px;
    font-weight: bold;
    color: #c8187a;          /* mismo rosa que usas en --plyr-color-main */
    white-space: nowrap;
  }

  /* Opcional: quitar el margin-top duplicado */
  .audio-wrapper .plyr__controls {
    margin-top: 0;
  }
  .plyr__controls {
      background: #333 !important; 
      color: #fff !important;
      border-radius: 8px;
      box-shadow: 0 4px 12px rgba(0,0,0,0.5);
      padding: 8px 12px;
      margin-top: 8px;
      display: flex;
      align-items: center;
      margin-bottom: 10px;
    }
    :root {
      --plyr-color-main: #c8187a;           
      --plyr-range-rail-background: #444;   
      --plyr-range-fill-background: #c8187a;
      --plyr-control-icon-color: #eee;      
      --plyr-control-radius: 50%;           
    }
    .plyr__control {
      margin: 0 4px;
    }
    .plyr--audio .plyr__progress__container {
      flex: 1;
      height: 8px;
      border-radius: 4px;
      margin: 0 12px;
    }
    .plyr--audio .plyr__time {
      font-size: 12px;
      color: #fff;
      width: 60px;
      text-align: right;
      margin: 0 4px;
    }
    .plyr--audio .plyr__volume--horizontal {
      width: 80px;
      height: 6px;
      margin-left: 8px;
    }
    .plyr--audio .plyr__volume--horizontal .plyr__volume__level {
      background: linear-gradient(90deg, #c8187a, #c8187a);
      border-radius: 3px;
    }
    .plyr--audio .plyr__volume__display { display: none; }

    .plyr__controls__item plyr__control plyr__control--pressed {background: #c8187a;}
    button.plyr__controls__item.plyr__control { background: #c8187a;}
    

/* 3) Borra valores estáticos y colócalo junto al botón */
.menu-assist {
  /* quitamos sus left/top heredados */
  left: auto !important;
  top: auto !important;
  /* lo alineamos al borde derecho del <li> */
  right: 12px;
  /* justo debajo del botón (ajusta si tu padding vertical es distinto) */
  top: calc(50% + 10px);
  transform: translateY(50%) !important;
}

/* 4) En móvil elimina las reglas antiguas de left/top dentro del @media */
@media (max-width: 500px) {
  .menu-assist {
    left: auto !important;
    top: auto !important;
    right: 12px;
    top: calc(50% + 10px);
    transform: translateY(50%) !important;
  }
}



@media (max-width: 992px) {
     .iconos-chat {
    margin-left: 20px;
    }
  }

/* Responsive: solo en tablets y móviles hace wrap */
@media (max-width: 992px) {
  .row.wallets {
    flex-wrap: wrap !important;
    justify-content: center;
  }
  .subscription-card-col,
  .wallet-card-large,
  .col-md-6 > .row > .col-6 {
    flex: 0 0 100%;
    max-width: 400px;
  }
  .col-md-6 > .row > .col-6 {
    margin: 0 auto;
}

/*CHAT MARKDOWN*/
.formatted-content {
    font-family: inherit;
    line-height: 1.6;
    display: inline-block;
    text-align: left;
    vertical-align: middle;
}

.formatted-content h2 {
    color: #fff;
    font: 150% ADLaM Display;
    text-align: center;
    margin: 0.5em 0;
}

.formatted-content h3 {
    color: #ffffff;
    font-size: 1.1rem;
    margin: 0.4em 0;
}

.formatted-content strong {
    color: #ffffff;
    font-weight: bold;
}

.formatted-content em {
    font-style: italic;
}

.formatted-content img.msg-img {
    max-width: 100%;
    border-radius: 8px;
    margin: 0.5rem 0;
    display: block;
}

.formatted-content ul {
    padding-left: 1.5rem;
    list-style-type: disc;
    margin: 0.5em 0;
}

.formatted-content li {
    margin-bottom: 0.25em;
}

.formatted-content hr {
    border: 0;
    height: 1px;
    background-color: #e2e8f0;
    margin: 1em 0;
}

.formatted-content p {
    margin: 0.5em 0;
}
  
/* 1) La burbuja deja hueco a la izquierda */
.message.received {
  position: relative;
  padding-left: 40px;   /* espacio para el icono en la izquierda */
  padding-right: 0;     /* ya no necesitamos hueco a la derecha */
}

/* 2) El contenido sigue en flexbox */
.message.received .message-content {
  display: flex;
  align-items: flex-start;
  max-width: 100%;
}

/* 3) Texto ocupa todo el ancho disponible */
.message.received .formatted-content {
  flex: 1;
}

/* 4) Botón TTS pegado a la izquierda */
.message.received .tts-toggle {
  position: absolute;
  left: 12px;           /* a 12px del borde izquierdo de la burbuja */
  bottom: 8px;          /* o ajusta top:12px, según prefieras */
  background: transparent !important;
  border: none !important;
  padding: 0;
  cursor: pointer;
  color: #fff !important;
  font-size: 1.2em;
  outline: none;
  box-shadow: none;
}

/* — Contenedor principal relativo para posicionar los botones */
.message.received {
  position: relative;
  padding-left: 5px;   /* deja espacio a la izquierda */
}

/* — Flexbox interno */
.message.received .message-content {
  display: flex;
  align-items: flex-start;
}

/* — El texto ocupa todo el espacio disponible */
.message.received .formatted-content {
  flex: 1;
  max-width: 100%;
}

/* — Botón de TTS a la izquierda */
.message.received .tts-toggle {
  position: absolute;
  left: 12px;
  bottom: 8px;
  background: transparent !important;
  border: none !important;
  padding: 0;
  cursor: pointer;
  color: #fff !important;
  font-size: 1.2em;
}

/* — Botón de Compartir justo al lado, 32px desde la izquierda */
.message.received .share-toggle {
  position: absolute;
  left: 44px;      /* 12px + ancho del icono (~32px) */
  bottom: 8px;
  background: transparent !important;
  border: none !important;
  padding: 0;
  cursor: pointer;
  color: #fff !important;
  font-size: 1.2em;
}

.upload-icon-container {
  display: flex; align-items: center; gap: 10px; padding: 10px; color: white;
}

.upload-icon-container img {
  cursor: pointer;
  width: 50px;
  height: 50px;
  transition: filter 0.2s;
  display: inline-block;
  vertical-align: middle;
}

.upload-icon-container img:hover {
  filter: brightness(1.2) drop-shadow(0 0 4px #7d54d1);
}

@media (max-width: 500px) {
  .upload-icon-container {
    margin: 0 0 2px 0;
    padding: 0;
    width: auto;
    display: block;
    padding: 15px;
    flex-direction: column-reverse;
  }
  .upload-icon-container img {
    width: 40px;
    height: 40px;
  }
}

/* Oculta el chat-content-wrapper cuando el welcome está dentro del chat-content */
#chat-content > .welcome-wrapper ~ .chat-content-wrapper,
#chat-content:has(.welcome-wrapper) ~ .chat-content-wrapper {
  display: none !important;
}

/* Botones debajo de asistentes solo en móvil */
.welcome-mobile-btns {
  display: none;
}

@media (max-width: 500px) {
  .welcome-mobile-btns {
    display: block;
    width: 100%;
    margin: 18px 0 0 0;
    padding: 0 10px;
  }
  .welcome-mobile-btns .d-flex {
    gap: 10px;
  }
  .welcome-mobile-btns .div-assist,
  .welcome-mobile-btns .div-buy {
    width: 100%;
    font-size: 16px;
    padding: 12px 0;
    margin: 0 0 8px 0;
    border-radius: 8px;
    text-align: center;
    justify-content: center;
  }
}

/*
  Para el comportamiento móvil del sidebar:
  - El icono de abrir/cerrar sidebar debe tener la clase .sidebar-toggle-icon.
  - Cuando el sidebar esté abierto, agrega la clase .toggle-right al icono para alinearlo a la derecha.
  - Cuando esté cerrado, quita la clase .toggle-right para alinearlo a la izquierda.
  - El logotipo debe estar a la izquierda y el icono de cerrar a la derecha cuando el sidebar esté abierto.
  Asegúrate de que tu JS alterne la clase .toggle-right correctamente.
*/

@media (max-width: 500px) {
  .sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
  }
  .sidebar-header .logo {
    order: 1;
  }
  .sidebar-header .sidebar-toggle-icon.toggle-right {
    order: 2;
    margin-left: auto;
  }
  .sidebar-header .sidebar-toggle-icon {
    order: 0;
  }
}
}