/*
 * Infinite Scroll Archive – stylesheet
 *
 * 1. Loading sentinel & spinner
 * 2. "No more posts" message
 * 3. Generic fallback post layout (used when no blog_posts shortcode is present)
 * 4. Pagination suppression via body class .isa-active
 */

/* ── 1. Sentinel / loading indicator ─────────────────────────────────────── */

#isa-sentinel {
	margin: 24px 0;
	min-height: 24px;
	text-align: center;
}

.isa-loading {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: #888;
	font-size: 14px;
}

/* CSS spinner via a pseudo-element */
.isa-loading::before {
	content: '';
	display: inline-block;
	width: 18px;
	height: 18px;
	flex-shrink: 0;
	border: 2px solid #ddd;
	border-top-color: #555;
	border-radius: 50%;
	animation: isa-spin 0.75s linear infinite;
}

@keyframes isa-spin {
	to { transform: rotate( 360deg ); }
}

/* ── 2. No-more-posts message ─────────────────────────────────────────────── */

.isa-no-more-posts {
	margin: 24px auto;
	padding: 10px 16px;
	text-align: center;
	color: #aaa;
	font-size: 13px;
}

/* ── 3. Generic fallback post layout ─────────────────────────────────────── */

.isa-post-item {
	margin-bottom: 24px;
	border-bottom: 1px solid #eee;
	padding-bottom: 24px;
}

.isa-post-inner {
	display: flex;
	gap: 16px;
}

.isa-post-thumb {
	flex: 0 0 40%;
	max-width: 40%;
}

.isa-post-thumb img {
	width: 100%;
	height: auto;
	display: block;
}

.isa-post-content {
	flex: 1 1 auto;
}

.isa-post-title {
	font-size: 1.1em;
	margin: 0 0 8px;
}

.isa-post-title a {
	text-decoration: none;
	color: inherit;
}

.isa-post-title a:hover {
	text-decoration: underline;
}

.isa-post-excerpt {
	font-size: 0.9em;
	color: #666;
}

/* ── 4. Hide native pagination when infinite scroll is active ─────────────── */
/*
   The body class .isa-active is added by the plugin only on pages where
   infinite scroll is running. This hides Flatsome's and WordPress's default
   pagination elements without touching other pages.
*/

.isa-active .pagination,
.isa-active .wp-pagenavi,
.isa-active .nav-links,
.isa-active .posts-navigation,
.isa-active .page-links,
.isa-active .nav-pagination,
.isa-active ul.nav-pagination {
	display: none !important;
}
