/*
 * OmniResponse – product video loops (stage VIDEO, 2026-10-31). Loaded by mu-plugins/omni-video-loops.php only on pages
 * with an opted-in Video block (class omni-loop / omni-explainer). Builds on omni-brand.css tokens.
 * The pause button copies the hero background button (omni-bg.css .omni-bg-toggle): 36 px circle, navy 78 %, border #7C98BC,
 * icon #E4F1FC (on #0B1A2E: 14.9:1), focus ring = brand focus colour #F2A94E.
 */

.wp-block-video.omni-loop,
.wp-block-video.omni-explainer { position: relative; margin: 0; }
/* The pause button sits under the frame (bottom right), never over the burned-in "Example with fictional data" line or the
   lockup. Its row is reserved from the first paint (the button itself appears with JS), so nothing moves. */
.wp-block-video.omni-loop { padding-bottom: 46px; }

/* Fixed proportions from the width/height attributes + inline aspect-ratio: no layout shift before the metadata loads. */
.wp-block-video.omni-loop video,
.wp-block-video.omni-explainer video {
	display: block; width: 100%; height: auto; max-width: 100%; object-fit: cover;
	background: #0B1A2E; border-radius: var(--omni-radius, 16px);
}
/* Hero: same frame as the image it replaces (.omni-visual img in omni-brand.css). */
.wp-block-video.omni-loop.omni-visual video {
	border: 1px solid var(--omni-card-line, rgba(185, 210, 236, 0.18)); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

/* The caption of a loop is its short text alternative (WCAG 1.2.1): read by screen readers, not shown. */
.wp-block-video.omni-loop > figcaption {
	position: absolute !important; width: 1px !important; height: 1px !important; margin: -1px !important; padding: 0 !important;
	overflow: hidden !important; clip: rect(0 0 0 0) !important; clip-path: inset(50%) !important; white-space: nowrap !important; border: 0 !important;
}

/* Landing hero: the video takes the place of the draft card; the card itself (unchanged text) sits in a
   "Show the sample draft" disclosure under the video: one copy of the text, for sighted users and screen readers alike. */
.omni-draft-mock.omni-has-video > .kt-inside-inner-col {
	position: relative; background: none; border: 0; padding: 0; box-shadow: none;
}
.omni-has-video .wp-block-video.omni-loop video {
	border: 1px solid var(--omni-card-line, rgba(185, 210, 236, 0.18)); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}
/* The summary shares the row reserved under the video with the pause button (left: summary, right: button). */
.entry-content .omni-draft-details { position: relative; z-index: 1; margin: -40px 52px 0 0; }
.entry-content .omni-draft-details > summary {
	display: inline-flex; align-items: center; gap: 0.5em; min-height: 36px; padding: 0 2px; cursor: pointer; list-style: none;
	font-size: 15px; font-weight: 600; line-height: 1.3; color: var(--global-palette2, #6FC6F5);
	text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px;
}
.entry-content .omni-draft-details > summary::-webkit-details-marker { display: none; }
.entry-content .omni-draft-details > summary::before {
	content: ""; flex: 0 0 auto; width: 7px; height: 7px; margin: 0 2px 0 4px; border: solid currentColor; border-width: 0 2px 2px 0;
	transform: rotate(-45deg); transition: transform 0.2s ease;
}
.entry-content .omni-draft-details[open] > summary::before { transform: rotate(45deg); }
.entry-content .omni-draft-details > summary:hover { color: var(--global-palette3, #F5F9FD); }
.entry-content .omni-draft-details > summary:focus-visible { outline: 2px solid #F2A94E; outline-offset: 2px; border-radius: 4px; }
/* Opened: the former draft card, same look as .omni-draft-mock in omni-landing.css. */
.entry-content .omni-draft-details[open] { margin-right: 0; }
.entry-content .omni-draft-details[open] > summary { margin-right: 52px; }
.entry-content .omni-draft-details[open] > summary ~ * { margin-left: 0; margin-right: 0; }
.entry-content .omni-draft-details > .omni-draft-meta {
	margin-top: 12px; padding: 24px 26px 0; border: 1px solid var(--omni-card-line); border-bottom: 0;
	border-radius: var(--omni-radius) var(--omni-radius) 0 0; background: var(--global-palette7); margin-bottom: 0;
	padding-bottom: 0.9em;
}
.entry-content .omni-draft-details > .omni-draft-subject,
.entry-content .omni-draft-details > .omni-draft-body,
.entry-content .omni-draft-details > .omni-draft-source,
.entry-content .omni-draft-details > .omni-draft-caption {
	padding-left: 26px; padding-right: 26px; border-left: 1px solid var(--omni-card-line); border-right: 1px solid var(--omni-card-line);
	background: var(--global-palette7); margin-bottom: 0;
}
.entry-content .omni-draft-details > .omni-draft-subject { padding-bottom: 0.6em; }
.entry-content .omni-draft-details > .omni-draft-body { padding-bottom: 1em; }
.entry-content .omni-draft-details > .omni-draft-source {
	padding-left: calc(26px + 3px + 0.75em); padding-bottom: 0.9em;
	background: linear-gradient(var(--global-palette2), var(--global-palette2)) 26px 0 / 3px calc(100% - 0.9em) no-repeat, var(--global-palette7);
}
.entry-content .omni-draft-details > .omni-draft-caption {
	padding-bottom: 22px; border-bottom: 1px solid var(--omni-card-line); border-radius: 0 0 var(--omni-radius) var(--omni-radius);
}
@media (max-width: 767px) {
	.entry-content .omni-draft-details > .omni-draft-meta { padding: 20px 20px 0.9em; }
	.entry-content .omni-draft-details > .omni-draft-subject, .entry-content .omni-draft-details > .omni-draft-body,
	.entry-content .omni-draft-details > .omni-draft-caption { padding-left: 20px; padding-right: 20px; }
	.entry-content .omni-draft-details > .omni-draft-source { padding-left: calc(20px + 3px + 0.75em); padding-right: 20px;
		background-position: 20px 0, 0 0; }
	.entry-content .omni-draft-details > .omni-draft-caption { padding-bottom: 20px; }
}
/* From 768 px the landing hero columns are top-aligned: opening the draft disclosure only grows the page downwards
   (the video, its button, the H1 and the CTA stay where they are; Kadence centres the row vertically by default). */
@media (min-width: 768px) {
	.omni-hero.omni-hero-video > .kt-row-column-wrap { align-items: start !important; }
}
/* Tablet portrait (768–900 px): one column in the landing hero, the loop under the text, at most 640 px wide (panel UI-4, narrowed). */
@media (min-width: 768px) and (max-width: 900px) {
	.omni-hero.omni-hero-video > .kt-row-column-wrap { grid-template-columns: minmax(0, 1fr) !important; }
	.omni-hero.omni-hero-video .omni-draft-mock.omni-has-video { max-width: 640px; }
}
/* Desktop with enough height: wider video column in the landing hero. Below 820 px of height (1366×657, 1536×730 laptops)
   the default columns stay, so the hero CTA remains on the first screen (panel 2026-11-07, KDESIGN-1). */
@media (min-width: 1025px) and (min-height: 820px) {
	.omni-hero.omni-hero-video > .kt-row-column-wrap { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) !important; }
}
/* Short desktop screens (≤ 700 px of height, e.g. 1366×657): less top padding in the landing hero, so the CTA stays on the
   first screen on all 10 landings (panel 2026-11-07, L1-4). */
@media (min-width: 1025px) and (max-height: 700px) {
	.omni-hero.omni-hero-video > .kt-row-column-wrap { padding-top: 110px !important; }
}

/* A hero with a loop has ONE pause button (the loop's; it pauses the background too): the background's own button is hidden. */
.omni-video-hero-host > .omni-bg-toggle { display: none !important; }

/* "4 steps" on a phone: heading and text first, then the video, in every step (no two videos one under the other). */
@media (max-width: 767px) {
	.kt-row-column-wrap > .wp-block-kadence-column:has(.omni-loop-step) { order: 2; }
	/* The text column of a step: less side padding, a little air above (panel 2026-11-07, S-09). */
	.kt-row-column-wrap:has(.omni-loop-step) > .wp-block-kadence-column:not(:has(.omni-loop-step)) > .kt-inside-inner-col { padding: 28px 10px 0; }
}

/* "Human in the loop": the loop under the thesis, centred, card-width. */
.wp-block-video.omni-loop.omni-loop-hitl { max-width: 880px; margin: 32px auto 0; }
@media (max-width: 767px) { .wp-block-video.omni-loop.omni-loop-hitl { margin: 20px auto 0; } }
/* Same card frame as the hero and R4 videos (panel 2026-11-07, S-08). */
.wp-block-video.omni-loop.omni-loop-hitl video { border: 1px solid var(--omni-card-line, rgba(185, 210, 236, 0.18)); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35); }

/* Pause / play button (same look as the hero background button). */
.wp-block-video.omni-loop > .omni-video-toggle {
	position: absolute; right: 0; bottom: 0; z-index: 2;
	display: inline-flex; align-items: center; justify-content: center;
	width: 36px; height: 36px; min-height: 0; padding: 0; margin: 0;
	border: 1px solid #7C98BC; border-radius: 999px; box-shadow: none;
	background: rgba(11, 26, 46, 0.78); color: #E4F1FC; cursor: pointer; line-height: 1;
	transition: background-color 0.2s ease, border-color 0.2s ease;
}
.wp-block-video.omni-loop > .omni-video-toggle:hover,
.wp-block-video.omni-loop > .omni-video-toggle:focus-visible { background: #0B1A2E; border-color: #B9D2EC; color: #F5F9FD; }
.wp-block-video.omni-loop > .omni-video-toggle:focus-visible { outline: 2px solid #F2A94E; outline-offset: 2px; }
.wp-block-video.omni-loop > .omni-video-toggle[hidden] { display: none; }
.wp-block-video.omni-loop > .omni-video-toggle svg { width: 14px; height: 14px; fill: currentColor; }
/* 44 px touch target without changing the 36 px look (panel 2026-11-07, S-18). */
.wp-block-video.omni-loop > .omni-video-toggle::before { content: ""; position: absolute; inset: -4px; border-radius: inherit; }

/* R4 "How OmniResponse works" (click to play, narration + captions) under the "4 steps": centred, card frame, visible caption. */
.wp-block-video.omni-explainer { max-width: 960px; margin: 48px auto 8px; }
.wp-block-video.omni-explainer video {
	border: 1px solid var(--omni-card-line, rgba(185, 210, 236, 0.18)); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}
.wp-block-video.omni-explainer > figcaption {
	margin: 12px 0 0; text-align: center; font-size: 15px; line-height: 1.45; color: var(--global-palette5, #B9D2EC);
}
@media (max-width: 767px) { .wp-block-video.omni-explainer { margin: 32px auto 4px; } }

/* R4 start button: the whole poster is the button; a 72 px brand-blue circle with a navy triangle (#039EEA on #0B1A2E 5.9:1,
   triangle #0B1A2E on #039EEA 5.9:1) and a label pill. Native controls appear only after the start (JS). */
.wp-block-video.omni-explainer > .omni-film-play {
	position: absolute; top: 0; left: 0; z-index: 2; width: 100%; height: auto; margin: 0; padding: 0;
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
	border: 0; border-radius: var(--omni-radius, 16px); cursor: pointer; color: #F5F9FD; box-shadow: none;
	background: linear-gradient(180deg, rgba(11, 26, 46, 0.05) 0%, rgba(11, 26, 46, 0.45) 100%);
}
.wp-block-video.omni-explainer > .omni-film-play[hidden] { display: none; }
.omni-film-play__icon {
	display: inline-flex; align-items: center; justify-content: center; width: 72px; height: 72px; border-radius: 50%;
	background: #039EEA; border: 2px solid #E4F1FC; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4); transition: transform 0.15s ease, background-color 0.15s ease;
}
.omni-film-play__icon svg { width: 34px; height: 34px; margin-left: 4px; fill: #0B1A2E; }
.omni-film-play__label {
	padding: 7px 14px; border-radius: 999px; background: #0B1A2E; border: 1px solid rgba(111, 198, 245, 0.55); font-size: 16px; font-weight: 600; line-height: 1.3;
	color: #F5F9FD; text-align: center;
}
.wp-block-video.omni-explainer > .omni-film-play:hover .omni-film-play__icon { background: #36B4F0; transform: scale(1.05); }
.wp-block-video.omni-explainer > .omni-film-play:focus-visible { outline: 3px solid #F2A94E; outline-offset: -3px; }
.wp-block-video.omni-explainer > .omni-film-play:focus-visible .omni-film-play__icon { outline: 3px solid #F2A94E; outline-offset: 3px; }
@media (max-width: 767px) {
	.omni-film-play__icon { width: 64px; height: 64px; }
	.omni-film-play__icon svg { width: 30px; height: 30px; }
	.omni-film-play__label { font-size: 14px; padding: 6px 12px; }
	.wp-block-video.omni-explainer > .omni-film-play { gap: 10px; }
}
@media (prefers-reduced-motion: reduce) { .omni-film-play__icon { transition: none; } }
