/*========================================================================
   Babiccina volba - rezim vareni (jen detail receptu)
   Logika: javascripts/babicka2026-cooking.js
   Promenne (--color-*, --text-*, --font-*) jsou z babicka2026-screen.css
========================================================================*/

html.cooking-open, html.cooking-open body { overflow:hidden;}

/* -----  overlay + panel (podklad, blur a stin stejne jako video: #videoShade / #theVideoBox)  ------------------------------ */
.cooking { display:flex; position:fixed; z-index:2600; top:0; left:0; width:100%; height:100%; align-items:center; justify-content:center; background:rgba(255,255,255,0.75); backdrop-filter:blur(6px); -webkit-backdrop-filter:blur(6px); opacity:0; transition:opacity .25s ease-out;}
.cooking[hidden] { display:none;}
.cooking.is-open { opacity:1;}
.cooking-panel { --cooking-bg:251 247 242; display:flex; position:relative; flex-direction:column; width:94vw; max-width:1240px; height:94vh; height:94dvh; background:rgb(var(--cooking-bg)); border-radius:32px; overflow:hidden; box-shadow:var(--shadow-level-2); transform:translateY(16px) scale(.98); transition:transform .4s var(--easing-3-easeout-smooth);}
.cooking.is-open .cooking-panel { transform:none;}
.cooking button { -webkit-tap-highlight-color:transparent; touch-action:manipulation;}
.cooking button:focus-visible { outline:3px solid var(--color-hneda-medium); outline-offset:2px;}

/* -----  horni lista: prubeh, stitek, ingredience, zavrit  ------------------------------ */
.cooking-progress { position:absolute; z-index:6; top:0; left:0; width:100%; height:6px; background:rgb(var(--color-hneda-light-rgb) / var(--alpha-40));}
.cooking-progress i { display:block; width:0; height:100%; background:var(--color-accent-main); border-radius:0 3px 3px 0; transition:width .35s ease-out;}
.cooking-top { display:flex; position:absolute; z-index:5; top:6px; left:0; width:100%; align-items:center; gap:10px; padding:14px 18px 0 30px; pointer-events:none;}
.cooking-top > * { pointer-events:auto;}
/* obsah se pod horni listou ztraci do bluru stejne jako pod spodnimi tlacitky */
.cooking-top:before { content:""; position:absolute; z-index:-1; top:-6px; left:0; width:100%; height:58px; pointer-events:none;	/* konci asi ve 2/3 vysky tlacitek */
	background:linear-gradient(0deg, rgb(var(--cooking-bg) / 0) 0%, rgb(var(--cooking-bg) / .12) 25%, rgb(var(--cooking-bg) / .4) 50%, rgb(var(--cooking-bg) / .72) 75%, rgb(var(--cooking-bg) / .92) 100%);
	backdrop-filter:blur(10px); -webkit-backdrop-filter:blur(10px);
	-webkit-mask-image:linear-gradient(0deg, transparent 0%, rgb(0 0 0 / .12) 22%, rgb(0 0 0 / .45) 48%, rgb(0 0 0 / .82) 74%, #000 100%); mask-image:linear-gradient(0deg, transparent 0%, rgb(0 0 0 / .12) 22%, rgb(0 0 0 / .45) 48%, rgb(0 0 0 / .82) 74%, #000 100%);}
.cooking[data-slide="cover"] .cooking-top:before { display:none;}
.cooking-label { flex:1; min-width:0; text-align:left; font-family:var(--font-secondary); font-size:var(--text-ml); font-weight:700; color:var(--color-text-accent-light); white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
.cooking-ing-toggle { flex:none; height:48px; padding:0 20px; background:var(--color-svetla-dark); color:var(--color-hneda-dark); font-size:var(--text-sm); font-weight:500; border-radius:24px;}
.cooking-ing-toggle[hidden] { display:none;}
.cooking-ing-toggle:hover { background:var(--color-white);}
.cooking-close { flex:none; width:48px; height:48px; background:var(--color-white); color:var(--color-hneda-dark); border-radius:50%; box-shadow:0 4px 14px rgb(var(--color-hneda-medium-rgb) / var(--alpha-20));}
.cooking-close b { display:none;}
.cooking-close:before { content:"\e809"; display:block; font-size:1.1em; font-family:'icons', Arial;}
.cooking-close:hover { color:var(--color-accent-main);}
.cooking[data-slide="cover"] .cooking-progress { display:none;}

/* -----  slajdy  ------------------------------ */
.cooking-stage { flex:1; min-height:0; overflow:hidden;}
.cooking-track { display:flex; height:100%; transition:transform .45s var(--easing-3-easeout-smooth);}
.cooking-slide { display:flex; position:relative; flex:0 0 100%; flex-direction:column; height:100%; padding:84px 8% 150px; overflow-x:hidden; overflow-y:auto; overscroll-behavior:contain; -webkit-overflow-scrolling:touch;}
.cooking-slide-inner { position:relative; width:100%; max-width:860px; margin:auto; text-align:center;}	/* margin:auto = stred, a pri dlouhem obsahu se da posouvat od zacatku */
.cooking-heading { margin:0 0 .5em; text-align:center; font-size:clamp(1.75rem, 2.4vw + 1rem, 3rem); font-weight:700; line-height:var(--line-height-headline-main); color:var(--color-text-primary);}
.cooking-heading em { display:block; font-size:.55em; font-weight:500; font-style:normal; color:var(--color-text-accent-light);}

/* krok */
.cooking-section { display:inline-block; margin:0 0 18px; padding:6px 16px; font-family:var(--font-secondary); font-size:var(--text-m); font-weight:700; color:var(--color-text-accent-light); background:var(--color-svetla-dark); border-radius:20px;}
.cooking-stepno { display:flex; align-items:center; justify-content:center; width:56px; height:56px; margin:0 auto 22px; padding-bottom:.08em; font-family:var(--font-secondary); font-size:var(--text-2xl); font-weight:500; line-height:1; color:var(--color-white); background:var(--color-text-primary); border-radius:50%;}
/* zakladni text jako v beznem receptu: primarni pismo, mnozstvi / zvyrazneni (strong) sekundarnim tucne */
.cooking-text { font-family:var(--font-primary); font-weight:400; line-height:1.5; color:var(--color-text-primary); text-wrap:pretty;}
.cooking-text p + p { margin-top:.75em;}
.cooking-text strong { font-family:var(--font-secondary); font-size:1.15em; font-weight:700; color:var(--color-text-accent-dark);}
/* jedna velikost pro vsechny kroky i tipy (bez ohledu na delku textu), at pismo pri prochazeni neposkakuje */
.cooking-slide .cooking-text { font-size:clamp(1.2rem, 1.3vw + .85rem, 1.9rem); line-height:1.5;}

/* tip */
.cooking-slide.tip { background:var(--color-svetla);}
.cooking[data-slide="tip"] .cooking-panel { --cooking-bg:248 241 231;}
.cooking-tip-icon { width:64px; height:51px; margin:0 auto 22px; background:url(../images/icon-heart-red-01.svg) 50% 50% / contain no-repeat;}
.cooking-slide.tip .cooking-text { font-family:var(--font-secondary); font-weight:700; line-height:1.4;}
.cooking-slide.tip .cooking-text strong { display:block; margin-bottom:.35em; font-weight:500; font-size:1.15em; color:var(--color-text-accent-light);}

/* cover */
.cooking-slide.cover { padding:0; background:var(--color-hneda-dark);}
.cooking-cover-image { position:absolute; top:0; left:0; width:100%; height:100%; object-fit:cover; object-position:center;}
.cooking-slide.cover:after { content:""; position:absolute; top:0; left:0; width:100%; height:100%; background:linear-gradient(180deg, rgb(47 30 14 / .15) 0%, rgb(47 30 14 / .45) 45%, rgb(47 30 14 / .78) 100%);}
.cooking-slide.cover .cooking-slide-inner { z-index:2; padding:90px 8% 48px;}
.cooking-title { margin:0 0 .35em; text-align:center; font-size:clamp(2.4rem, 5vw + 1rem, 5.5rem); font-weight:700; line-height:1.02; color:var(--color-white); text-shadow:0 4px 30px rgb(47 30 14 / .6); text-wrap:balance;}
.cooking-title span { display:none;}
.cooking-meta { font-family:var(--font-secondary); font-size:clamp(1rem, .6vw + .9rem, 1.35rem); color:rgb(255 255 255 / .55);}
.cooking-meta b { margin:0 .5em; font-weight:700; color:var(--color-white); white-space:nowrap;}
.cooking-meta i { font-style:normal;}
.cooking-cover-buttons { display:flex; flex-direction:column; align-items:center; gap:14px; margin-top:44px;}
.cooking-start { min-width:260px; height:76px; padding:0 44px; font-size:var(--text-xl); font-weight:700; color:var(--color-white); background:var(--color-accent-main); border-radius:38px; box-shadow:0 14px 40px rgb(47 30 14 / .45); transform:scale(1); transition:transform .4s var(--easing-1-bouncy), background-color .15s ease-out;}
.cooking-start b { font-weight:700;}
.cooking-start:hover { background:var(--color-accent-main-darker); transform:scale(1.05);}
.cooking-restart { height:48px; padding:0 22px; font-size:var(--text-m); font-weight:500; color:var(--color-white); background:rgb(255 255 255 / .16); border-radius:24px;}
.cooking-restart[hidden] { display:none;}
.cooking-restart:hover { background:rgb(255 255 255 / .28);}

/* ingredience - zaskrtavaci seznam (slajd i vysouvaci panel) */
.cooking-hint { margin:-.4em 0 1.4em; font-size:var(--text-m); color:var(--color-text-basic);}
.cooking-checklist { max-width:560px; margin:0 auto; text-align:left;}
.cooking-checklist h3 { margin:1.4em 0 .35em 14px; text-align:left; font-size:clamp(1.4rem, .6vw + 1.25rem, 1.7rem); font-weight:700; color:var(--color-text-accent-light);}
.cooking-checklist h3:first-child { margin-top:0;}
.cooking-note { margin:.6em 14px; font-size:var(--text-m); color:var(--color-text-basic);}
.cooking-check { display:flex; align-items:center; gap:16px; width:100%; min-height:58px; padding:10px 16px; text-align:left; font-family:var(--font-primary); font-size:clamp(1rem, .4vw + .95rem, 1.2rem); font-weight:400; line-height:1.35; color:var(--color-text-primary); background:none; border-radius:18px; transition:background-color .15s ease-out;}
.cooking-check + .cooking-check { margin-top:2px;}
.cooking-check:hover { background:var(--color-svetla-dark);}
.cooking-check i { display:flex; flex:none; align-items:center; justify-content:center; width:34px; height:34px; background:var(--color-white); border:2px solid var(--color-hneda-light); border-radius:50%; transition:background-color .15s ease-out, border-color .15s ease-out;}
.cooking-check i:after { content:""; width:14px; height:8px; margin-top:-3px; border:solid var(--color-white); border-width:0 0 3px 3px; transform:rotate(-45deg) scale(0); transition:transform .25s var(--easing-1-bouncy);}
.cooking-check strong { font-family:var(--font-secondary); font-size:1.15em; font-weight:700; color:var(--color-text-accent-dark);}
.cooking-check.is-checked strong { color:inherit;}
.cooking-check.is-checked { color:var(--color-text-basic);}
.cooking-check.is-checked span { text-decoration:line-through;}
.cooking-check.is-checked i { background:var(--color-green-lighter); border-color:var(--color-green-lighter);}
.cooking-check.is-checked i:after { transform:rotate(-45deg) scale(1);}

/* zaver + hodnoceni (srdicka sdili styly .rating-input z babicka2026-screen.css) */
.cooking-finish-text { margin:0 0 1.2em; font-family:var(--font-secondary); font-size:clamp(1.15rem, .8vw + 1rem, 1.6rem); font-weight:500; color:var(--color-text-accent-light);}
.cooking-rating .rating-input button { width:64px; height:64px;}
.cooking-rating .rating-input button svg { width:56px;}
.cooking-rating .rating-word { font-size:var(--text-xl);}
.cooking-rating .rating-status { min-height:1.45em; font-size:var(--text-m);}
.cooking-rating.is-saving .rating-input { pointer-events:none;}
.cooking-rating.is-saving .rating-input button.is-on svg { animation:ratingPulse .9s ease-in-out infinite;}
.cooking-rating.is-error .rating-status { color:var(--color-red-darker);}
.cooking-rating.is-error .rating-input button.is-on svg path { fill:var(--color-white); stroke:#f92d22;}

/* -----  spodni ovladani: velka tlacitka v dosahu palce; lista pluje nad obsahem a ten se pod ni ztraci do bluru  ------------------------------ */
.cooking-nav { display:flex; position:absolute; z-index:4; left:0; bottom:0; width:100%; gap:12px; padding:56px 20px calc(18px + env(safe-area-inset-bottom)); pointer-events:none;}
.cooking-nav:before { content:""; position:absolute; z-index:-1; top:0; left:0; width:100%; height:100%; pointer-events:none;
	background:linear-gradient(180deg, rgb(var(--cooking-bg) / 0) 0%, rgb(var(--cooking-bg) / .55) 38%, rgb(var(--cooking-bg) / .9) 100%);
	backdrop-filter:blur(14px); -webkit-backdrop-filter:blur(14px);
	-webkit-mask-image:linear-gradient(180deg, transparent 0%, #000 42%); mask-image:linear-gradient(180deg, transparent 0%, #000 42%);}
.cooking-nav button { pointer-events:auto; box-shadow:0 10px 30px rgb(var(--color-hneda-medium-rgb) / var(--alpha-20));}
.cooking-nav button { height:72px; font-size:var(--text-xl); font-weight:700; border-radius:36px; transition:background-color .15s ease-out, transform .3s var(--easing-1-bouncy);}
.cooking-nav button b { font-weight:700;}
.cooking-nav button:active { transform:scale(.97);}
.cooking-prev { flex:0 0 30%; color:var(--color-hneda-dark); background:var(--color-svetla-dark);}
.cooking-prev:hover { background:var(--color-white);}
.cooking-next { flex:1; color:var(--color-white); background:var(--color-accent-main);}
.cooking-next:hover { background:var(--color-accent-main-darker);}
.cooking-next b:after { content:"\e856"; display:inline-block; padding-left:.6em; font-size:.9em; font-weight:400; font-family:'icons', Arial;}
.cooking[data-slide="cover"] .cooking-nav { display:none;}
.cooking[data-slide="finish"] .cooking-next b:after { display:none;}

/* -----  vysouvaci ingredience u kroku  ------------------------------ */
.cooking-scrim { position:absolute; z-index:7; top:0; left:0; width:100%; height:100%; background:rgb(var(--color-hneda-medium-rgb) / var(--alpha-20)); opacity:0; visibility:hidden; transition:opacity .2s ease-out, visibility 0s .2s;}
.cooking.is-drawer .cooking-scrim { opacity:1; visibility:visible; transition:opacity .2s ease-out;}
.cooking-drawer { display:flex; position:absolute; z-index:8; left:50%; bottom:0; flex-direction:column; width:100%; max-width:640px; max-height:82%; background:var(--color-white); border-radius:32px 32px 0 0; box-shadow:0 -10px 50px rgb(var(--color-hneda-medium-rgb) / var(--alpha-20)); transform:translate(-50%, 105%); visibility:hidden; transition:transform .35s var(--easing-3-easeout-smooth), visibility 0s .35s;}
.cooking.is-drawer .cooking-drawer { transform:translate(-50%, 0); visibility:visible; transition:transform .35s var(--easing-3-easeout-smooth);}
.cooking-drawer-head { display:flex; flex:none; align-items:center; gap:12px; padding:20px 18px 12px 30px;}
.cooking-drawer-head h2 { flex:1; text-align:left; font-size:var(--text-xl); font-weight:700; color:var(--color-text-primary);}
.cooking-drawer-head h2 em { display:block; font-size:.65em; font-weight:500; font-style:normal; color:var(--color-text-accent-light);}
.cooking-drawer-close { flex:none; height:48px; padding:0 22px; font-size:var(--text-sm); font-weight:700; color:var(--color-white); background:var(--color-accent-main); border-radius:24px;}
.cooking-drawer-close b { font-weight:700;}
.cooking-drawer-body { flex:1; min-height:0; padding:4px 14px calc(22px + env(safe-area-inset-bottom)); overflow-y:auto; overscroll-behavior:contain;}

/* -----  mobil: cela obrazovka  ------------------------------ */
@media screen and (max-width: 760px) {
	.cooking-panel { width:calc(100% - 16px); max-width:none; height:calc(100% - 16px); border-radius:24px;}
	.cooking-top { padding:10px 12px 0 20px;}
	.cooking-label { font-size:var(--text-m);}
	.cooking-ing-toggle { padding:0 16px;}
	.cooking-slide { padding:76px 22px 136px;}
	.cooking-slide.cover .cooking-slide-inner { padding:80px 22px 40px;}
	.cooking-stepno { width:48px; height:48px; margin-bottom:18px; font-size:var(--text-xl);}
	.cooking-nav { gap:10px; padding:48px 12px calc(12px + env(safe-area-inset-bottom));}
	.cooking-nav button { height:68px;}
	.cooking-check { gap:14px; padding:10px 10px;}
	.cooking-checklist h3, .cooking-note { margin-left:10px;}
	.cooking-rating .rating-input button { width:58px; height:60px;}
	.cooking-rating .rating-input button svg { width:50px;}
	.cooking-drawer { max-height:86%;}
	.cooking-drawer-head { padding:18px 12px 10px 22px;}
	.cooking-drawer-body { padding-left:8px; padding-right:8px;}
}
/* nizka obrazovka (telefon na sirku): min. svisle rezie */
@media screen and (max-height: 520px) {
	.cooking-panel { width:calc(100% - 16px); max-width:none; height:calc(100% - 16px); border-radius:24px;}
	.cooking-slide .cooking-text { font-size:1.1rem; line-height:1.4;}
	.cooking-tip-icon { width:40px; height:32px; margin-bottom:10px;}
	.cooking-nav { padding-top:36px; padding-bottom:calc(10px + env(safe-area-inset-bottom));}
	.cooking-slide { padding-top:66px; padding-bottom:104px;}
	.cooking-nav button { height:56px;}
	.cooking-stepno { width:40px; height:40px; margin-bottom:12px; font-size:var(--text-ml);}
	.cooking-section { margin-bottom:10px;}
	.cooking-cover-buttons { margin-top:24px;}
	.cooking-start { height:60px;}
}
@media (prefers-reduced-motion: reduce) {
	.cooking, .cooking-panel, .cooking-track, .cooking-drawer, .cooking-progress i, .cooking-start, .cooking-nav button, .cooking-check i:after { transition:none;}
	.cooking-rating.is-saving .rating-input button.is-on svg { animation:none;}
}
