/**
 * What's Cooking block (cwp/category-toggles) — front-end + editor canvas.
 */

.mtt-category-toggles {
	position: relative;
	box-sizing: border-box;
    padding: 100px 0 100px;
	color: var(--mtt-cat-toggle-fg, inherit);
	background-color: var(--mtt-cat-toggle-bg, transparent);
}

.mtt-category-toggles *,
.mtt-category-toggles *::before,
.mtt-category-toggles *::after {
	box-sizing: border-box;
}

.mtt-category-toggles__preview {
	margin: 0;
	padding: 0;
}

.mtt-category-toggles__placeholder {
	margin: 0;
	padding: 1rem;
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.mtt-category-toggles__inner {
	max-width: 1187px;
	margin: 0 auto;
}

.mtt-category-toggles__heading {
    margin: 0 0 38px;
    color: var(--dark-brown, #5E4234);
    text-align: center;
    font-family: "TT Norms Pro Condensed";
    font-size: 50px;
    font-style: normal;
    font-weight: 600;
    line-height: 120%;
}

.mtt-category-toggles__nav {
	margin: 0 0 clamp(1.25rem, 3vw, 2rem);
}

.mtt-category-toggles__button-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 13px 10px;
    align-items: center;
    padding: 0;
    list-style: none;
    max-width: 860px;
    margin: 0 auto 80px;
}

.mtt-category-toggles__button-item {
	margin: 0;
	padding: 0;
}

.mtt-category-toggles__btn,
.mtt-category-toggles__pill {
    border-radius: 999px;
    border: 2px solid currentColor;
    color: inherit;
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease;
    display: flex;
    padding: 16px 20px;
    justify-content: center;
    align-items: center;
    gap: 10px;
    font-family: "TT Norms Pro"!important;
    font-size: 14px!important;
    font-style: normal!important;
    font-weight: 700!important;
    line-height: 14px!important;
    font-variant: all-small-caps;
    letter-spacing: 2.1px;
    background: transparent;
    border: 2px solid var(--wp--preset--color--brown, #5e4234);
    border-radius: 60px;
    box-sizing: border-box;
}

.mtt-category-toggles__btn:hover,
.mtt-category-toggles__pill:hover {
	background-color: #5E4234;
	color:#fff8d2;
	text-decoration:none;
}
.block-area-recipes-dropdown .wp-block-column ul li .mtt-category-toggles__btn {
	width:380px!important;
	font-size:16px!important;
}

.mtt-category-toggles__content {
	display: block;
}

.mtt-category-toggles__content--split {
	align-items: center;
	position: relative;
}
/*
 * Split layout — Cailee Eats Visual Design (Figma 998:3848):
 * highlight column + row of cards with vertical rules, image | copy, CTA underline bar.
 */
.mtt-category-toggles__content--split .mtt-category-toggles__highlight-wrap {
	align-self: center;
	position: absolute;
	left: -83px;
	top: -72px;
	transform: rotate(-9.898deg);
	width: 100px;
	text-align: left;
}

/* Misc/callout — Cailee Eats */
.mtt-category-toggles__content--split .mtt-category-toggles__highlight {
	flex-direction: column;
	align-items: center;
	gap: 7px;
	max-width: 11rem;
	margin: 0;
	text-align: left;
	color: #d63007;
	font-family: "Cailee Eats", var(--wp--preset--font-family--cailee-eats, cursive);
	font-size: 24px;
	font-style: normal;
	font-weight: 400;
	line-height: 90%;
}

.mtt-category-toggles__content--split .mtt-category-toggles__highlight-arrow-svg {
	transform: rotate(-10deg);
}

.mtt-category-toggles__content--split .mtt-category-toggles__grid {
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	gap: 0;
	min-width: 0;
	justify-content: space-between;
}

.mtt-category-toggles__content--split .mtt-category-toggles__card {
	flex-direction: row;
	flex-wrap: nowrap;
	align-items: flex-start;
	gap: 30px;
	padding: 0 0 0 5px;
	border-right: 1px solid var(--dark-brown, #5e4234);
	border-radius: 0;
	width: 31.5%;
}

.mtt-category-toggles__content--split .mtt-category-toggles__card:first-child {
	padding-left: 0;
}

.mtt-category-toggles__content--split .mtt-category-toggles__card:last-child {
	padding-right: 0;
	border-right: none;
}

.mtt-category-toggles__content--split .mtt-category-toggles__media {
	flex: 0 0 135px;
	width: 135px;
	max-width: 135px;
	aspect-ratio: 65/82;
	border-radius: 0;
}

.mtt-category-toggles__content--split .mtt-category-toggles__image {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.mtt-category-toggles__content--split .mtt-category-toggles__body {
	flex: 1 1 0;
	min-width: 0;
	gap: 10px 0;
	padding-top: 10px;
}

.mtt-category-toggles__content--split .mtt-category-toggles__label {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 1.8px;
	line-height: 1.2;
	opacity: 1;
	margin-bottom: 10px;
}

.mtt-category-toggles__content--split .mtt-category-toggles__title {
	font-family: "TT Norms Pro Condensed", var(--wp--preset--font-family--tt-norms-pro-condensed, sans-serif);
	font-size: 28px;
	font-style: normal;
	font-weight: 600;
	line-height: 100%;
}

.mtt-category-toggles__content--split .mtt-category-toggles__title-link:hover {
	text-decoration: none;
}

.mtt-category-toggles__content--split .mtt-category-toggles__cta-wrap {
	margin: 0;
	align-self: flex-start;
}

.mtt-category-toggles__content--split .mtt-category-toggles__link {
	display: block;
	padding: 0;
	border-bottom: 2px solid var(--dark-brown, #5e4234);
	text-transform: uppercase;
	text-decoration: none;
	text-align: center;
	font-style: normal;
	font-size: 14px;
	font-weight: 700;
	line-height: 2.5; /* 433.559% */
	font-variant: all-small-caps;
	letter-spacing: 2.1px;
}

.mtt-category-toggles__content--split .mtt-category-toggles__link:hover {
	opacity: 0.88;
}

@media (max-width: 782px) {
	.mtt-category-toggles__content--split .mtt-category-toggles__grid {
		flex-direction: column;
		align-items: stretch;
		gap: 2rem;
	}

	.mtt-category-toggles__content--split .mtt-category-toggles__card {
		border-right: none;
		padding: 0 0 2rem;
		border-bottom: 1px solid var(--dark-brown, #5e4234);
	}

	.mtt-category-toggles__content--split .mtt-category-toggles__card:last-child {
		padding-bottom: 0;
		border-bottom: none;
	}
}

.mtt-category-toggles__highlight-wrap {
	min-width: 0;
}

.mtt-category-toggles__highlight {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	flex-wrap: wrap;
	margin: 0;
	font-family: var(--wp--preset--font-family--tt-norms-pro, "TT Norms Pro", system-ui, sans-serif);
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.35;
	color: inherit;
}

.mtt-category-toggles__highlight-arrow-svg {
	display: block;
	flex-shrink: 0;
}

.mtt-category-toggles__grid {
	display: grid;
	grid-template-columns: repeat(var(--mtt-col-count, 1), minmax(0, 1fr));
	gap: clamp(1rem, 2.5vw, 1.75rem);
}

@media (max-width: 600px) {
	.mtt-category-toggles__grid {
		grid-template-columns: 1fr;
	}
}

.mtt-category-toggles__card {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	min-width: 0;
}

.mtt-category-toggles__media {
	overflow: hidden;
	border-radius: 6px;
	line-height: 0;
}

.mtt-category-toggles__image {
	display: block;
	width: 100%;
	height: auto;
	vertical-align: middle;
}

.mtt-category-toggles__body {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
}

.mtt-category-toggles__label {
	margin: 0;
	font-family: var(--wp--preset--font-family--tt-norms-pro, "TT Norms Pro", system-ui, sans-serif);
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	line-height: 1.3;
	color: inherit;
	opacity: 0.95;
}

.mtt-category-toggles__title {
	margin: 0;
	font-family: var(--wp--preset--font-family--tt-norms-pro, "TT Norms Pro", system-ui, sans-serif);
	font-size: clamp(1.125rem, 2vw, 1.35rem);
	font-weight: 700;
	line-height: 1.25;
	color: inherit;
}

.mtt-category-toggles__title-link {
	color: inherit;
	text-decoration: none;
}

.mtt-category-toggles__title-link:hover {
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

.mtt-category-toggles__title-link:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 3px;
	border-radius: 2px;
}

.mtt-category-toggles__cta-wrap {
	margin: 0.25rem 0 0;
}

.mtt-category-toggles__link {
	font-family: var(--wp--preset--font-family--tt-norms-pro, "TT Norms Pro", system-ui, sans-serif);
	font-size: 0.9375rem;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 0.15em;
	color: inherit;
}

.mtt-category-toggles__link:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 3px;
	border-radius: 2px;
}

/* -------------------------------------------------------------------------
   Inside primary mega dropdown only — Figma 830:2828 (stacked rows; pills below)
   ------------------------------------------------------------------------- */

.mtt-primary-menu-dropdown .mtt-category-toggles {
	background-color: transparent;
	padding: 0;
}

.mtt-primary-menu-dropdown .mtt-category-toggles__inner {
	display: flex;
	flex-direction: column;
	margin: 0;
	max-width: none;
}

.mtt-primary-menu-dropdown .mtt-category-toggles__heading {
	flex-shrink: 0;
	font-size: clamp(1.5rem, 3vw, 2rem);
	margin: 0 0 1rem;
	order: 1;
	text-align: left;
}

.mtt-primary-menu-dropdown .mtt-category-toggles__content {
	flex-shrink: 0;
	order: 2;
	width: 100%;
}

.mtt-primary-menu-dropdown .mtt-category-toggles__nav {
	flex-shrink: 0;
	margin: clamp(1.5rem, 3vw, 2.5rem) 0 0;
	order: 3;
}

.mtt-primary-menu-dropdown .mtt-category-toggles__button-list {
	justify-content: flex-start;
	margin: 0;
	max-width: none;
}

.mtt-primary-menu-dropdown .mtt-category-toggles__content--split {
	position: static;
}

.mtt-primary-menu-dropdown .mtt-category-toggles__content--split .mtt-category-toggles__highlight-wrap {
	display: none;
}

/* Vertical stack of horizontal cards, 50px gap (Figma) */
.mtt-primary-menu-dropdown .mtt-category-toggles__grid {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 50px;
	grid-template-columns: unset;
}

.mtt-primary-menu-dropdown .mtt-category-toggles__card {
	flex-direction: row;
	align-items: flex-start;
	flex-wrap: nowrap;
	gap: 30px;
	max-width: 100%;
	width: 100%;
}

.mtt-primary-menu-dropdown .mtt-category-toggles__content--split .mtt-category-toggles__card {
	border-bottom: none;
	border-right: none;
	padding: 0;
	width: 100%;
}

.mtt-primary-menu-dropdown .mtt-category-toggles__media {
	border-radius: 0;
	flex: 0 0 150px;
	height: 189px;
	max-width: 150px;
	overflow: hidden;
	width: 150px;
}

.mtt-primary-menu-dropdown .mtt-category-toggles__image {
	height: 100%;
	object-fit: cover;
	width: 100%;
}

.mtt-primary-menu-dropdown .mtt-category-toggles__body {
	align-items: flex-start;
	flex: 0 1 208px;
	gap: 10px;
	max-width: 208px;
	min-width: 0;
	padding-top: 0;
	width: 208px;
}

.mtt-primary-menu-dropdown .mtt-category-toggles__label {
	color: var(--wp--preset--color--brown, #5e4234);
	font-family: var(--wp--preset--font-family--tt-norms-pro, "TT Norms Pro", sans-serif);
	font-size: 12px;
	font-style: normal;
	font-weight: 700;
	letter-spacing: 1.8px;
	line-height: 34px;
	margin: 0;
	opacity: 1;
	text-transform: uppercase;
}

.mtt-primary-menu-dropdown .mtt-category-toggles__title {
	color: var(--wp--preset--color--brown, #5e4234);
	font-family: var(--wp--preset--font-family--tt-norms-pro-cond, "TT Norms Pro Condensed", sans-serif);
	font-size: 28px;
	font-style: normal;
	font-weight: 600;
	line-height: 1;
	margin: 0;
}

.mtt-primary-menu-dropdown .mtt-category-toggles__cta-wrap {
	align-self: stretch;
	margin: 0;
	max-width: 100%;
	width: 100%;
}

.mtt-primary-menu-dropdown .mtt-category-toggles__link {
	border-bottom: 2px solid var(--wp--preset--color--brown, #5e4234);
	box-sizing: border-box;
	color: var(--wp--preset--color--brown, #5e4234);
	display: block;
	font-family: var(--wp--preset--font-family--tt-norms-pro, "TT Norms Pro", sans-serif);
	font-size: 14px;
	font-style: normal;
	font-weight: 700;
	font-variant: normal;
	letter-spacing: 2.1px;
	line-height: 14px;
	padding: 16px 0;
	text-align: center;
	text-decoration: none;
	text-transform: uppercase;
	width: fit-content;
}

.mtt-primary-menu-dropdown .mtt-category-toggles__link:hover {
	opacity: 0.88;
}

.mtt-primary-menu-dropdown .mtt-category-toggles__content--split .mtt-category-toggles__body {
	padding-top: 0;
}
@media (max-width:1375px) {
	.mtt-category-toggles__content--split {
	    width: 90%;
	    margin: 0 auto;
	}
	.mtt-category-toggles__content--split .mtt-category-toggles__card {
		gap:10px;
	}
}
@media (max-width:1240px) {
	.mtt-category-toggles__content--split {
        width: 86%;
        margin: 0 auto;
    }
}
@media (max-width:1170px) {
	.mtt-category-toggles__content--split .mtt-category-toggles__highlight-wrap {
		left:0;
	}
	.mtt-category-toggles__highlight-arrow {
	    margin: -42px 0 0 -125px;
	    transform: rotate(19.102deg);
	}
	.mtt-category-toggles__inner {
		max-width:1000px;
	}
    .mtt-category-toggles__content--split {
        width: 100%;
        margin: 0 auto;
    }
	.mtt-category-toggles__content--split .mtt-category-toggles__title {
		font-size:22px;
	}
}
@media (max-width: 600px) {
	.mtt-primary-menu-dropdown .mtt-category-toggles__card {
		flex-direction: column;
	}

	.mtt-primary-menu-dropdown .mtt-category-toggles__media {
		flex: none;
		height: auto;
		max-width: 100%;
		width: 100%;
		aspect-ratio: 150 / 189;
	}

	.mtt-primary-menu-dropdown .mtt-category-toggles__body {
		flex: 1 1 auto;
		max-width: 100%;
		width: 100%;
	}
}

/* Pills <nav> is stripped from the DOM when rendering the recipes area in the mobile
   flyout (see mtt_category_toggles_block_for_site_mobile_flyout). Hide if that output
   is cached or rendered without the filter. */
.site-mobile-menu__inner .mtt-category-toggles__nav {
	display: none !important;
}

/* -------------------------------------------------------------------------
   Mobile header flyout: recipes lead + mega panels in narrow column (≤1029px)
   ------------------------------------------------------------------------- */
@media (max-width: 1029px) {
	/* Lead area: only the What’s Cooking column. Other recipe columns (lists, copy)
	   are hidden here and only appear in the expanded slot panel (toggles are not repeated there) */
	.site-mobile-menu__recipes .block-area-recipes-dropdown .wp-block-column:not(:has(.mtt-category-toggles)) {
		display: none !important;
	}

	.site-mobile-menu__recipes .wp-block-columns,
	.site-mobile-menu__recipes .block-area-recipes-dropdown .wp-block-columns {
		display: flex;
		flex-direction: column !important;
		gap: 0;
	}

	.site-mobile-menu__recipes .mtt-category-toggles {
		padding-top: 0;
		padding-bottom: 1.25rem;
	}

	.site-mobile-menu__recipes .mtt-category-toggles__inner {
		max-width: 100%;
	}

	.site-mobile-menu__recipes .mtt-category-toggles__button-list {
		flex-wrap: wrap;
		justify-content: flex-start;
		gap: 0.5rem 0.75rem;
	}

	/* Mobile flyout — recipe post grid: Figma 946:10404 (78×98 img, 22.5 / 4 / 20) */
	.site-mobile-menu__recipes .mtt-category-toggles__content--split .mtt-category-toggles__grid,
	.site-mobile-menu__recipes .mtt-category-toggles__grid {
		display: flex;
		flex-direction: column;
		align-items: stretch;
		gap: 20px;
		grid-template-columns: unset;
	}

	.site-mobile-menu__recipes .mtt-category-toggles__content--split .mtt-category-toggles__card,
	.site-mobile-menu__recipes .mtt-category-toggles__card {
		display: flex;
		flex-direction: row;
		flex-wrap: nowrap;
		align-items: flex-start;
		gap: 22.5px;
		width: 100%;
		min-width: 0;
		padding: 0;
		border: none;
	}

	.site-mobile-menu__recipes .mtt-category-toggles__content--split .mtt-category-toggles__card:last-child,
	.site-mobile-menu__recipes .mtt-category-toggles__card:last-child {
		padding-bottom: 0;
		border-bottom: none;
	}

	.site-mobile-menu__recipes .mtt-category-toggles__media {
		flex: 0 0 78px;
		width: 78px;
		max-width: 78px;
		height: 98px;
		aspect-ratio: auto;
		border-radius: 0;
		overflow: hidden;
	}

	.site-mobile-menu__recipes .mtt-category-toggles__image {
		width: 100%;
		height: 100%;
		object-fit: cover;
	}

	.site-mobile-menu__recipes .mtt-category-toggles__body {
		display: flex;
		flex-direction: column;
		align-items: flex-start;
		gap: 4px;
		flex: 1 1 0;
		min-width: 0;
		max-width: none;
		width: auto;
		padding-top: 0;
	}

	.site-mobile-menu__recipes .mtt-category-toggles__label {
		margin: 0;
		color: var(--wp--preset--color--brown, #5e4234);
		font-family: var(--wp--preset--font-family--tt-norms-pro), "TT Norms Pro", sans-serif;
		font-size: 11px;
		font-style: normal;
		font-weight: 700;
		letter-spacing: 1.65px;
		line-height: 25.5px;
		text-transform: uppercase;
		opacity: 1;
	}

	.site-mobile-menu__recipes .mtt-category-toggles__title {
		margin: 0;
		color: var(--wp--preset--color--brown, #5e4234);
		font-family: var(--wp--preset--font-family--tt-norms-pro-cond, "TT Norms Pro Condensed", sans-serif);
		font-size: 24px;
		font-style: normal;
		font-weight: 600;
		line-height: 1;
	}

	.site-mobile-menu__recipes .mtt-category-toggles__title-link {
		color: inherit;
	}

	.site-mobile-menu__recipes .mtt-category-toggles__title-link:hover {
		text-decoration: none;
	}

	.site-mobile-menu__recipes .mtt-category-toggles__cta-wrap {
		align-self: stretch;
		margin: 0;
		width: 100%;
		max-width: 100%;
	}

	.site-mobile-menu__recipes .mtt-category-toggles__link {
		display: block;
		box-sizing: border-box;
		width: fit-content;
		padding: 12px 0;
		margin: 0;
		border: none;
		border-bottom: 1.5px solid var(--wp--preset--color--brown, #5e4234);
		background: transparent;
		color: var(--wp--preset--color--brown, #5e4234);
		font-family: var(--wp--preset--font-family--tt-norms-pro), "TT Norms Pro", sans-serif;
		font-size: 14px;
		font-style: normal;
		font-weight: 700;
		font-variant: normal;
		letter-spacing: 2.1px;
		line-height: 14px;
		text-align: center;
		text-decoration: none;
		text-transform: uppercase;
	}

	.site-mobile-menu__recipes .mtt-category-toggles__link:hover {
		opacity: 0.88;
	}

	/* Expanded recipes slot: same ACF block area HTML as the flyout lead — hide What’s Cooking
	   here so those pills only show in .site-mobile-menu__recipes (one place in the UI) */
	.mtt-primary-menu-dropdown--in-drawer .mtt-category-toggles {
		display: none !important;
	}

	.mtt-primary-menu-dropdown--in-drawer .block-area-recipes-dropdown .wp-block-columns {
		display: flex;
		flex-direction: column;
		gap: 1.25rem;
	}

	.mtt-primary-menu-dropdown--in-drawer .block-area-recipes-dropdown .wp-block-column {
		width: 100% !important;
	}
}
@media (max-width:1000px) {
	.mtt-category-toggles__content--split .mtt-category-toggles__grid {
		display:block;
		max-width: 100%;
		margin: 0 auto;
	}
	.mtt-category-toggles__content--split {
		max-width:400px;
	}
	.mtt-category-toggles__content--split .mtt-category-toggles__card {
		width:100%;
		margin: 0 auto 15px;
		border-right:none;
	}
	.mtt-category-toggles__content--split .mtt-category-toggles__highlight-wrap {
	    left: inherit;
	    right: -35px;
	    transform: rotate(16.102deg);
	    top: -31px;
	}
	.mtt-category-toggles__highlight-arrow {
		display:none;
	}
}

/* Single-row horizontal pill scroller (matches mobile “What are we cooking?” layout) */
@media (max-width: 768px) {
	.mtt-category-toggles__button-list,
	.site-mobile-menu__recipes .mtt-category-toggles__button-list {
		flex-wrap: nowrap;
		justify-content: flex-start;
		max-width: none;
		overflow-x: auto;
		overflow-y: hidden;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
		-ms-overflow-style: none;
		padding-left: 20px;
	}

	.mtt-category-toggles__button-list::-webkit-scrollbar {
		display: none;
	}

	.mtt-category-toggles__button-item {
		flex-shrink: 0;
	}
	.mtt-category-toggles {
		padding: 50px 0 35px;
	}
	.mtt-category-toggles__heading {
		font-size:42px;
		margin-bottom: 25px;
	}
	.mtt-category-toggles__content--split .mtt-category-toggles__card {
		border-bottom:none;
	}
}
@media (max-width: 550px) {
	.mtt-category-toggles__content--split .mtt-category-toggles__media {
		flex: 0 0 107px;
		width: 107px;
	}
		.mtt-category-toggles__content--split .mtt-category-toggles__body {
				gap: 5px 0;
		}
}
@media (max-width: 500px) {
	.mtt-category-toggles__heading {
		font-size: 32px;
		margin: 0 0 20px;
	}	
	    .mtt-category-toggles__content--split {
        max-width: 93%;
    }
	.mtt-category-toggles__content--split .mtt-category-toggles__highlight-wrap {
		right:0;
	}
}
