/* Mijote Kitchen – "Make this recipe yours" customizer */
.mjkc,
.mjk-card {
	--c-primary: var(--wp--preset--color--primary, #191917);
	--c-primary-dark: var(--wp--preset--color--primary-dark, #000000);
	--c-lemon: var(--wp--preset--color--lemon, #F5DC42);
	--c-honey: var(--wp--preset--color--honey, #E3C52C);
	--c-steam: var(--wp--preset--color--steam, #FAFAFA);
	--c-oat: var(--wp--preset--color--oat, #FFFBEA);
	--c-blue: var(--wp--preset--color--blueberry, #191917);
	--c-ink: var(--wp--preset--color--ink, #191917);
	--c-soft: var(--wp--preset--color--ink-soft, #555555);
	--c-line: var(--wp--preset--color--neutral-200, #F2F2F2);
	--c-heading: var(--wp--preset--font-family--heading, Georgia, serif);
}
.mjkc { font-family: var(--wp--preset--font-family--body, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif); color: var(--c-ink); }
.mjkc *, .mjkc *::before, .mjkc *::after { box-sizing: border-box; }
.mjkc-ic { flex: none; }
.mjkc :focus-visible { outline: 3px solid var(--c-blue); outline-offset: 2px; }
.mjkc [hidden] { display: none !important; }

/* Ad-safe panel: docked bottom right, no overlay, the page stays usable */
.mjkc-overlay {
	position: fixed;
	right: 16px;
	bottom: 16px;
	z-index: 100001;
	pointer-events: none;
	animation: mjkc-fade .25s ease;
}
@keyframes mjkc-fade { from { opacity: 0; } to { opacity: 1; } }
.mjkc-panel {
	position: relative;
	display: flex;
	flex-direction: column;
	width: min(400px, calc(100vw - 32px));
	max-height: min(640px, calc(100vh - 120px));
	background: var(--c-steam);
	border: 3px solid var(--c-primary);
	border-radius: 20px;
	box-shadow: 0 18px 50px rgba(0, 0, 0, .28);
	overflow: hidden;
	pointer-events: auto;
	animation: mjkc-in .3s ease;
}
@keyframes mjkc-in { from { transform: translateY(18px); opacity: 0; } to { transform: none; opacity: 1; } }
.mjkc-open .mjk-launcher { display: none; }

.mjkc-head { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 14px; background: var(--c-blue); color: #fff; }
.mjkc-thumb { width: 44px; height: 44px; border-radius: 12px; object-fit: cover; flex: none; background: var(--c-oat); }
.mjkc-thumb--ic { display: grid; place-items: center; color: var(--c-primary); }
.mjkc-titles { flex: 1; min-width: 0; }
.mjkc-kicker { display: flex; align-items: center; gap: 4px; margin: 0; font-size: 12px; font-weight: 700; color: var(--c-lemon); }
.mjkc-titles h2 { margin: 1px 0 0; font-family: var(--c-heading); font-size: 16px; line-height: 1.2; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mjkc-count { margin: 1px 0 0; font-size: 12px; opacity: .85; }
.mjkc-icbtn { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .16); color: #fff; cursor: pointer; flex: none; }
.mjkc-icbtn:hover { background: rgba(255, 255, 255, .28); }
.mjkc-progress { height: 5px; background: #E2E0D3; flex: none; }
.mjkc-progress span { display: block; height: 100%; width: 0; background: var(--c-primary); transition: width .3s ease; }
.mjkc-body { flex: 1; min-height: 0; overflow-y: auto; padding: 14px 16px 16px; }

/* Questions */
.mjkc-intro { margin: 0 0 14px; font-size: 15px; color: var(--c-soft); }
.mjkc-q { margin: 0; font-family: var(--c-heading); font-size: 20px; line-height: 1.2; color: var(--c-ink); }
.mjkc-hint { margin: 4px 0 12px; font-size: 13px; color: var(--c-soft); }
.mjkc-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.mjkc-tile {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 4px;
	min-height: 0;
	padding: 9px 10px;
	border: 2px solid var(--c-line);
	border-radius: 16px;
	background: #fff;
	color: var(--c-ink);
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	text-align: center;
	line-height: 1.2;
	cursor: pointer;
}
.mjkc-tile__ic { display: grid; place-items: center; width: 40px; height: 40px; margin: 0; flex: none; border-radius: 50%; background: var(--tc-bg); color: var(--tc-fg); transition: transform .15s ease; }
.mjkc-tile__ic .mjkc-ic { width: 22px; height: 22px; stroke-width: 1.8; }
.mjkc-tile { flex-direction: row !important; justify-content: flex-start !important; gap: 8px !important; text-align: left !important; }
.mjkc-tile small { display: none; }
.mjkc-tile__l { line-height: 1.2; }
.mjkc-tile:hover .mjkc-tile__ic { transform: scale(1.08) rotate(-4deg); }
.mjkc-c0 { --tc-bg: #FDE3D8; --tc-fg: #C2410C; }
.mjkc-c1 { --tc-bg: #FFF1C2; --tc-fg: #9A6700; }
.mjkc-c2 { --tc-bg: #D9F5EF; --tc-fg: #0F766E; }
.mjkc-c3 { --tc-bg: #E0EBFB; --tc-fg: #191917; }
.mjkc-c4 { --tc-bg: #EEE5FB; --tc-fg: #6D3FC0; }
.mjkc-tile.is-on .mjkc-tile__ic { background: var(--tc-fg); color: #fff; }
.mjkc-tile small { font-size: 11px; font-weight: 400; color: var(--c-soft); }
.mjkc-tile:hover { border-color: var(--c-honey); }
.mjkc-tile.is-on { border-color: var(--c-primary); background: #FDEEE7; color: #8A2A0C; }
.mjkc-err { min-height: 18px; margin: 6px 0 0; font-size: 13px; color: #B3261E; }
.mjkc-nav { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.mjkc-link { padding: 0; border: 0; background: none; color: var(--c-soft); font: inherit; font-size: 13px; text-decoration: underline; cursor: pointer; }
.mjkc-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; padding: 8px 16px; border: 2px solid transparent; border-radius: 999px; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.mjkc-btn--dark { background: var(--c-ink); color: #fff; }
.mjkc-btn--flame { background: var(--c-primary); color: #fff; }
.mjkc-btn--flame:hover { background: var(--c-primary-dark); }
.mjkc-btn--ghost { background: #fff; border-color: var(--c-ink); color: var(--c-ink); }

/* Result */
.mjkc-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
.mjkc-chips span { padding: 3px 10px; border-radius: 999px; background: var(--c-lemon); color: #4A3800; font-size: 12px; font-weight: 700; }
.mjkc-summary { margin: 0 0 10px; font-size: 14px; }
.mjkc-notice { display: flex; gap: 6px; margin: 0 0 10px; padding: 8px 10px; border-radius: 10px; background: #FFF4D6; font-size: 13px; }
.mjkc-res { display: grid; grid-template-columns: 1fr; gap: 10px; }
.mjkc-card--wide, .mjkc-res > .mjkc-card:first-child { grid-column: 1 / -1; }
.mjkc-card { padding: 10px 12px; border-radius: 14px; background: #fff; }
.mjkc-card h3 { display: flex; align-items: center; gap: 6px; margin: 0 0 6px; font-size: 15px; font-weight: 800; color: var(--c-ink); }
.mjkc-card h3 .mjkc-ic { color: var(--c-primary); }
.mjkc-card h3 + ul, .mjkc-card ul, .mjkc-card ol { margin: 0 0 6px; padding-left: 18px; font-size: 13px; line-height: 1.65; }
.mjkc-card p { margin: 0; font-size: 13px; color: var(--c-soft); }
.mjkc-card s { color: #8A8A8A; }
.mjkc-card mark { padding: 0 4px; border-radius: 4px; background: #E3F7EF; color: #0B5C46; }
.mjkc-card small { color: var(--c-soft); }
.mjkc-safety { display: flex; gap: 6px; margin: 10px 0 0; font-size: 12px; color: var(--c-soft); }
.mjkc-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.mjkc-links { margin-top: 10px; text-align: center; }

/* Loading */
.mjkc-loading { display: flex; justify-content: center; gap: 6px; padding: 30px 0 10px; }
.mjkc-loading span { width: 10px; height: 10px; border-radius: 50%; background: var(--c-honey); animation: mjkc-b 1s infinite ease-in-out; }
.mjkc-loading span:nth-child(2) { animation-delay: .15s; }
.mjkc-loading span:nth-child(3) { animation-delay: .3s; }
@keyframes mjkc-b { 0%, 80%, 100% { transform: scale(.6); opacity: .5; } 40% { transform: scale(1); opacity: 1; } }

/* Pill (bottom left, away from the chat launcher and the next-recipe toast) */
.mjkc-pill {
	position: fixed;
	z-index: 85;
	left: 16px;
	bottom: 16px;
	display: flex;
	align-items: center;
	gap: 8px;
	max-width: calc(100vw - 32px);
	padding: 7px 14px 7px 7px;
	border: 0;
	border-radius: 999px;
	background: var(--c-primary);
	color: #fff;
	font: inherit;
	text-align: left;
	cursor: pointer;
	box-shadow: 0 8px 22px rgba(25, 25, 23, .2);
}
.mjkc-pill:hover { background: var(--c-primary-dark); }
.mjkc-pill__ic { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--c-lemon); color: var(--c-ink); flex: none; }
.mjkc-pill__txt { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.mjkc-pill__title { font-size: 14px; font-weight: 700; }
.mjkc-pill__sub { font-size: 11px; opacity: .92; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* "Your version" inside the recipe card */
.mjkc-box { margin: 0; padding: 12px 1.75rem 14px; background: #FFF8E4 !important; border-top: 1px solid var(--c-line); border-bottom: 1px solid var(--c-line); }
.mjkc-box__title { display: flex; align-items: center; gap: 6px; margin: 0 0 6px; font-weight: 800; color: var(--c-primary-dark); }
.mjkc-box ul { margin: 4px 0 8px; padding-left: 18px; font-size: 14px; line-height: 1.6; }
.mjkc-box .mjkc-link { color: var(--c-primary-dark); }
.mjk-ingredient.mjkc-swapped .mjk-ingredient__name,
.mjk-ingredient.mjkc-swapped .mjk-ingredient__amount,
.mjk-ingredient.mjkc-swapped .mjk-ingredient__unit,
.mjk-ingredient.mjkc-swapped .mjk-ingredient__note,
.mjk-ingredient.mjkc-omitted label > span:not(.mjkc-swap) { text-decoration: line-through; color: #8A8A8A; }
.mjkc-swap { display: inline-block; margin-left: 4px; padding: 0 6px; border-radius: 6px; background: #E3F7EF; color: #0B5C46; font-weight: 700; }
.mjkc-added label::before { border-style: dashed !important; }

/* Email-only end screen */
.mjkc-teaser { text-align: center; }
.mjkc-teaser__icon { display: grid; place-items: center; width: 68px; height: 68px; margin: 0 auto 8px; border-radius: 50%; background: var(--c-lemon); color: var(--c-ink); }
.mjkc-teaser .mjkc-chips { justify-content: center; }
.mjkc-includes { margin-top: 10px; text-align: left; }
.mjkc-includes ul { list-style: none; padding: 0 !important; }
.mjkc-includes li { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 14px !important; }
.mjkc-includes li .mjkc-ic { color: var(--c-primary); }
.mjkc-mail .mjkc-err.is-info { color: var(--c-lemon); }

/* Shopping list */
.mjkc-shop { columns: 1; }
.mjkc-aisle { margin: 6px 0 2px; font-size: 13px; font-weight: 800; color: var(--c-primary-dark); break-after: avoid; }
.mjkc-check { margin: 0 0 8px; padding: 0; list-style: none; font-size: 13px; line-height: 1.7; break-inside: avoid; }
.mjkc-check li::before { content: "☐ "; color: var(--c-soft); }

/* Email box */
.mjkc-mail { margin: 14px 0 0; padding: 14px 16px; border-radius: 16px; background: var(--c-blue); color: #fff; }
.mjkc-mail__title { display: flex; align-items: center; gap: 8px; margin: 0; font-family: var(--c-heading); font-size: 18px; font-weight: 700; color: #fff; }
.mjkc-mail__title .mjkc-ic { color: var(--c-lemon); }
.mjkc-mail__text { margin: 4px 0 10px; font-size: 13px; opacity: .9; }
.mjkc-mail__row { display: flex; flex-direction: column; gap: 8px; }
.mjkc-mail__row input { flex: 1; min-width: 0; min-height: 44px; padding: 8px 14px; border: 2px solid transparent; border-radius: 999px; background: #fff; color: var(--c-ink); font: inherit; font-size: 15px; }
.mjkc-mail__row input:focus { border-color: var(--c-lemon); outline: none; }
.mjkc-mail__optin { display: flex; align-items: flex-start; gap: 8px; margin-top: 10px; font-size: 13px; line-height: 1.4; cursor: pointer; }
.mjkc-mail__optin input { width: 18px; height: 18px; margin: 1px 0 0; flex: none; accent-color: var(--c-lemon); }
.mjkc-mail__legal { margin: 6px 0 0; font-size: 12px; }
.mjkc-mail__legal a { color: #fff; }
.mjkc-mail .mjkc-err { color: #FFD3C7; }
.mjkc-gate__btn { width: 100%; margin-top: 8px; min-height: 48px; font-size: 16px; justify-content: center; }
/* Unlocked: yellow on the dark panel so it stands out */
.mjkc-gate__btn:not(:disabled) { background: var(--c-lemon); color: var(--c-ink); box-shadow: 0 6px 16px rgba(0, 0, 0, .25); }
.mjkc-gate__btn:not(:disabled):hover { background: var(--c-honey); color: var(--c-ink); }
.mjkc-gate__btn:not(:disabled) .mjkc-ic { color: var(--c-ink); }
.mjkc-gate__btn:disabled { background: rgba(255, 255, 255, .22); color: rgba(255, 255, 255, .75); cursor: not-allowed; box-shadow: none; }
.mjkc-gate__btn:disabled:hover { background: rgba(255, 255, 255, .22); }
.mjkc-mail__legal { opacity: .85; }
.mjkc-mail--done { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.mjkc-mail--done .mjkc-btn { flex: 1 1 100%; justify-content: center; text-decoration: none; background: var(--c-lemon); color: var(--c-ink); }
.mjkc-mail--done .mjkc-btn:hover { background: var(--c-honey); color: var(--c-ink); }
.mjkc-mail--done .mjkc-btn .mjkc-ic { color: var(--c-ink); }
.mjkc-mail--done p { margin: 0; font-size: 14px; }
.mjkc-mail--done .mjkc-ic { color: var(--c-lemon); flex: none; }
.mjkc-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.mjkc .screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Mobile: compact bottom sheet, no overlay (the page above stays visible and scrollable) */
@media (max-width: 640px) {
	.mjkc-overlay { left: 0; right: 0; bottom: 0; }
	.mjkc-panel { width: 100%; max-height: 60vh; max-height: 60dvh; border-width: 3px 0 0; border-radius: 22px 22px 0 0; box-shadow: 0 -8px 30px rgba(0, 0, 0, .22); animation-name: mjkc-up; }
	@keyframes mjkc-up { from { transform: translateY(60px); opacity: 0; } to { transform: none; opacity: 1; } }
	.mjkc-panel::before { content: ""; position: absolute; top: 6px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 4px; background: rgba(255, 255, 255, .55); z-index: 2; }
	.mjkc-head { gap: 8px; padding: 14px 10px 8px 12px; }
	.mjkc-thumb { width: 34px; height: 34px; border-radius: 9px; }
	.mjkc-kicker { font-size: 11px; }
	.mjkc-titles h2 { font-size: 14px; }
	.mjkc-count { font-size: 11px; }
	.mjkc-icbtn { width: 30px; height: 30px; }
	.mjkc-intro { display: none; }
	.mjkc-body { padding: 10px 12px 14px; }
	.mjkc-q { font-size: 17px; }
	.mjkc-hint { margin: 2px 0 8px; font-size: 12px; }
	.mjkc-tile { padding: 7px 9px; font-size: 13px; }
	.mjkc-tile__ic { width: 34px; height: 34px; }
	.mjkc-tile__ic .mjkc-ic { width: 19px; height: 19px; }
	.mjkc-teaser__icon { width: 46px; height: 46px; }
	.mjkc-mail__row .mjkc-btn { width: 100%; }
	.mjkc-pill { left: 8px; bottom: 14px; padding: 5px 12px 5px 5px; max-width: calc(100vw - 84px); }
	.mjkc-pill__ic { width: 28px; height: 28px; }
	.mjkc-pill__title { font-size: 13px; }
	.mjkc-box { padding: 10px 1.1rem 12px; }
}

@media (prefers-reduced-motion: reduce) {
	.mjkc-panel, .mjkc-overlay, .mjkc-progress span, .mjkc-tile__ic { animation: none; transition: none; }
	.mjkc-loading span { animation: none; opacity: 1; }
}
@media print { .mjkc { display: none !important; } }
