/*!
 * UsefulThings UX Layer — Smart Lightbox HD, editorial typography, responsive layout,
 * stacked mobile tables, pro/con boxes, quick TOC, back-to-top.
 * Enqueued by mu-plugins/usefulthings-core.php (Section 12). No external dependencies.
 * All article rules are scoped under `.single-news-area .entry-content` because every article
 * ships its own inline <style>; `!important` is used only against NewsExo column widths.
 */

/* ---------- 1. Editorial typography ---------- */
.single-news-area .entry-content h2 {
	font-size: clamp(1.35rem, 2.3vw, 1.72rem);
	line-height: 1.28;
	letter-spacing: -0.01em;
	margin: 2.1rem 0 0.85rem;
	scroll-margin-top: 90px;
}
.single-news-area .entry-content h3 {
	font-size: clamp(1.12rem, 1.8vw, 1.3rem);
	line-height: 1.32;
	margin: 1.6rem 0 0.65rem;
	scroll-margin-top: 90px;
}
.single-news-area .entry-content > p,
.single-news-area .entry-content > ul > li,
.single-news-area .entry-content > ol > li,
.single-news-area .entry-content .ut-article-container > p,
.single-news-area .entry-content .ut-top10-article > p,
.single-news-area .entry-content .ut-article-container > ul > li,
.single-news-area .entry-content .ut-top10-article > ul > li {
	font-size: 1.0625rem;
	line-height: 1.72;
	color: #1e293b;
}
.single-news-area .entry-content img,
.single-news-area .entry-content svg {
	max-width: 100%;
	height: auto;
}

/* ---------- 2. Layout: sidebar only at >= 1200px ---------- */
@media (max-width: 1199.98px) {
	section.single-news-area > .container-full > .row > .col-lg-8.col-md-6,
	section.single-news-area > .container-full > .row > .col-lg-4 {
		flex: 0 0 100% !important;
		max-width: 100% !important;
		width: 100% !important;
	}
}
@media (min-width: 1200px) {
	section.single-news-area > .container-full > .row > .col-lg-8.col-md-6 {
		flex: 0 0 71% !important;
		max-width: 71% !important;
	}
	section.single-news-area > .container-full > .row > .col-lg-4 {
		flex: 0 0 29% !important;
		max-width: 29% !important;
	}
}

/* ---------- 3. Pro / Con boxes (singular variants used by several waves) ---------- */
.single-news-area .entry-content .ut-pro-box,
.single-news-area .entry-content .ut-con-box {
	border-radius: 8px;
	padding: 1rem 1.25rem;
	font-size: 0.95rem;
	line-height: 1.6;
}
.single-news-area .entry-content .ut-pro-box { background: #f0fdf4; border: 1px solid #bbf7d0; color: #14532d; }
.single-news-area .entry-content .ut-con-box { background: #fef2f2; border: 1px solid #fecaca; color: #7f1d1d; }
.single-news-area .entry-content .ut-pro-box > strong,
.single-news-area .entry-content .ut-con-box > strong { display: block; margin-bottom: 0.4rem; }
.single-news-area .entry-content .ut-pro-box ul,
.single-news-area .entry-content .ut-con-box ul { margin: 0; padding-left: 1.2rem; }

/* ---------- 4. Zoomable figures & step-card photos ---------- */
.single-news-area .entry-content .ut-zoomable-figure,
.single-news-area .entry-content .ut-w9-q-vis { position: relative; }
.single-news-area .entry-content .ut-zoomable-figure img { cursor: zoom-in; }
.ut-zoom-pill {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 3;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 6px 11px;
	border: 1.5px solid #fff;
	border-radius: 999px;
	background: rgba(15, 23, 42, 0.82);
	color: #fff;
	font: 700 0.78rem/1 system-ui, -apple-system, "Segoe UI", sans-serif;
	cursor: pointer;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
.ut-zoom-pill:hover,
.ut-zoom-pill:focus-visible { background: #0263d0; outline: 3px solid #93c5fd; outline-offset: 1px; }
.ut-zoom-pill.ut-zoom-pill-compact { top: 6px; right: 6px; padding: 5px 8px; }

.single-news-area .entry-content .ut-step-card-media {
	position: relative;
	margin: -2px -2px 10px;
	border-radius: 9px;
	overflow: hidden;
	background: #e2e8f0;
	aspect-ratio: 4 / 3;
}
.single-news-area .entry-content .ut-step-card-media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	margin: 0;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	cursor: zoom-in;
}
.single-news-area .entry-content .ut-dossier-hd-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 0.6rem 0 1.2rem;
	padding: 8px 14px;
	border: 1.5px solid #0f172a;
	border-radius: 999px;
	background: #fff;
	color: #0f172a;
	font-weight: 700;
	font-size: 0.92rem;
	text-decoration: none;
}
.single-news-area .entry-content .ut-dossier-hd-link:hover { background: #0f172a; color: #fff; }

/* ---------- 5. Comparison tables: stacked cards on phones (labels come from PHP) ---------- */
.ut-table-mode-toggle { display: none; }
@media (max-width: 680px) {
	.ut-table-mode-toggle {
		display: inline-flex;
		align-items: center;
		gap: 6px;
		margin: 0.5rem 0 0.4rem;
		padding: 6px 12px;
		border: 1.5px solid #0f172a;
		border-radius: 999px;
		background: #fff;
		color: #0f172a;
		font-weight: 700;
		font-size: 0.82rem;
		cursor: pointer;
	}
	/* Keyed on the table itself: W8-W10 wrap it in .ut-comparison-table-wrap, W11+ in .ut-table-wrap. */
	.single-news-area .entry-content table.ut-comparison-table.ut-stackable:not(.ut-as-grid) thead {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
		white-space: nowrap;
	}
	.single-news-area .entry-content table.ut-comparison-table.ut-stackable:not(.ut-as-grid),
	.single-news-area .entry-content table.ut-comparison-table.ut-stackable:not(.ut-as-grid) tbody,
	.single-news-area .entry-content table.ut-comparison-table.ut-stackable:not(.ut-as-grid) tr,
	.single-news-area .entry-content table.ut-comparison-table.ut-stackable:not(.ut-as-grid) td {
		display: block;
		width: 100%;
		box-sizing: border-box;
	}
	.single-news-area .entry-content table.ut-comparison-table.ut-stackable:not(.ut-as-grid) tr {
		margin: 0 0 12px;
		border: 1px solid #cbd5e1;
		border-radius: 10px;
		background: #fff;
		overflow: hidden;
	}
	/* Block cell + absolutely placed label: mixed inline content (<strong>, badges, <code>) stays in one value column. */
	.single-news-area .entry-content table.ut-comparison-table.ut-stackable:not(.ut-as-grid) td {
		position: relative;
		min-height: calc(2.1em + 18px);
		padding: 9px 12px 9px 40%;
		border-bottom: 1px solid #e2e8f0;
		text-align: left;
		overflow-wrap: anywhere;
	}
	.single-news-area .entry-content table.ut-comparison-table.ut-stackable:not(.ut-as-grid) td:last-child { border-bottom: 0; }
	.single-news-area .entry-content table.ut-comparison-table.ut-stackable:not(.ut-as-grid) td::before {
		content: attr(data-label);
		position: absolute;
		top: 9px;
		left: 12px;
		width: calc(40% - 22px);
		font-weight: 800;
		font-size: 0.78rem;
		line-height: 1.3;
		text-transform: uppercase;
		letter-spacing: 0.02em;
		color: #475569;
	}
	.single-news-area .entry-content .ut-comparison-table-wrap,
	.single-news-area .entry-content .ut-table-wrap {
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		box-shadow: none;
		border: 0;
	}
	.single-news-area .entry-content table.ut-comparison-table.ut-force-scroll-table,
	.single-news-area .entry-content table.ut-comparison-table.ut-as-grid { min-width: 560px; }

	/* Compact mobile card paddings */
	.single-news-area .entry-content .ut-product-card,
	.single-news-area .entry-content .ut-calc-card,
	.single-news-area .entry-content .ut-step-card,
	.single-news-area .entry-content .ut-step-guide-card,
	.single-news-area .entry-content .ut-comic-panel { padding: 12px; }
	.single-news-area .entry-content > p,
	.single-news-area .entry-content > ul > li,
	.single-news-area .entry-content > ol > li,
	.single-news-area .entry-content .ut-article-container > p,
	.single-news-area .entry-content .ut-top10-article > p { font-size: 1rem; }
}

/* ---------- 6. Quick TOC (server-rendered by usefulthings-core.php) ---------- */
.single-news-area .entry-content .ut-quick-toc {
	margin: 1.25rem 0 1.75rem;
	padding: 14px 16px;
	border: 1px solid #cbd5e1;
	border-left: 5px solid #0263d0;
	border-radius: 10px;
	background: #f8fafc;
}
.single-news-area .entry-content .ut-quick-toc-title { display: block; margin-bottom: 6px; font-weight: 800; font-size: 0.95rem; color: #0f172a; }
.single-news-area .entry-content .ut-quick-toc ol { margin: 0; padding-left: 1.3rem; columns: 2 240px; column-gap: 28px; }
.single-news-area .entry-content .ut-quick-toc li { margin: 0 0 4px; font-size: 0.93rem; line-height: 1.45; break-inside: avoid; }
.single-news-area .entry-content .ut-quick-toc a { color: #0263d0; text-decoration: none; }
.single-news-area .entry-content .ut-quick-toc a:hover { text-decoration: underline; }

/* ---------- 6b. Breadcrumbs (theme .page-breadcrumb styling kept on the <ol>) & live related guides ---------- */
.ut-breadcrumbs { display: block; }
.ut-breadcrumbs .page-breadcrumb { margin: 0; padding: 0; list-style: none; }
.ut-breadcrumbs .page-breadcrumb > li { display: inline; }
.single-news-area .entry-content .ut-related-live .ut-related-live-list { margin: 0.5rem 0 0; padding-left: 1.2rem; }
.single-news-area .entry-content .ut-related-live .ut-related-live-list li { margin: 0 0 4px; font-size: 0.97rem; line-height: 1.5; }

/* ---------- 7. Back to top ---------- */
.ut-back-top {
	position: fixed;
	right: 16px;
	bottom: 18px;
	z-index: 9990;
	width: 46px;
	height: 46px;
	border: 2px solid #fff;
	border-radius: 50%;
	background: #0f172a;
	color: #fff;
	font: 800 1.3rem/1 system-ui, sans-serif;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
	cursor: pointer;
	opacity: 0;
	visibility: hidden;
	transform: translateY(10px);
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}
.ut-back-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.ut-back-top:focus-visible { outline: 3px solid #93c5fd; outline-offset: 2px; }

/* ---------- 8. Smart Lightbox HD ---------- */
html.ut-lb-open,
html.ut-lb-open body { overflow: hidden !important; }
.ut-smart-lb-backdrop {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	flex-direction: column;
	background: rgba(2, 6, 23, 0.97);
	color: #f8fafc;
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	animation: utLbIn 0.18s ease-out;
}
.ut-smart-lb-backdrop[hidden],
.ut-smart-lb-backdrop [hidden] { display: none !important; }
@keyframes utLbIn { from { opacity: 0; } to { opacity: 1; } }
.ut-smart-lb-bar {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	gap: 6px;
	flex-wrap: wrap;
	padding: 8px 10px;
	background: rgba(15, 23, 42, 0.96);
	border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}
.ut-smart-lb-counter { min-width: 44px; font-weight: 800; font-size: 0.9rem; }
.ut-smart-lb-spacer { flex: 1 1 auto; }
.ut-smart-lb-btn {
	min-width: 38px;
	height: 36px;
	padding: 0 10px;
	border: 1.5px solid rgba(248, 250, 252, 0.55);
	border-radius: 8px;
	background: transparent;
	color: #f8fafc;
	font: 700 0.85rem/1 system-ui, sans-serif;
	cursor: pointer;
}
.ut-smart-lb-btn:hover { background: rgba(248, 250, 252, 0.12); }
.ut-smart-lb-btn:focus-visible { outline: 3px solid #93c5fd; outline-offset: 1px; }
.ut-smart-lb-btn[aria-pressed="true"] { background: #f8fafc; color: #0f172a; }
.ut-smart-lb-btn[disabled] { opacity: 0.35; cursor: default; }
.ut-smart-lb-close { font-size: 1.25rem; }
.ut-smart-lb-quads { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.ut-smart-lb-stage {
	position: relative;
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior: contain;
	touch-action: pan-y pinch-zoom;
	text-align: center;
	padding: 12px;
}
.ut-smart-lb-stage.is-zoomed { touch-action: pan-x pan-y pinch-zoom; cursor: grab; text-align: left; }
.ut-smart-lb-stage.is-dragging { cursor: grabbing; }
.ut-smart-lb-media {
	display: inline-block;
	width: 100%;
	max-width: var(--ut-lb-max, 1200px);
	vertical-align: top;
	user-select: none;
}
.ut-smart-lb-stage.is-zoomed .ut-smart-lb-media { width: 200%; max-width: calc(var(--ut-lb-max, 1200px) * 2); }
.ut-smart-lb-media img,
.ut-smart-lb-media svg {
	display: block;
	width: 100%;
	height: auto;
	margin: 0 auto;
	border-radius: 6px;
	background: #fff;
	-webkit-user-drag: none;
}
.ut-smart-lb-quad {
	position: relative;
	width: 100%;
	overflow: hidden;
	border-radius: 6px;
	background: #fff;
}
.ut-smart-lb-quad img {
	position: absolute;
	top: 0;
	left: 0;
	width: 200%;
	max-width: none;
	border-radius: 0;
	transition: transform 0.25s ease;
}
.ut-smart-lb-caption {
	flex: 0 0 auto;
	max-height: 32%;
	overflow-y: auto;
	padding: 10px 14px 12px;
	background: rgba(15, 23, 42, 0.96);
	border-top: 1px solid rgba(148, 163, 184, 0.25);
	font-size: 0.92rem;
	line-height: 1.5;
	text-align: left;
}
.ut-smart-lb-caption:empty { display: none; }
.ut-smart-lb-caption strong { display: block; margin-bottom: 3px; font-size: 1rem; color: #fde68a; }
.ut-smart-lb-hint { opacity: 0.7; font-size: 0.78rem; }
@media (max-width: 680px) {
	.ut-smart-lb-bar { gap: 4px; padding: 6px; }
	.ut-smart-lb-btn { min-width: 34px; height: 34px; padding: 0 8px; font-size: 0.8rem; }
	.ut-smart-lb-stage { padding: 6px 0; }
	.ut-smart-lb-hint { display: none; }
}

/* ---------- 9. Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
	.ut-smart-lb-backdrop { animation: none; }
	.ut-smart-lb-quad img,
	.ut-back-top { transition: none; }
	html { scroll-behavior: auto !important; }
}
