/* ------------------------------------------ Universales ------------------------------------------ */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap');

html {
	font-size: 62.5%;
	box-sizing: border-box;
}

body {
	font-family: 'Montserrat', sans-serif;
	font-size: 16px !important;
	background-color: #f2f2f2;
}

body::-webkit-scrollbar {
	width: 0.5rem;
	background-color: var(--color-ui-900);
	border-radius: 1rem;
}

body::-webkit-scrollbar-thumb {
	border-radius: 1rem;
	background-color: var(--color-ui-secundario);
}

input[type='file'] {
	display: none;
}

button[type='submit'] {
	border: none;
	color: white;
	width: fit-content;
	height: 24.01px;
	background: transparent;
	padding: 0;
}

:root {
	--color-ui-amarillo: #fcb900;
	--color-ui-azul: #3389bc;
	--color-ui-secundario: #1e2020;
	--color-ui-50: #f6f6f6;
	--color-ui-100: #e7e7e7;
	--color-ui-200: #d1d1d1;
	--color-ui-300: #b0b0b0;
	--color-ui-400: #888888;
	--color-ui-500: #6d6d6d;
	--color-ui-600: #5d5d5d;
	--color-ui-700: #4f4f4f;
	--color-ui-800: #454545;
	--color-ui-900: #3d3d3d;
	--color-ui-950: #141414;
}

@media (hover: hover) {
	.historial__item:hover {
		background-color: var(--color-ui-800);
	}
}

/* ------------------------------------------ Utilidades chat ------------------------------------------ */
.avatar {
	width: 4rem;
	height: 4rem;
	min-width: 4rem;
	max-width: 4rem;
	border-radius: 100%;
	background-color: var(--color-ui-100);
	overflow: hidden;
}
.avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.item-sistem {
	display: flex;
	position: relative;
	z-index: 2;
	gap: 1rem;
}

.cursor-pointer {
	cursor: pointer;
}

.text-small {
	font-size: 1.2rem;
	color: var(--color-ui-600);
}

.mic-activo {
	color: lightcoral;
}

/* menu historial reposive */
.menu-historial-active {
	display: flex !important;
	flex-direction: column;
	position: absolute;
	width: 75%;
	height: 100vh;
	z-index: 99;
}

@media (min-width: 1024px) {
	.menu-historial-active {
		position: inherit;
		width: 100%;
		height: auto;
		z-index: 0;
	}
	.chat-historial-menu {
		grid-template-columns: 30rem 3fr !important;
	}

	.back__movil {
		display: none;
	}
}

.animate-hitorial-close {
	animation: animate-hitorial-close 1s ease-in-out forwards;
}

.animate-historial-open {
	animation: animate-historial-open 0.5s ease-in-out forwards;
}

@keyframes animate-hitorial-close {
	0% {
		transform: translateX(0);
	}
	100% {
		transform: translateX(-300%);
	}
}

@keyframes animate-historial-open {
	0% {
		transform: translateX(-100%);
	}
	100% {
		transform: translateX(0);
	}
}

.text-no-long {
	overflow: hidden;
	text-overflow: ellipsis;
	text-wrap: nowrap;
}

/* ------------------------------------------ Estilos personalizado ------------------------------------------ */
#formularioChat {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	width: 100%;
	height: 100%;
}

form label {
	margin: 0;
}

.chat {
	transition: all 0.5s ease;
	color: var(--color-ui-100);
	min-height: 100vh;
	display: grid;
	grid-template-rows: 1fr 1fr auto;
	grid-template-areas:
		'chat-contenedor'
		'chat-contenedor'
		'chat-text';
}

.chat__contenedor {
	background-color: var(--color-ui-950);
	grid-area: chat-contenedor;
}

.chat__text {
	background-color: var(--color-ui-950);
	grid-area: chat-text;
	display: flex;
	justify-content: center;
	flex-direction: column;
	align-items: center;
}

.chat__historial {
	max-height: 100dvh;
	transition: all 0.5s ease;
	padding: 1rem;
	display: none;
	overflow-y: auto;
	background-color: var(--color-ui-secundario);
	grid-area: chat-historial;
}

@media (min-width: 1024px) {
	.chat__historial {
		display: flex;
		flex-direction: column;
	}
	.chat {
		color: var(--color-ui-100);
		min-height: 100vh;
		display: grid;
		grid-template-columns: 9rem 3fr;
		grid-template-rows: 1fr 1fr auto;
		grid-template-areas:
			'chat-historial chat-contenedor'
			'chat-historial chat-contenedor'
			'chat-historial chat-text';
	}
}

/* ------------------------------------------ seccionn de chat ------------------------------------------ */
/* diseño de header */
.chat__navegacion {
	display: flex;
	flex-direction: row-reverse;
	justify-content: space-between;
	align-items: center;
	padding: 1rem;
}

.titulo {
	color: var(--color-ui-amarillo);
	font-size: 3rem;
	text-transform: capitalize;
}

/* chat items */
.chat__conversacion {
	display: flex;
	flex-direction: column-reverse;
	align-items: center;
	padding-top: 7rem;
}

.chat__conversacion__mensaje {
	min-width: 20rem;
	max-width: 90%;
	width: 90%;
}
.chat__mensaje,
.chat__respuesta__bot {
	display: flex;
	gap: 1rem;
	margin-bottom: 1rem;
}

.logo {
	width: 15rem;
	height: 3.1rem;
}

@media (min-width: 1024px) {
	.chat__conversacion__mensaje {
		max-width: 70%;
	}
}

.text-chat {
	display: flex;
	padding: 1rem;
	border-radius: 1rem;
	border: 1px solid var(--color-ui-400);
	background-color: transparent;
	position: relative;
	min-width: 20rem;
	justify-content: space-between;
	align-items: flex-end;
	width: 90%;
	max-width: 90%;
}

.text-chat textarea {
	width: 100%;
	height: 100%;
	border: none;
	background-color: transparent;
	color: var(--color-ui-100);
	font-size: 1.6rem;
	resize: none;
	top: 0;
	left: 0;
	position: absolute;
	padding-left: 7rem;
	padding-right: 7rem;
	padding-top: 1rem;
	padding-bottom: 1rem;
	overflow: hidden;
	min-height: 4.6rem;
}

textarea:focus {
	outline: none;
}

textarea::placeholder {
	vertical-align: middle;
}

@media (min-width: 1024px) {
	.text-chat {
		width: 70%;
	}
}
/* ------------------------------------------ historial UI ------------------------------------------ */
.historial__item {
	background-color: var(--color-ui-700);
	padding: 1rem;
	border-radius: 1rem;
	text-overflow: ellipsis;
	font-size: 1.2rem;
	overflow: hidden;
	text-overflow: ellipsis;
	text-wrap: nowrap;
	margin-bottom: 2rem;
	cursor: pointer;
}

.historial__item:hover {
	background-color: var(--color-ui-800);
}

.historial__titulo {
	color: var(--color-ui-amarillo);
	font-size: 1.6rem;
	padding: 1rem;
}

.historial__items {
	flex: 1 1 auto;
	overflow-y: auto;
}

.historial__items:hover::-webkit-scrollbar {
	width: 0.5rem;
	background-color: var(--color-ui-900);
	border-radius: 1rem;
	transition: all 0.5s ease;
}

.historial__items::-webkit-scrollbar {
	width: 0.5rem;
	background-color: transparent;
	border-radius: 1rem;
	transition: all 0.5s ease;
}

.historial__items:hover::-webkit-scrollbar-thumb {
	border-radius: 1rem;
	background-color: var(--color-ui-secundario);
}

.historial__items:hover::-webkit-scrollbar-thumb {
	border-radius: 1rem;
	background-color: transparent;
}
