/**
 * Ohdidi Frontend V2 - Blog Detail Editorial Prose & Media Styles
 * Pure CSS isolated for .content-detail container
 */

/* Modern SaaS Prose Typography (Stripe & Raycast Editorial Style) */
.content-detail {
	font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
	color: #334155;
	font-size: 15.5px;
	line-height: 1.8;
	letter-spacing: -0.01em;
}
@media (min-width: 640px) {
	.content-detail { font-size: 16px; }
}
.content-detail h2 {
	font-size: 1.45rem;
	font-weight: 800;
	color: #024834;
	letter-spacing: -0.02em;
	line-height: 1.35;
	margin-top: 2.2rem;
	margin-bottom: 0.9rem;
	padding-bottom: 0.4rem;
	border-bottom: 1px solid rgba(226, 232, 240, 0.8);
	display: flex;
	align-items: center;
	gap: 0.5rem;
}
.content-detail h3 {
	font-size: 1.2rem;
	font-weight: 750;
	color: #0f172a;
	margin-top: 1.8rem;
	margin-bottom: 0.75rem;
	line-height: 1.4;
}
.content-detail h4 {
	font-size: 1.05rem;
	font-weight: 700;
	color: #1e293b;
	margin-top: 1.5rem;
	margin-bottom: 0.6rem;
	line-height: 1.4;
}
.content-detail p {
	margin-bottom: 1.35rem;
}
.content-detail strong, .content-detail b {
	color: #0f172a;
	font-weight: 700;
}
.content-detail blockquote {
	margin: 1.8rem 0;
	padding: 1.1rem 1.4rem;
	background: rgba(248, 250, 252, 0.85);
	border-left: 3.5px solid #024834;
	border-radius: 0 16px 16px 0;
	font-style: italic;
	color: #334155;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}
.content-detail blockquote p:last-child {
	margin-bottom: 0;
}
.content-detail img {
	border-radius: 18px;
	margin: 1.75rem auto;
	box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.06);
	border: 1px solid rgba(226, 232, 240, 0.8);
	display: block;
	max-width: 100%;
	height: auto;
}
.content-detail figcaption,
.content-detail .caption,
.content-detail p > em:only-child {
	display: block;
	text-align: center;
	font-size: 0.85rem;
	color: #64748b;
	font-style: italic;
	margin-top: -1rem;
	margin-bottom: 1.5rem;
	line-height: 1.5;
}
.content-detail ul, .content-detail ol {
	margin: 1.1rem 0 1.4rem 1.4rem;
	padding-left: 1rem;
}
.content-detail ul {
	list-style-type: disc;
}
.content-detail ol {
	list-style-type: decimal;
}
.content-detail li {
	margin-bottom: 0.45rem;
}
.content-detail li::marker {
	color: #024834;
}

/* Links styling */
.content-detail a:not(.btn):not(.home-item__link):not(.blog-shortcode-btn) {
	color: #024834;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
	text-decoration-color: rgba(131, 204, 32, 0.6);
	transition: all 0.2s;
}
.content-detail a:not(.btn):not(.home-item__link):not(.blog-shortcode-btn):hover {
	color: #035a41;
	text-decoration-color: #83cc20;
}

/* Inline Code & Pre */
.content-detail code {
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
	font-size: 0.875em;
	background-color: #f1f5f9;
	color: #0f172a;
	padding: 0.2em 0.45em;
	border-radius: 6px;
	border: 1px solid #e2e8f0;
}
.content-detail pre {
	background-color: #0f172a;
	color: #f8fafc;
	padding: 1.25rem 1.5rem;
	border-radius: 14px;
	overflow-x: auto;
	margin: 1.75rem 0;
	font-size: 0.875rem;
	line-height: 1.6;
}
.content-detail pre code {
	background: transparent;
	border: 0;
	color: inherit;
	padding: 0;
}
.content-detail hr {
	border: 0;
	height: 1px;
	background: linear-gradient(to right, transparent, #e2e8f0 20%, #e2e8f0 80%, transparent);
	margin: 2.25rem 0;
}

/* ========================================================= */
/* TABLE STYLING - Chuẩn SaaS V1 & Responsive Horizontal Scroll */
/* ========================================================= */
.article-table-wrap {
	width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	margin: 1.75rem 0;
	border-radius: 16px;
	border: 1px solid #e2e8f0;
	box-shadow: 0 4px 16px -2px rgba(2, 72, 52, 0.05), 0 1px 3px rgba(0, 0, 0, 0.03);
	background: #ffffff;
	scrollbar-width: thin;
	scrollbar-color: #cbd5e1 #f8fafc;
}
.article-table-wrap::-webkit-scrollbar {
	height: 6px;
}
.article-table-wrap::-webkit-scrollbar-track {
	background: #f8fafc;
	border-radius: 0 0 16px 16px;
}
.article-table-wrap::-webkit-scrollbar-thumb {
	background: #cbd5e1;
	border-radius: 9999px;
}
.article-table-wrap::-webkit-scrollbar-thumb:hover {
	background: #94a3b8;
}

.content-detail table {
	width: 100% !important;
	min-width: 520px;
	border-collapse: separate;
	border-spacing: 0;
	font-size: 0.915rem;
	line-height: 1.6;
	text-align: left;
	margin: 0;
	background: #ffffff;
}
/* Header row: Hỗ trợ thead hoặc dòng tr đầu tiên trong tbody */
.content-detail thead tr th,
.content-detail thead tr td,
.content-detail tbody tr:first-child th,
.content-detail tbody tr:first-child td {
	background: #024834 !important;
	color: #ffffff !important;
	font-weight: 700 !important;
	padding: 13px 18px !important;
	border: none !important;
	border-bottom: 2.5px solid #83cc20 !important;
	border-right: 1px solid rgba(255, 255, 255, 0.12) !important;
	letter-spacing: -0.01em;
	font-size: 0.925rem;
}
.content-detail thead tr th:last-child,
.content-detail thead tr td:last-child,
.content-detail tbody tr:first-child th:last-child,
.content-detail tbody tr:first-child td:last-child {
	border-right: none !important;
}
.content-detail thead tr th p,
.content-detail thead tr td p,
.content-detail tbody tr:first-child th p,
.content-detail tbody tr:first-child td p,
.content-detail thead tr th strong,
.content-detail thead tr td strong,
.content-detail tbody tr:first-child th strong,
.content-detail tbody tr:first-child td strong,
.content-detail thead tr th b,
.content-detail thead tr td b,
.content-detail tbody tr:first-child th b,
.content-detail tbody tr:first-child td b,
.content-detail thead tr th span,
.content-detail thead tr td span,
.content-detail tbody tr:first-child th span,
.content-detail tbody tr:first-child td span,
.content-detail thead tr th *,
.content-detail thead tr td *,
.content-detail tbody tr:first-child th *,
.content-detail tbody tr:first-child td * {
	color: #ffffff !important;
	font-weight: 700 !important;
	margin: 0 !important;
	padding: 0 !important;
}

/* Data rows (Zebra Striping & Hover Highlight) */
.content-detail tbody tr:not(:first-child):nth-child(even) {
	background-color: #f8fafc;
}
.content-detail tbody tr:not(:first-child):nth-child(odd) {
	background-color: #ffffff;
}
.content-detail tbody tr:not(:first-child):hover {
	background-color: rgba(131, 204, 32, 0.08) !important;
	transition: background-color 0.15s ease;
}
.content-detail tbody tr:not(:first-child) td {
	padding: 12px 18px !important;
	border-bottom: 1px solid #e2e8f0 !important;
	border-right: 1px solid #f1f5f9 !important;
	color: #334155;
	vertical-align: middle;
}
.content-detail tbody tr:not(:first-child) td:last-child {
	border-right: none !important;
}
.content-detail tbody tr:last-child td {
	border-bottom: none !important;
}
.content-detail tbody td p {
	margin: 0 !important;
	padding: 2px 0 !important;
	color: inherit;
	line-height: 1.55;
}
.content-detail tbody td ul,
.content-detail tbody td ol {
	margin: 0 !important;
	padding-left: 1.25rem !important;
}
.content-detail tbody td li {
	margin-bottom: 0.2rem !important;
}

/* ========================================================= */
/* IFRAME STYLING - Responsive Video & Google Maps Embeds    */
/* ========================================================= */
.content-detail iframe {
	max-width: 100%;
	border-radius: 16px;
	border: 0;
	display: block;
	margin: 1.75rem auto;
}

/* Google Maps Embed iframe */
.content-detail iframe[src*="google.com/maps"] {
	width: 100% !important;
	min-height: 320px;
	max-height: 480px;
	border: 1px solid #e2e8f0;
	box-shadow: 0 4px 16px -2px rgba(0, 0, 0, 0.06);
}
.content-detail .map-container {
	margin: 1.75rem 0 !important;
}
.content-detail .map-container iframe {
	margin: 0 !important;
}

/* YouTube / Video Responsive Container */
.article-iframe-wrap {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	margin: 1.75rem 0;
	border-radius: 18px;
	overflow: hidden;
	box-shadow: 0 10px 25px -5px rgba(2, 72, 52, 0.08), 0 4px 10px -2px rgba(0, 0, 0, 0.04);
	border: 1px solid rgba(226, 232, 240, 0.8);
	background: #0f172a;
}
.article-iframe-wrap iframe {
	position: absolute;
	top: 0;
	left: 0;
	width: 100% !important;
	height: 100% !important;
	border: 0 !important;
	border-radius: 0 !important;
	margin: 0 !important;
}
/* YouTube Shorts / Vertical Video (9:16) */
.article-iframe-wrap.is-vertical {
	max-width: 380px;
	aspect-ratio: 9 / 16;
	margin: 1.75rem auto;
	border-radius: 20px;
	box-shadow: 0 14px 35px -6px rgba(0, 0, 0, 0.16);
}

/* Shortcode Isolation (Reset styles within component cards) */
.content-detail .blog-shortcode-hosting {
	margin: 2.5rem 0 !important;
	clear: both;
}
.content-detail .blog-shortcode-hosting p {
	margin-bottom: 0 !important;
}
.content-detail .blog-shortcode-hosting img {
	margin: 0 !important;
	box-shadow: none !important;
}
.content-detail .blog-shortcode-hosting a {
	text-decoration: none !important;
}

/* Active state for Scrollspy TOC */
.toc-link.is-active {
	color: #024834 !important;
	font-weight: 700 !important;
	background-color: rgba(2, 72, 52, 0.08) !important;
	border-radius: 8px;
	padding-left: 10px !important;
}
.toc-link.is-active .toc-num {
	color: #024834 !important;
}
.toc-link.is-active .toc-dot {
	background-color: #024834 !important;
	transform: scale(1.35);
}

/* Auto-hide empty/unfilled Google AdSense boxes gracefully */
.box-ads:has(ins[data-ad-status="unfilled"]),
.article-top-ad:has(ins[data-ad-status="unfilled"]),
.multiplex-ads:has(ins[data-ad-status="unfilled"]),
.article-in-content-ad:has(ins[data-ad-status="unfilled"]),
.infeed-ad-card:has(ins[data-ad-status="unfilled"]) {
	display: none !important;
}
