/**
 * SharePoint Integration States
 *
 * Estilos para los estados de carga, error y vacío.
 * Oculta pseudoelementos (::before, ::after) cuando los estados están activos.
 *
 * @author matteoquintero
 * @version 1.0.0
 */

/* ===== CLASE PARA DESACTIVAR PSEUDOELEMENTOS ===== */
.pma-state-active::before,
.pma-state-active::after {
	display: none !important;
}

/* ===== ESTADO DE CARGA ===== */
.pma-loading-container {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-height: 250px;
	width: 100%;
	background: #f8f9fa;
	border-radius: 8px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.pma-loading-spinner {
	width: 48px;
	height: 48px;
	border: 4px solid #e9ecef;
	border-top: 4px solid #004583;
	border-radius: 50%;
	animation: pma-spin 1s linear infinite;
	margin-bottom: 1.5rem;
}

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

.pma-loading-text {
	color: #6c757d;
	font-size: 16px;
	font-weight: 500;
	margin: 0;
	text-align: center;
}

/* ===== ESTADO VACÍO ===== */
.pma-empty-state {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	min-height: 250px;
	width: 100%;
	background: #f8f9fa;
	border-radius: 8px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.pma-empty-title {
	color: #343a40;
	font-size: 24px;
	font-weight: 600;
	margin: 0 0 1rem 0;
	line-height: 1.3;
}

.pma-empty-message {
	color: #6c757d;
	font-size: 16px;
	max-width: 400px;
	line-height: 1.6;
	margin: 0;
}

/* ===== ESTADO DE ERROR ===== */
.pma-error-state {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	min-height: 250px;
	width: 100%;
	background: #fff5f5;
	border: 2px solid #fed7d7;
	border-radius: 8px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.pma-error-title {
	color: #e53e3e;
	font-size: 24px;
	font-weight: 600;
	margin: 0 0 1rem 0;
	line-height: 1.3;
}

.pma-error-message {
	color: #6c757d;
	font-size: 16px;
	line-height: 1.6;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
	.pma-loading-container,
	.pma-empty-state,
	.pma-error-state {
		min-height: 180px;
	}

	.pma-loading-spinner {
		width: 40px;
		height: 40px;
		margin-bottom: 1rem;
	}

	.pma-empty-title,
	.pma-error-title {
		font-size: 20px;
	}

	.pma-empty-message,
	.pma-error-message {
		font-size: 14px;
		max-width: 300px;
	}
}

@media (max-width: 480px) {
	.pma-loading-container,
	.pma-empty-state,
	.pma-error-state {
		min-height: 150px;
	}

	.pma-loading-spinner {
		width: 32px;
		height: 32px;
		border-width: 3px;
	}

	.pma-empty-title,
	.pma-error-title {
		font-size: 18px;
	}

	.pma-empty-message,
	.pma-error-message {
		font-size: 13px;
		max-width: 250px;
	}
}

/* ===== ANIMACIONES ===== */
@keyframes pma-fadeIn {
	from {
		opacity: 0;
		transform: translateY(20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.pma-loading-container,
.pma-empty-state,
.pma-error-state {
	animation: pma-fadeIn 0.5s ease-out;
}

/* ===== ACCESIBILIDAD ===== */
@media (prefers-reduced-motion: reduce) {
	.pma-loading-spinner {
		animation: none;
		border-top-color: #004583;
	}

	.pma-loading-container,
	.pma-empty-state,
	.pma-error-state {
		animation: none;
	}
}
