#center-text {
	z-index: 1500;
	display: flex;
	flex: 1;
	flex-direction:column;
	justify-content: center;
	align-items: center;
	height:100%;

  }


/* --- CONFIGURACIÓN GLOBAL DEL CONTENEDOR --- */
#chat-container {
    z-index: 1500;
    position: fixed;
    bottom: 20px;
    right: 20px;
    pointer-events: none;
}

#chat-container * {
    pointer-events: auto;
}

/* Ocultar checkbox */
#chip-toggle {
    display: none;
}

/* --- BOTÓN FLOTANTE (FAB) --- */
.chip-fab {
    display: flex; /* Visible por defecto en todas las vistas si está cerrado */
    width: 60px;
    height: 60px;
    background-color: #0b57d0;
    color: white;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    transition: transform 0.3s ease;
}

/* --- VENTANA DE CHAT (chat-root) --- */
.chat-root {
    display: none; /* Oculta por defecto en todas las vistas */
    width: 360px;
    height: 340px;
    border-radius: 1.5rem;
    background-color: #fdfcfb;
    box-shadow: 0 .25rem .5rem .1875rem rgba(0, 0, 0, .15);
    position: absolute;
    bottom: 75px;
    right: 0;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.3s ease;
    transform: scale(0);
    transform-origin: bottom right;
}

/* --- LÓGICA DE APERTURA (Checkbox Hack) --- */
/* Cuando el checkbox está marcado, mostramos la ventana y ocultamos el FAB */
#chip-toggle:checked ~ .chat-root {
    display: flex;
    transform: scale(1);
}

#chip-toggle:checked ~ .chip-fab {
    display: none;
}

/* --- ESTILOS DEL HEADER Y BOTÓN CERRAR --- */
.chat-root-header {
    align-items: center;
    display: flex;
    padding: 1rem;
    background: white;
}

.chat-close-icon {
    margin-left: auto;
    cursor: pointer;
    display: flex;
    align-items: center;
    color: #5f6368;
}

/* --- AJUSTES RESPONSIVOS --- */
@media only screen and (max-width: 576px) {
    .chat-root {
        width: calc(100vw - 40px);
        max-width: 350px;
    }
}

  .chat-root {
	pointer-events: auto;
	box-shadow: none;
	background-color:  #fff;
    border: solid transparent;
	border-radius: 2rem 2rem 0 0;
    border-width: .125rem .125rem 0 .125rem;
	display: flex;
	flex-direction: column;
  }

  .chat-root-header {
	align-items: center;
	align-self: stretch;
      justify-content: space-between;
	display: flex;
	padding: 1rem;
	border-radius: inherit;
  }
.chat-root-header-title-container{
    display: flex;
    align-items: center;
}

  .chat-root-header .chat-icon {
	font-size: 45px;
  }

  .chat-root-header .chat-root-header-title {
	font-size: 22px;
	align-items: center;
	margin: 1px 8px;
	line-height: 28px;
  }

  .chat-root-bubble-text {
	background-color: #f8f9fa;
    border-radius: 1rem;
	display: flex;
	flex-direction: column;
    margin: 0 1rem 1rem;
    padding: 1.25rem 1rem;
    position: relative;
  }

  .chat-root-bubble-text .chat-root-bubble-text-header {
	align-self: self-start;
	align-items: center;
	display: flex;
    gap: .5rem;
	font-size: .75rem;
    padding: .5rem 0 .25rem;
    margin-bottom: .25rem;
  }

  .chat-root-bubble-text .chat-root-bubble-text-header .chat-root-bubble-text-header-icon {
	align-self: self-start;
	align-items: center;
	display: flex;
	gap: .5rem;
  }

  .chat-root-bubble-text .chat-root-bubble-text-header .chat-root-bubble-text-header-icon span {
	font-size: 16px;
	width: 1.25rem;
	height: 1.25rem;
	align-items: center;
	display: flex;
	justify-content: center;
  }

  .chat-root-bubble-text .chat-root-bubble-text-content {
	font-size: 1rem;
    font-style: normal;
    font-weight: 400;
    line-height: 1.5rem;
    padding: 0 .5rem;
  }

  .chat-root-button-container {
	background-color: #ecf3fe;
    border-radius: 1rem 1rem 0 0;
    padding: 1.5rem;
  }

  .chat-root-button {
	padding: 0;
	cursor: pointer;
	align-items: center;
    background: #0b57d0;
    border: 2px solid transparent;
    border-radius: 8rem;
	color: white;
	display: flex;
	font-size: 1rem;
    font-style: normal;
    font-weight: 500;
    gap: .5rem;
    height: 3.125rem;
	justify-content: center;
    line-height: 1.25rem;
    width: 100%;
  }

  .btn#my-btn {
	z-index: 1500;
	   background: white;
	  padding-top: 13px;
	  padding-bottom: 12px;
	  border-radius: 45px;
	  padding-right: 40px;
	  padding-left: 40px;
	  color: #5865C3;
  }
  #chat-overlay {
	z-index: 1500;
	  background: rgba(255,255,255,0.1);
	  position: absolute;
	  top: 0;
	  left: 0;
	  width: 100%;
	  height: 100%;
	  border-radius: 50%;
	  display: none;
  }


  .chat-box {
	z-index: 1500;
	display:flex;
	flex-direction: column;
	background: white;
	position:fixed;
	bottom: 0px;
    right: 0.625rem;
	max-width: 85vw;
	max-height:100vh;
    box-shadow: 0 .25rem .5rem .1875rem rgba(0, 0, 0, .15);
	border-radius: 2rem 2rem 0px 0px;
    width: 23.75rem;
    opacity: 1;
    height: 50.3125rem;
  }

  .chat-box-header {
	align-items: center;
	align-self: stretch;
	display: flex;
	padding: 1rem;
	border-radius: inherit;
  }

.chat-box-header .chat-title {
	font-size: 22px;
	align-items: center;
	margin: 1px 8px;
	line-height: 28px;
}
  .chat-box-toggle {
	cursor: pointer;
	display: flex;
    margin-right: 1rem;
    padding: .5rem;
    position: absolute;
    right: 0;
    top: .75rem;
  }
  .chat-box-body {
	padding-bottom: 1em;
	height:auto;
	overflow-y: auto;
	display: flex;
	flex: 1;
	flex-direction: column;
    justify-content: end;
    min-height: 0;
    position: relative;
	padding-left: 16px;
	padding-right: 16px;
  }
  .chat-box-footer {
	display: flex;
	justify-content: center;
	font-size: 10px;
	color: black;
	text-align: center;
	opacity: 0.6;
  }
  .chat-box-content {
	height: calc(100dvh - 4rem);
	padding-bottom: 0;
	align-self: center;
	background-color: #fff;
    display: flex;
	justify-content: end;
    flex-direction: column;
	overflow-y: hidden;
	position: relative;
	width: 100%;
  }
.chat-logs .typing .cm-msg-text{
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	align-content: center;
	justify-content: flex-start;
	align-items: center;
}

.chat-logs .typing .cm-msg-text span {
	font-size: 0.9em;
}
.chat-logs .typing img{
	  width: 3em;
  }
  .chat-box-body:after {
	z-index: 1500;
	content: "";
	opacity: 0.1;
	top: 0;
	left: 0;
	bottom: 0;
	right: 0;
	height:100%;
	position: absolute;
	z-index: -1;
  }
  #chat-input {
	margin-top: 14px;
	margin-bottom: 14px;
	padding: 0 16px;
	box-shadow: none;
  }

  .chat-input {
	background-color: #ecf3fe;
    border-radius: 16px 16px 0px 0px;
    color: #1f1f1f;
	display: flex;
    flex-direction: column;
    flex-shrink: 0;
    justify-content: center;
	margin-bottom: 0;
	padding: 1rem 0;
	width: 100%;
  }
  .chat-input-text {
	color: #1f1f1f;
  }
  .chat-input-text:focus {
	color: #1f1f1f;
  }
  .chat-input > form {
	display: flex;
	max-height: 13rem;
  }
  .chat-input-container {
	background: #fff;
    border-radius: 1.75rem;
    border: 2px solid #cccdcf;
    color: #1f1f1f;
    display: flex;
    margin: 0 .25rem 0 1rem;
    overflow: hidden;
    width: 100%;
  }
  #chat-input::-webkit-input-placeholder { /* Chrome/Opera/Safari */
	z-index: 1500;
	color: #ccc;
  }
  #chat-input::-moz-placeholder { /* Firefox 19+ */
	z-index: 1500;
	color: #ccc;
  }
  #chat-input:-ms-input-placeholder { /* IE 10+ */
	z-index: 1500;
	color: #ccc;
  }
  #chat-input:-moz-placeholder { /* Firefox 18- */
	z-index: 1500;
	color: #ccc;
  }
  .chat-submit {
	z-index: 1500;
	background: transparent;
	box-shadow:none;
	border:none;
	border-radius:50%;
	width:40px;
	height:40px;
	color: rgba(48, 49, 54, 0.16);
	align-self: end;
    margin: .25rem .5rem .25rem .25rem;
	align-items: flex-start;
	justify-content: center;
	display: inline-flex;
	position: relative;
  }
  .chat-logs {
	overflow-y:auto;
	display: flex;
	flex-direction: column;
  }

  .chat-logs::-webkit-scrollbar-track
  {
	-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
	background-color: #F5F5F5;
  }

  .chat-logs::-webkit-scrollbar
  {
	width: 5px;
	background-color: #F5F5F5;
  }

  .chat-logs::-webkit-scrollbar-thumb
  {
	background-color: #273f5b;
  }

  @media only screen and (max-width: 576px) {
	.chat-box {
		margin-right: 10px;
		margin-left: 10px;
		width: calc(100% - 20px);
		max-width: none;
		right: 0;
	 }
 }
  .chat-msg.user > .msg-avatar img {
	width:45px;
	height:45px;
	border-radius:50%;
	float:left;
	width:15%;
  }
  .chat-msg.self > .msg-avatar img {
	width:45px;
	height:45px;
	border-radius:50%;
	float:right;
	width:15%;
  }
  .chat-msg.self {
	padding-left: 30px;
  }
  .chat-msg.user {
	padding-right: 30px;
  }
  .cm-msg-text {
	background-color: #f8fafd;
    border-radius: 16px;
    color: #1f1f1f;
	margin: 0 0 12px;
    overflow: hidden;
    padding: 12px 16px 20px;
    position: relative;
	font-size: .875rem;
    line-height: 1.25rem;
  }
  .chat-msg {
	clear:both;
  }

  .chat-msg.self > .cm-msg-text {
	background-color: #e9eef6;
    border-radius: 16px;
    color: #1f1f1f;
  }
  .cm-msg-button>ul>li {
	list-style:none;
	float:left;
	width:50%;
  }
  .cm-msg-button {
	  clear: both;
	  margin-bottom: 70px;
  }

  .chat-btn {
	padding: .375rem 16px;
	border-radius: 8px;
	width: fit-content;
	text-align: left;
	background-color: white;
	border: 1px solid #CAC4D0;
	color: black;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
  }

  .chat-btn:hover {
	background-color: #f3f3f3;
  }

  .chat-topics {
	padding: 8px;
	display: flex;
	flex-direction: column;
	gap: 8px;
  }