/* RK Recepti: recipe card and cooking mode. Colours come from the theme's variables when present. */
.rk-card {
	--rk-green: var(--c-green, #1F6B3A);
	--rk-dark: var(--c-dark, #12432A);
	--rk-ink: var(--c-ink, #1A1F1C);
	--rk-muted: var(--c-muted, #5C6560);
	--rk-line: var(--c-line, #E4E0D8);
	--rk-surface: var(--c-surface, #F5F3EE);
	--rk-mint: #E7F0EA;
	border: 1px solid var(--rk-line);
	border-radius: 24px;
	overflow: hidden;
	margin: 56px 0 0;
	scroll-margin-top: 24px;
	color: var(--rk-ink);
	background: #fff;
}
.rk-card__head {
	background: var(--rk-surface);
	padding: 20px 32px;
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
}
.rk-card__title { margin: 0; font-family: var(--f-display, inherit); font-weight: 800; font-size: 30px; letter-spacing: -0.02em; }
.rk-card__tools { display: flex; flex-wrap: wrap; gap: 8px; }
.rk-btn {
	display: inline-flex; align-items: center; gap: 8px;
	min-height: 48px; padding: 0 18px;
	border: 1px solid #D9D4CA; border-radius: 10px;
	background: #fff; color: var(--rk-ink);
	font: inherit; font-weight: 600; font-size: 15px; cursor: pointer;
}
.rk-btn:hover { border-color: var(--rk-green); }
.rk-btn--dark { background: var(--rk-dark); border-color: var(--rk-dark); color: #fff; }
.rk-btn--dark:hover { background: #0C3420; }
.rk-btn:focus-visible, .rk-scale button:focus-visible, .rk-timer:focus-visible { outline: 3px solid var(--rk-green); outline-offset: 2px; }

.rk-card__body { display: flex; flex-wrap: wrap; }
.rk-ingredients { flex: 1 1 340px; padding: 28px 32px; border-right: 1px solid var(--rk-line); }
.rk-steps { flex: 1.4 1 420px; padding: 28px 32px; min-width: 0; }
.rk-ingredients h3, .rk-steps h3 { margin: 0; font-family: var(--f-display, inherit); font-weight: 800; font-size: 24px; }
.rk-ingredients__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.rk-scale { display: flex; background: var(--rk-surface); border-radius: 10px; padding: 4px; }
.rk-scale button {
	border: 0; background: transparent; color: #3E4742;
	font: inherit; font-weight: 600; font-size: 14px;
	min-width: 44px; min-height: 40px; border-radius: 8px; cursor: pointer;
}
.rk-scale button[aria-pressed="true"] { background: #fff; color: var(--rk-dark); box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
.rk-hint { margin: 12px 0 16px; font-size: 14px; color: var(--rk-muted); line-height: 1.5; }
.rk-group + .rk-group { margin-top: 20px; }
.rk-group h4, .rk-section h4 { margin: 0 0 6px; font-size: 15px; font-weight: 600; color: var(--rk-green); }
.rk-group ul { list-style: none; margin: 0; padding: 0; }
.rk-group li { border-bottom: 1px solid #EFECE6; }
.rk-group label { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 4px 0; cursor: pointer; font-size: 16px; line-height: 1.4; }
.rk-group input { width: 20px; height: 20px; flex: none; accent-color: var(--rk-green); margin: 0; }
.rk-group li.is-done span { color: #8A918D; text-decoration: line-through; }
.rk-amt { font-weight: 600; }

.rk-steps h3 { margin-bottom: 20px; }
.rk-section + .rk-section { margin-top: 24px; }
.rk-print-title { display: none; }
.rk-section ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 18px; }
.rk-section li { position: relative; padding-left: 52px; scroll-margin-top: 24px; }
.rk-section li::before {
	content: attr(data-n);
	position: absolute; left: 0; top: 0;
	width: 36px; height: 36px; border-radius: 999px;
	background: var(--rk-mint); color: var(--rk-dark);
	font-weight: 600; font-size: 15px;
	display: flex; align-items: center; justify-content: center;
}
.rk-section li p { margin: 6px 0 0; font-size: 17px; line-height: 1.6; }
.rk-timer {
	margin-top: 10px; display: inline-flex; align-items: center; gap: 8px;
	min-height: 40px; padding: 0 14px; border-radius: 999px;
	border: 1px solid #D9D4CA; background: #fff; color: var(--rk-ink);
	font: inherit; font-weight: 600; font-size: 14px; cursor: pointer;
}
.rk-timer.is-running { background: #F0A830; border-color: #F0A830; color: #1A1F1C; }
.rk-note { margin: 24px 0 0; background: #FFF6E5; border-radius: 14px; padding: 14px 18px; font-size: 15px; line-height: 1.55; }
.rk-step-image { margin-top: 20px; }
.rk-step-photo { display: block; margin-top: 12px; width: 100%; max-width: 420px; height: auto; border-radius: 14px; }
.rk-step-image img { max-width: 100%; height: auto; border-radius: 14px; }

/* Video facade */
.rk-video { position: relative; aspect-ratio: 16 / 9; border-radius: 20px; overflow: hidden; background: #000; }
.rk-video img, .rk-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }
.rk-video__play {
	position: absolute; left: 20px; bottom: 20px;
	display: inline-flex; align-items: center; gap: 10px;
	min-height: 52px; padding: 0 20px 0 14px; border: 0; border-radius: 999px;
	background: #fff; color: #12432A; font: inherit; font-weight: 600; font-size: 16px; cursor: pointer;
}
.rk-video__play svg { width: 22px; height: 22px; }

/* Cooking mode */
.rk-cooking, .rk-cooking body { overflow: hidden; }
.rk-cook {
	position: fixed; inset: 0; z-index: 99999;
	display: flex; flex-direction: column; gap: 20px;
	padding: 16px max(20px, calc((100vw - 760px) / 2)) 28px;
	background: #12432A; color: #fff;
	font-family: var(--f-body, system-ui, sans-serif);
	overflow-y: auto;
}
.rk-cook[hidden] { display: none; }
.rk-cook__top { display: flex; justify-content: space-between; align-items: center; }
.rk-cook__close { width: 48px; height: 48px; border: 0; background: transparent; color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; border-radius: 999px; }
.rk-cook__close:focus-visible, .rk-cook button:focus-visible { outline: 3px solid #F0A830; outline-offset: 2px; }
.rk-cook__lock { font-size: 13px; background: rgba(255, 255, 255, .12); border-radius: 999px; padding: 6px 12px; }
.rk-cook__lock:empty { display: none; }
.rk-cook__meta { font-size: 15px; color: #CFE0D5; margin-bottom: 8px; }
.rk-cook__bar { height: 6px; background: rgba(255, 255, 255, .18); border-radius: 999px; overflow: hidden; }
.rk-cook__bar span { display: block; height: 100%; background: #F0A830; border-radius: 999px; transition: width .2s; }
.rk-cook__text { flex: 1; margin: 0; font-family: var(--f-display, inherit); font-weight: 600; font-size: clamp(26px, 4.5vw, 40px); line-height: 1.3; }
.rk-cook__needs { background: rgba(255, 255, 255, .1); border-radius: 16px; padding: 14px 16px; }
.rk-cook__needs[hidden] { display: none; }
.rk-cook__needs-label { font-size: 13px; color: #CFE0D5; margin-bottom: 6px; }
.rk-cook__needs-list { font-size: 17px; line-height: 1.5; }
.rk-cook__timer { width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; border: 0; border-radius: 14px; background: #F0A830; color: #1A1F1C; font: inherit; font-weight: 600; font-size: 18px; cursor: pointer; }
.rk-cook__nav { display: flex; gap: 12px; }
.rk-cook__prev, .rk-cook__next { min-height: 60px; border-radius: 14px; font: inherit; font-weight: 600; font-size: 17px; cursor: pointer; }
.rk-cook__prev { flex: 1; border: 1px solid rgba(255, 255, 255, .4); background: transparent; color: #fff; }
.rk-cook__prev:disabled { opacity: .4; cursor: default; }
.rk-cook__next { flex: 2; border: 0; background: #fff; color: #12432A; }

@media (max-width: 700px) {
	.rk-card { border-radius: 18px; margin-top: 40px; }
	.rk-card__head, .rk-ingredients, .rk-steps { padding-left: 18px; padding-right: 18px; }
	.rk-ingredients { border-right: 0; border-bottom: 1px solid var(--rk-line); }
	.rk-card__tools, .rk-card__tools .rk-btn { width: 100%; }
	.rk-card__tools .rk-btn { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
	.rk-cook__bar span { transition: none; }
}

/* Print: just the recipe. */
@media print {
	body * { visibility: hidden; }
	.rk-card, .rk-card * { visibility: visible; }
	.rk-print-title { display: block; width: 100%; margin: 0 0 4pt; font-size: 18pt; font-weight: 700; }
	.rk-card__title { font-size: 13pt; }
	.rk-card { position: absolute; left: 0; top: 0; width: 100%; border: 0; margin: 0; font-size: 11pt; }
	.rk-card__tools, .rk-scale, .rk-hint, .rk-timer, .rk-group input { display: none !important; }
	.rk-card__head { background: none; padding: 0 0 8pt; }
	.rk-ingredients, .rk-steps { padding: 8pt 0; border: 0; flex: 1 1 100%; }
	.rk-group label { min-height: 0; padding: 2pt 0; }
	.rk-section li::before { background: none; border: 1px solid #999; }
	.rk-section li { break-inside: avoid; }
}
