/* 15-second cooking videos (recipe-film.js). Sizes follow the player's width (cqw), so the same video works on a recipe
   page, in the meal sheet and on the overview. */
.rf { --gold: #d6b056; position: relative; border-radius: 18px; overflow: hidden; background: #0b0b0a; border: 1px solid rgba(214, 176, 86, .35); color: #f5f5f0; }
.rf-stage { position: relative; aspect-ratio: 16 / 9; overflow: hidden; cursor: pointer; container-type: inline-size; isolation: isolate; }
.rf-v, .rf-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* the photo is always underneath: a shot fades in over it once it has a picture, and out again for the finished dish */
.rf-v { opacity: 0; transition: opacity .45s ease; transform: scale(1.02); pointer-events: none; background: transparent; }
.rf-v.on { opacity: 1; }
.rf-v::-webkit-media-controls, .rf-v::-webkit-media-controls-panel, .rf-v::-webkit-media-controls-start-playback-button,
.rf-v::-webkit-media-controls-overlay-play-button { display: none !important; -webkit-appearance: none; }
.rf-photo { transition: transform 1.2s ease; }
.rf.started .rf-photo { transform: scale(1.12); }
.rf.started[data-scene="photo"] .rf-photo { animation: rf-ken 4.6s ease-out forwards; }
@keyframes rf-ken { from { transform: scale(1.12); } to { transform: scale(1); } }
.rf-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(5, 5, 4, .82) 0%, rgba(5, 5, 4, .5) 42%, rgba(5, 5, 4, .08) 72%), linear-gradient(0deg, rgba(5, 5, 4, .55), transparent 40%); pointer-events: none; }
[dir="rtl"] .rf-shade { background: linear-gradient(270deg, rgba(5, 5, 4, .82) 0%, rgba(5, 5, 4, .5) 42%, rgba(5, 5, 4, .08) 72%), linear-gradient(0deg, rgba(5, 5, 4, .55), transparent 40%); }
.rf-eyebrow { display: block; color: var(--gold); font-weight: 800; letter-spacing: .28em; font-size: max(9px, 1.45cqw); margin-bottom: 1.2cqw; }
[dir="rtl"] .rf-eyebrow { letter-spacing: 0; }

/* each scene's text: hidden until its scene, then slides in; list rows follow one another */
.rf-title, .rf-list, .rf-steps, .rf-plate, .rf-macros { position: absolute; inset-inline-start: 5.5cqw; opacity: 0; transform: translateY(2.2cqw); transition: opacity .45s ease, transform .55s cubic-bezier(.2, .8, .2, 1); pointer-events: none; }
.rf-list li, .rf-steps li, .rf-bar { opacity: 0; transform: translateX(-2.5cqw); transition: opacity .4s ease, transform .5s cubic-bezier(.2, .8, .2, 1); transition-delay: calc(var(--i) * .32s + .25s); }
[dir="rtl"] .rf-list li, [dir="rtl"] .rf-steps li, [dir="rtl"] .rf-bar { transform: translateX(2.5cqw); }
.rf[data-scene="title"] .rf-title, .rf[data-scene="list"] .rf-list, .rf[data-scene="steps"] .rf-steps, .rf[data-scene="plate"] .rf-plate, .rf[data-scene="photo"] .rf-macros { opacity: 1; transform: none; }
.rf[data-scene="list"] .rf-list li, .rf[data-scene="steps"] .rf-steps li, .rf[data-scene="photo"] .rf-bar { opacity: 1; transform: none; }
.rf:not(.started) .rf-title { opacity: 1; transform: none; }
.rf:not(.started)[data-scene="photo"] .rf-title { opacity: 0; }

.rf-title { bottom: 8.5cqw; max-width: 62cqw; }
.rf-name { display: block; font-size: max(17px, 5.4cqw); line-height: 1.05; font-weight: 800; letter-spacing: -.02em; text-wrap: balance; }
.rf-pills { display: flex; flex-wrap: wrap; gap: 1cqw; margin-top: 1.8cqw; }
.rf-pills i { font-style: normal; font-weight: 700; font-size: max(10px, 1.7cqw); padding: .7cqw 1.6cqw; border-radius: 99px; border: 1px solid rgba(214, 176, 86, .55); background: rgba(5, 5, 4, .45); }
.rf-pills i:empty { display: none; }
.rf-pills i.gold { background: var(--gold); color: #090a09; border-color: var(--gold); }

.rf-list { top: 7cqw; max-width: 56cqw; }
.rf-list ul, .rf-steps ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.25cqw; }
.rf-list li { display: flex; align-items: baseline; gap: 1.6cqw; font-size: max(12px, 2.5cqw); font-weight: 600; }
.rf-list li b { color: var(--gold); min-width: 9cqw; font-weight: 800; flex: none; white-space: nowrap; }

.rf-steps { top: 7cqw; max-width: 60cqw; }
.rf-steps li { display: flex; align-items: center; gap: 1.4cqw; font-size: max(12px, 2.5cqw); font-weight: 700; }
.rf-steps em { font-style: normal; display: grid; place-items: center; width: 4.2cqw; height: 4.2cqw; border-radius: 50%; background: var(--gold); color: #090a09; font-weight: 900; font-size: max(10px, 1.9cqw); flex: none; }
.rf-steps small { font-size: max(10px, 1.7cqw); font-weight: 700; color: #f5f5f0; padding: .4cqw 1.2cqw; border-radius: 99px; border: 1px solid rgba(214, 176, 86, .5); background: rgba(5, 5, 4, .45); }

.rf-plate { bottom: 9cqw; }
.rf-plate span { font-size: max(15px, 4.4cqw); font-weight: 800; letter-spacing: -.01em; }

.rf-macros { top: 6cqw; width: 34cqw; padding: 2.4cqw 2.6cqw; border-radius: 2cqw; background: rgba(8, 8, 7, .72); border: 1px solid rgba(214, 176, 86, .4); backdrop-filter: blur(8px); }
.rf-big { display: block; color: var(--gold); font-size: max(22px, 7.2cqw); line-height: 1; font-weight: 900; margin-bottom: 1.6cqw; }
.rf-big small { display: block; color: #f5f5f0; font-size: max(10px, 1.7cqw); font-weight: 700; margin-top: .6cqw; }
.rf-bar { display: grid; grid-template-columns: 11cqw 1fr auto; align-items: center; gap: 1.2cqw; font-size: max(10px, 1.6cqw); font-weight: 700; margin-top: 1cqw; }
.rf-bar i { height: .9cqw; min-height: 4px; border-radius: 99px; background: rgba(255, 255, 255, .14); position: relative; overflow: hidden; }
.rf-bar i::after { content: ""; position: absolute; inset: 0; inset-inline-end: auto; width: 0; background: var(--gold); border-radius: inherit; transition: width .9s cubic-bezier(.2, .8, .2, 1); transition-delay: calc(var(--i) * .25s + .5s); }
.rf[data-scene="photo"] .rf-bar i::after { width: var(--w); }
.rf-kcal { display: block; margin-top: 1.6cqw; font-weight: 800; font-size: max(11px, 2cqw); }

.rf-brand { position: absolute; inset-inline-end: 3cqw; bottom: 2.6cqw; display: flex; align-items: center; gap: 1cqw; font-weight: 900; letter-spacing: .3em; font-size: max(9px, 1.5cqw); color: var(--gold); opacity: 0; transition: opacity .6s ease .8s; }
.rf-brand i { font-style: normal; letter-spacing: 0; display: grid; place-items: center; width: 3.6cqw; height: 3.6cqw; border: 2px solid var(--gold); border-radius: 1cqw; font-size: max(9px, 1.6cqw); }
.rf[data-scene="photo"] .rf-brand { opacity: 1; }

.rf-controls { display: flex; align-items: center; gap: 12px; padding: 8px 12px; background: #0e0e0c; border-top: 1px solid rgba(214, 176, 86, .25); }
.rf-controls button { flex: none; width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(214, 176, 86, .55); background: transparent; color: var(--gold); font-size: 13px; cursor: pointer; display: grid; place-items: center; }
.rf-controls button:hover { background: rgba(214, 176, 86, .14); }
.rf-play { background: var(--gold) !important; color: #090a09 !important; }
.rf-track { flex: 1; height: 4px; border-radius: 99px; background: rgba(255, 255, 255, .14); overflow: hidden; }
.rf-track i { display: block; height: 100%; width: 0; background: var(--gold); }
/* while the first shot loads: a spinning ring in the play button */
.rf.loading .rf-play { color: transparent !important; position: relative; }
.rf.loading .rf-play::after { content: ""; position: absolute; inset: 9px; border-radius: 50%; border: 2px solid #090a09; border-top-color: transparent; animation: rf-spin .8s linear infinite; }
@keyframes rf-spin { to { transform: rotate(360deg); } }

/* less motion: the finished dish and its numbers, no animation until play is pressed */
.rf.calm:not(.started) * { transition: none !important; animation: none !important; }
.rf.calm:not(.started) .rf-title { opacity: 0; }

/* where the videos sit */
.rf-section { margin: 26px 0; }
.rf-section > h2 { margin: 0 0 12px; }
.meal-film { margin: 14px 0 6px; }

/* overview: "Train with video" and "Cooking videos" */
.ov-motion, .ov-cook { margin-top: 26px; }
.ov-motion .section-head, .ov-cook .section-head { align-items: flex-end; gap: 12px; }
.ov-motion .section-head .muted, .ov-cook .section-head .muted { display: block; font-size: 13px; margin-top: 4px; }
.ov-moves { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.ov-move { padding: 0; overflow: hidden; min-width: 0; }
/* three to a row; four moves make two rows of two, and with five the last two share their row */
@media (min-width: 901px) {
  .ov-moves { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .ov-move { grid-column: span 2; }
  .ov-move:first-child:nth-last-child(4), .ov-move:first-child:nth-last-child(4) ~ .ov-move, .ov-move:nth-child(4):nth-last-child(2), .ov-move:nth-child(4):nth-last-child(2) ~ .ov-move { grid-column: span 3; }
}
.ov-move img, .ov-move video.exercise-clip { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; background: #0d0e0c; }
.ov-move > span { display: grid; gap: 4px; padding: 10px 12px 12px; }
.ov-move b { font-size: 14px; line-height: 1.3; }
.ov-move small { color: var(--muted); font-size: 12px; }
.ov-cook-grid { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.ov-film-poster { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 18px; }
.ov-cook-list { display: grid; gap: 8px; }
.ov-cook-item { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 10px; align-items: center; padding: 6px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .08); background: transparent; color: var(--text); text-align: start; cursor: pointer; }
.ov-cook-item:hover { border-color: #4b3e18; }
.ov-cook-item.active { border-color: #d6b056; background: rgba(214, 176, 86, .08); }
.ov-cook-item img { width: 76px; height: 57px; object-fit: cover; border-radius: 8px; }
.ov-cook-item > span { display: grid; gap: 3px; min-width: 0; }
.ov-cook-item b { font-size: 13px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ov-cook-item small { color: var(--muted); font-size: 11px; }
@media (max-width: 900px) {
  .ov-moves { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(200px, 70%); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; }
  .ov-move { scroll-snap-align: start; }
  .ov-cook-grid { grid-template-columns: 1fr; }
  .ov-cook-list { grid-auto-flow: column; grid-auto-columns: minmax(220px, 75%); overflow-x: auto; padding-bottom: 6px; }
}
