/* Jatka Lukemista – combined stylesheet.
   Kept as a single file (instead of one per feature) so the browser only
   makes one render-blocking request for this plugin's CSS instead of
   three — each extra request has a real network round-trip cost,
   especially on slower mobile connections. */

/* --- Base / infinite scroll -------------------------------------------- */

.jl-sentinel {
	height: 1px;
}

.jl-live-region {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.jl-loader {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.6rem;
	padding: 2rem 0;
	color: #777;
	font-size: 0.9rem;
}

.jl-spinner {
	width: 18px;
	height: 18px;
	border: 2px solid rgba(0, 0, 0, 0.15);
	border-top-color: currentColor;
	border-radius: 50%;
	animation: jl-spin 0.8s linear infinite;
}

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

.jl-article {
	margin-top: 3rem;
	padding-top: 2rem;
	border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.jl-fade-in {
	animation: jl-fade-in 0.5s ease;
}

@keyframes jl-fade-in {
	from {
		opacity: 0;
		transform: translateY(12px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.jl-divider {
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 1.5rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-size: 0.75rem;
	color: #999;
}

.jl-divider::before,
.jl-divider::after {
	content: '';
	flex: 1;
	height: 1px;
	background: rgba(0, 0, 0, 0.1);
}

.jl-divider span {
	padding: 0 0.75rem;
}

.jl-article-header {
	margin-bottom: 1.5rem;
}

.jl-article-image {
	width: 100%;
	height: auto;
	border-radius: 8px;
	margin-bottom: 1rem;
	display: block;
}

.jl-article-category {
	display: inline-block;
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: #8a5f36;
	margin-bottom: 0.4rem;
}

.jl-article-title {
	font-size: 1.6rem;
	line-height: 1.25;
	margin: 0 0 0.5rem;
}

.jl-article-title a {
	color: inherit;
	text-decoration: none;
}

.jl-article-title a:hover {
	text-decoration: underline;
}

.jl-article-meta {
	font-size: 0.85rem;
	color: #777;
}

.jl-article-content {
	font-size: 1.05rem;
	line-height: 1.7;
}

.jl-article-content img {
	max-width: 100%;
	height: auto;
}

.jl-end {
	margin: 3rem 0;
	padding: 2rem;
	text-align: center;
	background: #f7f5f2;
	border-radius: 8px;
}

.jl-end-link {
	display: inline-block;
	margin-top: 0.75rem;
	font-weight: 600;
	color: #8a5f36;
}

.jl-tags {
	margin: 1.5rem 0 0.5rem;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.jl-tag {
	display: inline-block;
	padding: 0.3rem 0.7rem;
	border-radius: 999px;
	background: #f2eee8;
	color: #6b5642;
	font-size: 0.8rem;
	text-decoration: none;
	transition: background 0.15s ease, color 0.15s ease;
}

.jl-tag:hover {
	background: #8a5f36;
	color: #fff;
}

/* --- Reactions ----------------------------------------------------------- */

.jl-reactions {
	margin: 2.5rem 0 1rem;
	padding: 1.25rem 1rem;
	background: #f7f5f2;
	border-radius: 12px;
	text-align: center;
}

.jl-reactions-title {
	margin: 0 0 0.9rem;
	font-size: 0.85rem;
	font-weight: 600;
	color: #555;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.jl-reactions-row {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.6rem;
}

.jl-reaction-btn {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.35rem;
	min-width: 72px;
	padding: 0.6rem 0.5rem 0.5rem;
	border: 1px solid rgba(0, 0, 0, 0.08);
	border-radius: 12px;
	background: #fff;
	cursor: pointer;
	transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
	font: inherit;
	appearance: none;
}

.jl-reaction-btn:hover {
	transform: translateY(-2px);
	border-color: #b5834f;
}

.jl-reaction-btn.is-active {
	border-color: #b5834f;
	background: #fbf1e6;
}

.jl-reaction-btn.jl-pop .jl-reaction-icon {
	animation: jl-pop 0.4s ease;
}

@keyframes jl-pop {
	0% {
		transform: scale(1);
	}
	40% {
		transform: scale(1.35);
	}
	100% {
		transform: scale(1);
	}
}

.jl-reaction-icon {
	width: 30px;
	height: 30px;
	display: inline-block;
}

.jl-reaction-icon svg {
	width: 100%;
	height: 100%;
	overflow: visible;
}

.jl-reaction-icon .jl-ring {
	fill: none;
	stroke: #999;
	stroke-width: 1.5;
	transition: stroke 0.15s ease;
}

.jl-reaction-icon .jl-mark {
	fill: #999;
	transition: fill 0.15s ease;
}

.jl-reaction-icon .jl-mark-line {
	fill: none;
	stroke: #999;
	stroke-width: 1.6;
	stroke-linecap: round;
	transition: stroke 0.15s ease;
}

.jl-reaction-btn:hover .jl-ring,
.jl-reaction-btn.is-active .jl-ring,
.jl-reaction-btn:hover .jl-mark-line,
.jl-reaction-btn.is-active .jl-mark-line {
	stroke: #b5834f;
}

.jl-reaction-btn:hover .jl-mark,
.jl-reaction-btn.is-active .jl-mark {
	fill: #b5834f;
}

.jl-reaction-label {
	font-size: 0.78rem;
	color: #555;
}

.jl-reaction-count {
	font-size: 0.72rem;
	color: #999;
	min-height: 1em;
}

@media (max-width: 480px) {
	.jl-reaction-btn {
		min-width: 60px;
		padding: 0.5rem 0.3rem 0.4rem;
	}
	.jl-reaction-label {
		font-size: 0.7rem;
	}
}

/* --- Read more ------------------------------------------------------------ */

.jl-readmore-wrap {
	position: relative;
}

.jl-readmore-wrap.is-collapsed .jl-readmore-inner {
	max-height: var(--jl-readmore-height, 480px);
	overflow: hidden;
	transition: max-height 0.35s ease;
}

.jl-readmore-fade {
	display: none;
}

.jl-readmore-wrap.is-collapsed .jl-readmore-fade {
	display: block;
	position: absolute;
	left: 0;
	right: 0;
	bottom: 48px;
	height: 100px;
	background: linear-gradient(to bottom, rgba(255, 255, 255, 0), var(--jl-readmore-bg, #fff));
	pointer-events: none;
}

.jl-readmore-btn-row {
	display: none;
	justify-content: center;
	margin-top: 0.5rem;
}

.jl-readmore-wrap.is-collapsed .jl-readmore-btn-row {
	display: flex;
}

.jl-readmore-btn {
	padding: 0.7rem 1.6rem;
	border: none;
	border-radius: 999px;
	/* #8a5f36 on white text gives ~5.6:1 contrast (WCAG AA needs 4.5:1 for
	   text this size) — the original #b5834f only reached ~3.3:1, which is
	   what PageSpeed Insights' accessibility audit flagged. */
	background: #8a5f36;
	color: #fff;
	font: inherit;
	font-size: 0.9rem;
	font-weight: 600;
	cursor: pointer;
	position: relative;
	z-index: 1;
	transition: transform 0.15s ease, background 0.15s ease;
}

.jl-readmore-btn:hover {
	background: #74502c;
	transform: translateY(-1px);
}
