/* ArrayStory video player (assets/js/video-player.js), for docs and landing pages. */
.doc-body figure.doc-player { margin: 1.8em 0; }

.doc-player__stage {
	position: relative;
	overflow: hidden;
	border-radius: 12px;
	background: #0b1020;
	box-shadow: var(--doc-shadow, 0 20px 50px rgb(2 6 23 / 0.25));
	outline: none;
}

.doc-player__stage:focus-visible { box-shadow: 0 0 0 3px var(--doc-link, #2563eb); }

.doc-player__stage video {
	display: block;
	width: 100%;
	border-radius: 0;
	box-shadow: none;
	cursor: pointer;
}

.doc-player__unmute {
	position: absolute;
	top: 12px;
	left: 12px;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 7px 14px 7px 10px;
	border: 0;
	border-radius: 999px;
	background: rgb(15 23 42 / 0.82);
	color: #fff;
	font: 600 13px/1 -apple-system, "Segoe UI", Inter, sans-serif;
	cursor: pointer;
	backdrop-filter: blur(6px);
	transition: background 0.15s, transform 0.15s;
}

.doc-player__unmute:hover { background: rgb(37 99 235 / 0.95); transform: translateY(-1px); }
.doc-player__unmute svg { width: 18px; height: 18px; }
.doc-player__unmute[hidden] { display: none; }

.doc-player__screen { position: relative; }

/* Subtitles: a strip under the picture, shown while they're switched on. */
.doc-player__caption {
	display: none;
	align-items: center;
	justify-content: center;
	min-height: 3.1em;
	padding: 8px 16px;
	background: #0b1020;
	border-top: 1px solid rgb(255 255 255 / 0.08);
	color: #e2e8f0;
	font: 500 clamp(13px, 1.5vw, 16px)/1.45 -apple-system, "Segoe UI", Inter, sans-serif;
	text-align: center;
}

.doc-player.has-cc .doc-player__caption { display: flex; }

.doc-player__bar {
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	display: flex;
	align-items: center;
	gap: 4px;
	padding: 22px 10px 8px;
	background: linear-gradient(to top, rgb(2 6 23 / 0.85), rgb(2 6 23 / 0));
	color: #fff;
	opacity: 0;
	transform: translateY(6px);
	transition: opacity 0.2s, transform 0.2s;
}

.doc-player.is-awake .doc-player__bar,
.doc-player.is-paused .doc-player__bar,
.doc-player__stage:focus-within .doc-player__bar { opacity: 1; transform: none; }

.doc-player__btn {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	min-width: 34px;
	height: 34px;
	padding: 0 6px;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: #fff;
	font: 700 13px/1 -apple-system, "Segoe UI", Inter, sans-serif;
	text-decoration: none;
	cursor: pointer;
	transition: background 0.15s;
}

.doc-player__btn:hover,
.doc-player__btn:focus-visible { background: rgb(255 255 255 / 0.16); color: #fff; outline: none; }
.doc-player__btn svg { width: 20px; height: 20px; }
.doc-player__btn.is-active { background: rgb(255 255 255 / 0.22); }
.doc-player__speed { min-width: 44px; }

.doc-player__seek {
	position: relative;
	flex: 1;
	height: 4px;
	margin: 0 8px;
	border-radius: 999px;
	background: rgb(255 255 255 / 0.22);
}

.doc-player__buffered,
.doc-player__progress {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	border-radius: inherit;
}

.doc-player__buffered { background: rgb(255 255 255 / 0.3); }
.doc-player__progress { background: #60a5fa; }

.doc-player__seek input {
	position: absolute;
	inset: -8px 0;
	width: 100%;
	margin: 0;
	opacity: 0;
	cursor: pointer;
}

.doc-player__seek:hover { height: 6px; }

.doc-player__time {
	flex: none;
	margin-right: 4px;
	font: 500 12px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
	color: rgb(255 255 255 / 0.85);
	white-space: nowrap;
}

.doc-player__stage:fullscreen { display: flex; align-items: center; border-radius: 0; }
.doc-player__stage:fullscreen video { max-height: 100vh; }

@media (max-width: 520px) {
	.doc-player__time { display: none; }
	.doc-player__btn { min-width: 30px; }
}

/* Promo mode: the poster with a big play button until it starts. */
.doc-player__bigplay {
	position: absolute;
	top: 50%;
	left: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 96px;
	height: 96px;
	border: 0;
	border-radius: 50%;
	background: rgb(124 58 237 / 0.92);
	color: #fff;
	box-shadow: 0 20px 50px rgb(2 6 23 / 0.45), 0 0 0 10px rgb(255 255 255 / 0.12);
	transform: translate(-50%, -50%);
	cursor: pointer;
	transition: transform 0.2s, background 0.2s;
}

.doc-player__bigplay:hover,
.doc-player__bigplay:focus-visible { background: #6d28d9; outline: none; transform: translate(-50%, -50%) scale(1.06); }
.doc-player__bigplay svg { width: 42px; height: 42px; margin-left: 5px; }
.doc-player__bigplay[hidden] { display: none; }
.doc-player.is-idle .doc-player__bar { opacity: 0; pointer-events: none; }

@media (max-width: 520px) {
	.doc-player__bigplay { width: 72px; height: 72px; }
	.doc-player__bigplay svg { width: 32px; height: 32px; }
}
