/**
 * Editorial blog and legal title presentation.
 * Scoped so Home, Kitchen and Menu Item reference styles stay untouched.
 */

.mambo-editorial__sr {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

main.mambo-editorial {
	padding-block: 1.5rem 3.5rem;
}

.mambo-editorial__reading {
	width: min(100% - (2 * var(--mambo-gutter, 1rem)), 760px);
	min-width: 0;
	margin-inline: auto;
}

@media (min-width: 64rem) {
	.mambo-editorial__reading {
		width: 720px;
	}
}

.mambo-editorial__title,
.mambo-legal-page .mambo-page-title {
	margin: 0.25rem 0 0.75rem;
	font-size: clamp(2rem, 4vw, 2.75rem);
	font-weight: 900;
	letter-spacing: -0.04em;
	line-height: 1.08;
}

.mambo-editorial__breadcrumb {
	margin: 0 0 1rem;
	color: var(--mambo-color-muted);
	font-size: 0.8125rem;
	line-height: 1.4;
}

.mambo-editorial__breadcrumb ol {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 0;
	margin: 0;
	padding: 0;
	list-style: none;
}

.mambo-editorial__breadcrumb li:not(:last-child)::after {
	content: "›";
	margin-inline: 0.35rem;
	color: var(--mambo-color-muted);
}

.mambo-editorial__breadcrumb a {
	color: var(--mambo-color-burnt);
	font-weight: 700;
}

.mambo-editorial__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem 0.85rem;
	margin: 0 0 1rem;
	color: var(--mambo-color-muted);
	font-size: 0.875rem;
}

.mambo-editorial__meta a {
	color: var(--mambo-color-burnt);
	font-weight: 800;
}

.mambo-editorial__figure {
	margin: 0 0 1.25rem;
}

.mambo-editorial__featured,
.mambo-editorial__content img,
.mambo-editorial__intro img {
	display: block;
	width: 100%;
	max-width: 100%;
	height: auto;
}

.mambo-editorial__featured {
	border-radius: var(--mambo-radius-md);
}

.mambo-editorial__intro,
.mambo-editorial__content {
	font-size: 1.0625rem;
	line-height: 1.65;
}

.mambo-editorial__intro p,
.mambo-editorial__content p,
.mambo-editorial__intro li,
.mambo-editorial__content li {
	margin-block: 0 1rem;
}

.mambo-editorial__content h2,
.mambo-editorial__intro h2 {
	margin: 1.75rem 0 0.65rem;
	font-size: clamp(1.5rem, 2.2vw, 2rem);
	font-weight: 900;
	letter-spacing: -0.03em;
	line-height: 1.15;
}

.mambo-editorial__content h3,
.mambo-editorial__intro h3 {
	margin: 1.4rem 0 0.45rem;
	font-size: clamp(1.2rem, 1.6vw, 1.45rem);
	font-weight: 800;
	letter-spacing: -0.02em;
	line-height: 1.25;
}

.mambo-editorial__content ul,
.mambo-editorial__content ol,
.mambo-editorial__intro ul,
.mambo-editorial__intro ol {
	margin: 0 0 1rem;
	padding-inline-start: 1.25rem;
}

.mambo-editorial__content blockquote,
.mambo-editorial__intro blockquote {
	margin: 1.25rem 0;
	padding: 0.15rem 0 0.15rem 1rem;
	border-left: 4px solid var(--mambo-color-burnt);
	color: var(--mambo-color-muted);
}

/*
 * Tables (SPEC-02 2.1.6): never wider than the reading column. Wide tables
 * scroll sideways inside their own box; the page itself never scrolls.
 * Selectors carry the main.mambo-editorial prefix so Core's on-demand table
 * styles (.wp-block-table.aligncenter {display: table; width: auto}) cannot
 * win on load order.
 */
.mambo-editorial__content,
.mambo-editorial__intro {
	min-width: 0;
	max-width: 100%;
}

main.mambo-editorial .mambo-editorial__content .wp-block-table,
main.mambo-editorial .mambo-editorial__intro .wp-block-table {
	display: block;
	float: none;
	box-sizing: border-box;
	width: auto;
	max-width: 100%;
	margin: 0 0 1.25rem;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior-x: contain;
}

main.mambo-editorial .mambo-editorial__content .wp-block-table table,
main.mambo-editorial .mambo-editorial__intro .wp-block-table table {
	width: 100%;
	max-width: none;
	margin: 0;
	border-collapse: collapse;
}

/* Tables pasted as raw HTML (no block wrapper) become their own scroll box. */
main.mambo-editorial .mambo-editorial__content table:not(.wp-block-table table),
main.mambo-editorial .mambo-editorial__intro table:not(.wp-block-table table) {
	display: block;
	box-sizing: border-box;
	width: max-content;
	max-width: 100%;
	margin: 0 0 1.25rem;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	border-collapse: collapse;
}

.mambo-editorial__content th,
.mambo-editorial__content td,
.mambo-editorial__intro th,
.mambo-editorial__intro td {
	padding: 0.55rem 0.75rem;
	border: 1px solid var(--mambo-color-line);
	text-align: start;
	vertical-align: top;
	overflow-wrap: break-word;
}

@media (max-width: 620px) {
	/* Keep columns readable on phones; extra width scrolls inside the table box. */
	main.mambo-editorial .mambo-editorial__content th,
	main.mambo-editorial .mambo-editorial__content td,
	main.mambo-editorial .mambo-editorial__intro th,
	main.mambo-editorial .mambo-editorial__intro td {
		min-width: 7.5rem;
	}
}

.mambo-editorial__content .wp-block-button__link,
.mambo-editorial__intro .wp-block-button__link {
	display: inline-block;
	border-radius: var(--mambo-radius-pill);
	background: var(--mambo-color-ink);
	color: var(--mambo-color-paper);
	font-weight: 800;
	text-decoration: none;
}

.mambo-editorial__categories {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 1rem 0 0.25rem;
}

.mambo-editorial__categories a {
	display: inline-block;
	padding: 0.4rem 0.8rem;
	border-radius: var(--mambo-radius-pill);
	background: var(--mambo-color-sand);
	color: var(--mambo-color-ink);
	font-size: 0.875rem;
	font-weight: 800;
	text-decoration: none;
}

.mambo-editorial__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1rem;
	width: min(100%, 72rem);
	margin: 1.5rem auto 0;
}

.mambo-editorial-card {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid var(--mambo-color-line);
	border-radius: 1rem;
	background: var(--mambo-color-paper);
}

.mambo-editorial-card__image {
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	object-fit: cover;
}

.mambo-editorial-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 0.5rem;
	padding: 1rem;
}

.mambo-editorial-card__title {
	margin: 0;
	font-size: 1.25rem;
	font-weight: 800;
	letter-spacing: -0.03em;
	line-height: 1.2;
}

.mambo-editorial-card__title a {
	color: inherit;
	text-decoration: none;
}

.mambo-editorial-card__title a:hover {
	color: var(--mambo-color-burnt);
}

.mambo-editorial-card__excerpt {
	margin: 0;
	color: var(--mambo-color-muted);
	font-size: 0.9375rem;
	line-height: 1.5;
}

.mambo-editorial-card__date {
	margin-top: auto;
	color: var(--mambo-color-muted);
	font-size: 0.8125rem;
}

.mambo-editorial__pagination,
.navigation.mambo-editorial__pagination {
	width: min(100%, 72rem);
	margin: 1.25rem auto 0;
}

.mambo-editorial__pagination .nav-links,
.navigation.mambo-editorial__pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: center;
}

.mambo-editorial__pagination a,
.mambo-editorial__pagination span,
.navigation.mambo-editorial__pagination a,
.navigation.mambo-editorial__pagination span {
	display: inline-block;
	padding: 0.35rem 0.7rem;
	border: 1px solid var(--mambo-color-line);
	border-radius: var(--mambo-radius-pill);
	background: var(--mambo-color-paper);
	color: var(--mambo-color-ink);
	font-size: 0.875rem;
	font-weight: 700;
	text-decoration: none;
}

.mambo-editorial__cta {
	margin: 2rem 0 0;
}

.mambo-editorial .mambo-quote-cta {
	display: inline-block;
	max-width: 100%;
	padding: 0.8rem 1.25rem;
	border-radius: 999px;
	background: #172c3b;
	color: #fff;
	font-weight: 700;
	line-height: 1.4;
	text-decoration: none;
}

.mambo-editorial .mambo-quote-cta:hover {
	background: #29475d;
	color: #fff;
}

.mambo-editorial__empty {
	width: min(100%, 720px);
	margin: 1.5rem auto 0;
	color: var(--mambo-color-muted);
}

.mambo-editorial__related {
	width: min(100%, 72rem);
	margin: 2.5rem auto 0;
}

.mambo-editorial__related-title {
	margin: 0 0 0.25rem;
	font-size: clamp(1.5rem, 2vw, 2rem);
	line-height: 1.15;
}

.mambo-editorial .mambo-contact-rail {
	position: fixed;
	top: 58%;
	right: 0;
	z-index: 60;
	display: flex;
	flex-direction: column;
	gap: 8px;
	transform: translateY(-50%);
}

.mambo-editorial .mambo-contact-rail__action {
	display: block;
	min-width: 152px;
	padding: 14px 13px;
	border: 0;
	border-radius: 15px 0 0 15px;
	background: #fff;
	color: #151515;
	font: inherit;
	font-size: 12px;
	font-weight: 900;
	line-height: normal;
	text-align: center;
	text-decoration: none;
	box-shadow: 0 9px 25px rgb(0 0 0 / 14%);
	cursor: pointer;
}

.mambo-editorial .mambo-contact-rail__action--chat {
	background: var(--mambo-color-gold);
	color: #24170f;
}

html:not([data-mambo-webchat-bound]) .mambo-editorial .mambo-contact-rail__action--chat {
	display: none;
}

.mambo-editorial .mambo-contact-fallback {
	position: fixed;
	right: 24px;
	bottom: 24px;
	z-index: 70;
	width: min(360px, calc(100vw - 48px));
	padding: 24px;
	border: 1px solid #6d665e;
	border-radius: 20px;
	background: var(--mambo-color-cream);
	color: var(--mambo-color-ink);
	box-shadow: 0 14px 45px rgb(0 0 0 / 20%);
}

.mambo-editorial .mambo-contact-fallback[hidden] {
	display: none;
}

.mambo-editorial a:focus-visible,
.mambo-editorial button:focus-visible,
.mambo-legal-page a:focus-visible {
	outline: 3px solid var(--mambo-focus);
	outline-offset: 3px;
}

.mambo-legal-page .mambo-page-title {
	width: min(100%, 760px);
	margin-inline: auto;
}

@media (min-width: 48rem) {
	.mambo-editorial__grid {
		grid-template-columns: 1fr 1fr;
	}
}

@media (min-width: 64rem) {
	.mambo-editorial__grid {
		grid-template-columns: 1fr 1fr 1fr;
	}
}

@media (max-width: 980px) {
	.mambo-editorial .mambo-contact-rail__action {
		min-width: 64px;
		padding: 14px 6px;
		font-size: 10px;
	}
}

@media (max-width: 620px) {
	main.mambo-editorial {
		padding-bottom: 6.5rem;
	}

	.mambo-editorial .mambo-contact-rail {
		top: auto;
		right: 12px;
		bottom: 12px;
		left: 12px;
		flex-direction: row;
		transform: none;
	}

	.mambo-editorial .mambo-contact-rail__action {
		flex: 1;
		border-radius: 13px;
		padding: 11px 4px;
	}
}
