/**
 * CM Query Load More — frontend styles
 */

.cm-qllm-pagination {
	display: flex;
	width: 100%;
	margin-top: 2.5rem;
}

.cm-qllm-pagination.is-content-justification-left   { justify-content: flex-start; }
.cm-qllm-pagination.is-content-justification-center { justify-content: center; }
.cm-qllm-pagination.is-content-justification-right  { justify-content: flex-end; }
.cm-qllm-pagination.is-content-justification-space-between { justify-content: space-between; }

.cm-qllm-button-wrap {
	display: inline-flex;
}

.cm-qllm-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	font-size: 0.75rem;
	padding: 0.875rem 2.5rem;
	border: 1px solid #dedede;
	background-color: #fff;
	color: #999999;
	text-transform: uppercase;
	text-decoration: none;
	border-radius: 0.75rem;
	cursor: pointer;
	transition: opacity 0.15s ease;

	&:hover{
		border-color: #313131;
		color: #313131;
	}
}

.cm-qllm-button.is-loading {
	pointer-events: none;
	opacity: 0.7;
}

.cm-qllm-button.is-loading::after {
	content: "";
	width: 1em;
	height: 1em;
	border: 2px solid currentColor;
	border-right-color: transparent;
	border-radius: 50%;
	display: inline-block;
	animation: cm-qllm-spin 0.7s linear infinite;
}

.cm-qllm-button.cm-qllm-error {
	outline: 0.125rem solid #b32d2e;
	outline-offset: 0.125rem;
}

.cm-qllm-pagination.cm-qllm-exhausted .cm-qllm-button,
.cm-qllm-pagination.cm-qllm-exhausted .cm-qllm-button-wrap {
	display: none;
}

@keyframes cm-qllm-spin {
	to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
	.cm-qllm-button.is-loading::after {
		animation: none;
	}
}
