/**
 * Category Toggles (recipe slider) — Cailee Eats Visual Design
 * Figma: https://www.figma.com/design/STZkqiame44TWcoDIZj6tn — node 998:4224 (Get Cooking).
 */

.mtt-recipe-category-toggles {
	background-color: var(--wp--preset--color--pale-yellow, #fff8d2);
	box-sizing: border-box;
	padding: 109px 0 90px;
	position: relative;
}

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

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

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

.mtt-recipe-category-toggles__inner {
    max-width: 100%;
    margin: 0 auto;
    padding-left: 8%;
}

.mtt-recipe-category-toggles__graphic {
    position: absolute;
    top: -73px;
    right: 3.5%;
    z-index: 1;
    max-width: 110px;
    pointer-events: none;
    line-height: 0;
}

.mtt-recipe-category-toggles__graphic-img {
	display: block;
	width: 100%;
	height: auto;
}

/* Left column 260px (Figma) + slider */
.mtt-recipe-category-toggles__layout {
	align-items: start;
	display: grid;
	gap: 19px;
	grid-template-columns: minmax(0, 16.25rem) minmax(0, 1fr);
}

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

	.mtt-recipe-category-toggles__graphic {
		position: static;
		max-width: 120px;
		margin-left: auto;
		margin-bottom: 0.5rem;
	}
}

.mtt-recipe-category-toggles__aside {
	display: flex;
	flex-direction: column;
	gap: 0;
	min-width: 0;
}

.mtt-recipe-category-toggles__title {
	color: inherit;
	font-family: "TT Norms Pro Condensed", var(--wp--preset--font-family--tt-norms-pro-cond, sans-serif);
	font-size: 50px;
	font-style: normal;
	font-weight: 600;
	line-height: 1.2;
	margin: 17px 0 2.5rem;
}

/* Asterisk sits outside the label column (tab has no padding) */
.mtt-recipe-category-toggles__tab-asterisk {
	display: none;
	height: 24px;
	left: -35px;
	line-height: 0;
	position: absolute;
	top: 50%;
	transform: translateY(-50%) rotate(0.31deg);
	width: 25px;
	z-index: 1;
}

.mtt-recipe-category-toggles__tab-asterisk-img {
	display: block;
	height: auto;
	max-width: 100%;
	width: 100%;
}

.mtt-recipe-category-toggles__tab[aria-selected="true"] .mtt-recipe-category-toggles__tab-asterisk {
	display: block;
}

.mtt-recipe-category-toggles__nav {
	max-width: 16.25rem;
	min-width: 0;
}

.mtt-recipe-category-toggles__tablist {
	align-items: flex-start;
	display: flex;
	flex-direction: column;
	gap: 18px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.mtt-recipe-category-toggles__tab {
	background: transparent;
	border: 0;
	box-sizing: border-box;
	color: var(--dark-brown, #5e4234);
	cursor: pointer;
	display: block;
	font-family: "TT Norms Pro", sans-serif;
	font-size: 24px;
	font-style: normal;
	font-weight: 400;
	line-height: 34.277px;
	margin: 0;
	padding: 0;
	position: relative;
	text-align: left;
	transition: color 0.15s ease;
	width: 100%;
}

.mtt-recipe-category-toggles__tab:hover {
	color: var(--wp--preset--color--brown, #5e4234);
	opacity: 0.92;
}

.mtt-recipe-category-toggles__tab:focus {
	outline: none;
}

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

/* Active: mobile = CSS border oval; desktop = Figma hand-drawn outline SVG (node 998:4255). */
.mtt-recipe-category-toggles__tab[aria-selected="true"] {
	opacity: 1;
	color: var(--dark-brown, #5e4234);
}

.mtt-recipe-category-toggles__tab-label-wrap {
	position: relative;
	display: inline-block;
	max-width: 100%;
	box-sizing: border-box;
}

.mtt-recipe-category-toggles__tab[aria-selected="true"] .mtt-recipe-category-toggles__tab-label-wrap {
	padding: 0.12em 0.5em 0.1em;
}

/* Mobile: thin CSS oval (matches horizontal scroller, Figma 998:4225) — not used on desktop. */
@media (max-width: 768px) {
	.mtt-recipe-category-toggles__tab[aria-selected="true"] .mtt-recipe-category-toggles__tab-label-wrap::before {
		content: "";
		position: absolute;
		left: -0.04em;
		right: -0.04em;
		top: -0.06em;
		bottom: -0.04em;
		border: 1.5px solid #d63007;
		border-radius: 46% 54% 52% 48% / 62% 58% 42% 45%;
		transform: rotate(-0.9deg);
		pointer-events: none;
		z-index: 0;
	}

}

@media (max-width: 768px) and (prefers-reduced-motion: reduce) {
	.mtt-recipe-category-toggles__tab[aria-selected="true"] .mtt-recipe-category-toggles__tab-label-wrap::before {
		transform: none;
	}
}

/* Desktop: Figma "Ellipse 28" asset — same outline for any selected tab. */
@media (min-width: 769px) {
	.mtt-recipe-category-toggles__tab[aria-selected="true"] .mtt-recipe-category-toggles__tab-label-wrap::before {
		background: url("assets/tab-active-outline.svg") 50% 50% / 100% 100% no-repeat;
		border: none;
		bottom: -0.12em;
		content: "";
		left: -0.04em;
		pointer-events: none;
		position: absolute;
		right: -0.04em;
		top: -0.1em;
		transform: rotate(-2.38deg);
		transform-origin: center center;
		z-index: 0;
	}
}

@media (min-width: 769px) and (prefers-reduced-motion: reduce) {
	.mtt-recipe-category-toggles__tab[aria-selected="true"] .mtt-recipe-category-toggles__tab-label-wrap::before {
		transform: none;
	}
}

.mtt-recipe-category-toggles__tab-label {
	position: relative;
	z-index: 1;
}

.mtt-recipe-category-toggles__footer-link-wrap {
	margin: 3.75rem 0 0;
	padding: 0;
}

/* Figma 998:4262 — "Explore recipes" text link, 2px bottom rule, 16px padding below copy */
.mtt-recipe-category-toggles__footer-link {
	border-bottom: 2px solid var(--dark-brown, #5e4234);
	color: inherit;
	display: inline-block;
	font-family: "TT Norms Pro", var(--wp--preset--font-family--tt-norms-pro, sans-serif);
	font-size: 14px;
	font-style: normal;
	font-weight: 700;
	letter-spacing: 2.1px;
	line-height: 14px;
	padding: 0 0 16px;
	text-align: center;
	text-decoration: none;
	text-transform: none;
	transition: border-color 0.15s ease, opacity 0.15s ease;
}

.mtt-recipe-category-toggles__footer-link:hover {
	opacity: 0.88;
	text-decoration:none;
}

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

.mtt-recipe-category-toggles__panels {
	position: relative;
	min-width: 0;
	z-index: 0;
}

.mtt-recipe-category-toggles__panel[hidden] {
	display: none;
}

.mtt-recipe-category-toggles__swiper {
	overflow: hidden;
	width: 100%;
	padding-bottom: 0.25rem;
}

.mtt-recipe-category-toggles__swiper:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 4px;
	border-radius: 4px;
}

/* Cards: same structure/classes as template-parts/content-archive-card.php (archive.css) */
.mtt-recipe-category-toggles .post-card.mtt-recipe-category-toggles__card {
	height: 100%;
	margin: 0;
}

.mtt-recipe-category-toggles__slide.swiper-slide {
	height: auto;
	display: flex;
	flex-direction: column;
}

.mtt-recipe-category-toggles__slide .post-card {
	flex: 1 1 auto;
	min-height: 0;
}

.mtt-recipe-category-toggles__empty {
	margin: 0;
	padding: 1rem 0;
	font-family: system-ui, sans-serif;
	font-size: 0.9375rem;
}

.mtt-recipe-category-toggles__slide--empty {
	width: 100%;
}

/* Block editor: hide Swiper panels (no JS); titles + tabs remain. */
.mtt-recipe-category-toggles--editor-preview .mtt-recipe-category-toggles__panels {
	display: none !important;
}

.mtt-recipe-category-toggles__editor-hint {
	margin: 0 0 clamp(0.75rem, 2vw, 1.25rem);
	padding: 0.5rem 0.75rem;
	border: 1px dashed currentColor;
	font-size: 0.8125rem;
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	line-height: 1.35;
	opacity: 0.85;
}
@media (max-width:1170px) {
	.mtt-recipe-category-toggles__inner {
		padding-left:5%;
	}
}

@media (max-width: 1180px) {
	.mtt-recipe-category-toggles__title {
		margin: 0 0 20px;
	}
}

/* Single-row horizontal tab scroller (matches .mtt-category-toggles__button-list mobile pattern) */
@media (max-width: 768px) {
	.mtt-recipe-category-toggles__tab-asterisk {
		display: none !important;
	}

	.mtt-recipe-category-toggles__nav {
		max-width: none;
	}

	.mtt-recipe-category-toggles__tablist {
		flex-direction: row;
		flex-wrap: nowrap;
		align-items: center;
		justify-content: flex-start;
		max-width: none;
		width: 100%;
		overflow-x: auto;
		overflow-y: hidden;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
		-ms-overflow-style: none;
		padding-left: 25px;
		gap: 18px;
		padding-top: 10px;
		padding-bottom: 3px;
	}

	.mtt-recipe-category-toggles__tablist::-webkit-scrollbar {
		display: none;
	}

	.mtt-recipe-category-toggles__tab {
		width: auto;
		flex-shrink: 0;
		white-space: nowrap;
	}

	.mtt-recipe-category-toggles {
		padding:50px 0 80px;
	}
	.mtt-recipe-category-toggles__graphic {
		position: absolute;
        top: -43px;
        right: 20px;
        width: 90px;
	}
	.mtt-recipe-category-toggles__inner {
        padding-left: 0%;
    }
	.mtt-recipe-category-toggles__title {
		text-align: center;
		font-size: 40px;
	}
	.mtt-recipe-category-toggles__footer-link-wrap {
		bottom: 45px;
		left: 0;
		margin: 0;
		position: absolute;
		right: 0;
		text-align: center;
	}
	.mtt-recipe-category-toggles__panels {
		padding-left:20px;
		padding-bottom: 30px;
	}
}
@media (max-width:500px) {
	    .mtt-recipe-category-toggles__graphic {
        position: absolute;
        top: -43px;
        right: 20px;
        width: 70px;
    }
	.mtt-recipe-category-toggles__title {
		font-size:32px;
				margin: 0 0 -14px;
	}
	.mtt-recipe-category-toggles__aside {
		gap:20px;
	}
	.mtt-recipe-category-toggles__tab {
		font-size:18px;
	}
}