/* Lazy CSS */

:root
{
	/* Paleta de colores base */
	--lazy-blue: #0d6efd;
	--lazy-indigo: #6610f2;
	--lazy-purple: #6f42c1;
	--lazy-pink: #d63384;
	--lazy-red: #dc3545;
	--lazy-orange: #fd7e14;
	--lazy-yellow: #ffc107;
	--lazy-green: #198754;
	--lazy-teal: #20c997;
	--lazy-cyan: #0dcaf0;

	/* Identidad SAAI */
	--lazy-saai-main: #224d77;
	--lazy-saai-shadow: rgba(34, 77, 119, 0.3);
}

body
{
	font-family: 'Poppins', sans-serif;
	background: #EEEEEE;
	color: #000;
	scrollbar-color: black grey;
}

p
{
	font-family: 'Poppins', sans-serif;
	font-weight: 300;
	line-height: 1.7em;
	color: #000;
}

pre
{
	font-family: 'Liberation Mono', monospace;
	font-size: 16px;
}

/* cambios css para PC */
@media only screen
	and (min-device-width: 736px)
{
	#topbar
	{
		height: 35px;
	}
}

@media only screen
	and (max-device-width: 735px)
{
	#topbar
	{
		height: 50px;
	}
}

#footer_fecha
{
	margin-right: 2em;
}

#footer_hora
{
	margin-right: 2em;
}

#ayuda_btn
{
	cursor: pointer;
}

.footer
{
	position: fixed;
	bottom: 0;
	width: 100%;
	/* Set the fixed height of the footer here */
	height: 20px;
	line-height: 20px; /* Vertically center the text there */
	background-color: #f5f5f5;
	z-index: 110; /* Behind the navbar */
	font-size: .8em;
}

.bootbox_titulo
{
	width:150px;
}

.bg-blue   { background-color: var(--lazy-blue); }
.bg-indigo { background-color: var(--lazy-indigo); }
.bg-purple { background-color: var(--lazy-purple); }
.bg-pink   { background-color: var(--lazy-pink); }
.bg-red    { background-color: var(--lazy-red); }
.bg-orange { background-color: var(--lazy-orange); }
.bg-yellow { background-color: var(--lazy-yellow); }
.bg-green  { background-color: var(--lazy-green); }
.bg-teal   { background-color: var(--lazy-teal); }
.bg-cyan   { background-color: var(--lazy-cyan); }
.text-saai { color: var(--lazy-saai-main); }

.resaltar-vacio
{
	border-color: red;
	background-color: lightpink;
}


.lh-100
{
	line-height: 1;
}
.lh-125
{
	line-height: 1.25;
}
.lh-150
{
	line-height: 1.5;
}

.enlace_desactivado
{
	cursor: not-allowed;
	pointer-events: none;
}

.btn:disabled
{
	cursor: not-allowed;
}

.btn:disabled:hover
{
	cursor: not-allowed;
}

.navbar
{
	padding: 5px;
	border: none;
	margin-bottom: 5px;
	box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
}

.navbar-btn
{
	box-shadow: none;
	outline: none !important;
	border: none;
}

.tachado
{
	color: #8391A1;
	text-decoration: line-through;
}

.line
{
	width: 100%;
	height: 1px;
	border-bottom: 1px dashed #ddd;
	margin: 40px 0;
}

.texto_vertical
{
	max-width:50px !important;
	font-size: .75em;
	transform: rotate(-90deg); /* Rota el texto -90 grados */
	-webkit-transform: rotate(-90deg); /* Para navegadores basados en WebKit */
	overflow: hidden;
	text-overflow: ellipsis;
	/*white-space: nowrap;*/
}

/* Admin */
.card-hover {
	transition: transform 0.2s, box-shadow 0.2s;
	border: none;
}

.card-hover:hover {
	transform: translateY(-5px);
	box-shadow: 0 10px 20px rgba(34, 77, 119, 0.15) !important;
	background-color: #f8f9fa;
}

.text-saai {
	color: var(--lazy-saai-main);
}





/* Animación Reloj */
.animacion
{
	/*position: absolute;*/

	animation-name: parpadeo;
	animation-duration: 1s;
	animation-timing-function: linear;
	animation-iteration-count: infinite;

	-webkit-animation-name:parpadeo;
	-webkit-animation-duration: 1s;
	-webkit-animation-timing-function: linear;
	-webkit-animation-iteration-count: infinite;
}

@-moz-keyframes parpadeo
{
	0% { opacity: 1.0; }
	50% { opacity: 0.0; }
	100% { opacity: 1.0; }
}

@-webkit-keyframes parpadeo
{
	0% { opacity: 1.0; }
	50% { opacity: 0.0; }
	100% { opacity: 1.0; }
}

@keyframes parpadeo
{
	0% { opacity: 1.0; }
	50% { opacity: 0.0; }
	100% { opacity: 1.0; }
}
/* Fin Animación Reloj */

/* --- LÓGICA MINI SIDEBAR --- */
#sidebarMenu
{
	position: relative !important;
	/* IMPORTANTE: El sidebar DEBE permitir que el botón sobresalga */
	overflow: visible !important;
}

@media (min-width: 768px)
{
	body.sidebar-toggled #sidebarMenu
	{
		margin-left: 0 !important;
		width: 60px !important;
		flex: 0 0 60px !important;
		max-width: 60px !important;
	}

	/* Ocultar texto */
	body.sidebar-toggled .menu-text
	{
		display: none;
	}

	body.sidebar-toggled #contenedor_main
	{
		flex: 0 0 calc(100% - 60px) !important;
		max-width: calc(100% - 60px) !important;
		margin-left: 60px;
	}

	/* Rotar icono del botón */
	body.sidebar-toggled #sidebarToggle span
	{
		transform: rotate(180deg);
	}
}

/* 2. El Botón "Solapa" mejorado */
#sidebarToggle
{
	position: absolute;
	right: -15px; /* Mitad fuera, mitad dentro */
	top: 2px;    /* Bajado un poco para que no choque con el header */
	width: 30px;
	height: 30px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 950; /* Por encima de casi todo */
	background-color: #ffffff;
	border: 1px solid #dee2e6;
	box-shadow: 0 2px 6px rgba(0,0,0,0.15);
	cursor: pointer;
	color: var(--lazy-saai-main);
	padding: 0;
}

/* Transiciones suaves */
#sidebarMenu, #contenedor_main, #sidebarToggle
{
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

#sidebarToggle:hover
{
	background-color: var(--lazy-saai-main);
	color: #fff;
	transform: scale(1.1); /* Efecto de rebote pequeño */
}

/* Asegurar que el icono rote suave */
#sidebarToggle span
{
	transition: transform 0.3s ease;
}

@media (min-width: 768px)
{
	body.sidebar-toggled #sidebarMenu .nav-item .nav-link.active
	{
		margin-left: 0 !important;   /* Quitamos el ms-2 */
		margin-right: 0 !important;  /* Quitamos el me-2 */
		border-radius: 0 !important; /* Que ocupe todo el ancho cuadrado */
		width: 100%;                 /* Forzamos que encaje en los 60px */
		padding-left: 0 !important;
		padding-right: 0 !important;
		text-align: center;
	}

	/* Aseguramos que la barrita azul del 'active' se vea bien */
	body.sidebar-toggled #sidebarMenu .nav-item .nav-link.active
	{
		border-left-width: 4px !important;
	}
}

/* --- FIN LÓGICA MINI SIDEBAR --- */


/* Animación pantalla de espera */
/* Spinner moderno para SAAI 4.0 */
.loader-container
{
	background: rgba(0, 0, 0, 0.8);
	position: fixed; /* Fixed es mejor que absolute para bloquear toda la pantalla */
	top: 0; left: 0; width: 100%; height: 100%;
	z-index: 10000;
	display: none;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	color: white;
}

.custom-spinner
{
	width: 50px;
	height: 50px;
	border: 5px solid #f3f3f3;
	border-top: 5px solid #3498db; /* Color principal de SAAI */
	border-radius: 50%;
	animation: spin 1s linear infinite;
	margin-bottom: 15px;
}

@keyframes spin
{
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}