.video-gate-container {
	max-width: 480px;
	margin: 2em auto;
	padding: 2em;
	border: 1px solid #e2e2e2;
	border-radius: 8px;
	background: #fafafa;
	text-align: center;
	box-sizing: border-box;
}

.video-gate-container * {
	box-sizing: border-box;
}

.video-gate-form label {
	display: block;
	margin-bottom: 0.85em;
	font-weight: 600;
	font-size: 1.05em;
}

.video-gate-input-row {
	display: flex;
	gap: 0.5em;
}

.video-gate-input {
	flex: 1;
	min-width: 0;
	padding: 0.65em 0.8em;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-size: 1em;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.video-gate-form button {
	padding: 0.65em 1.3em;
	background: #1a1a1a;
	color: #fff;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	font-size: 1em;
	white-space: nowrap;
	transition: background-color 0.15s ease;
}

.video-gate-form button:hover:not(:disabled) {
	background: #333;
}

.video-gate-form button:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.video-gate-message {
	margin: 0.75em 0 0;
	font-size: 0.9em;
	min-height: 1.2em;
	color: #444;
}

.video-gate-message.video-gate-error {
	color: #c0392b;
}

.video-gate-player {
	max-width: 900px;
	margin: 1.5em auto;
}

.video-gate-responsive-embed {
	position: relative;
	padding-bottom: 56.25%; /* 16:9 */
	height: 0;
	overflow: hidden;
	max-width: 100%;
	border-radius: 8px;
	background: #000;
}

.video-gate-responsive-embed iframe {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

/* Sits on top of the pop-out ("open in new window") icon Google Drive
   always shows in its embedded preview player — there's no official way
   to remove that icon, so this blocks clicks on that corner instead.
   Best-effort sizing since it can't be pixel-verified without seeing the
   live embed; nudge the width/height below if it's not quite lined up. */
.video-gate-drive-block {
	position: absolute;
	top: 0;
	right: 0;
	width: 64px;
	height: 56px;
	z-index: 2;
	background: transparent;
	cursor: default;
}

@media (max-width: 480px) {
	.video-gate-input-row {
		flex-direction: column;
	}
}

/* Custom S3 player — deliberately has no native <video controls>, so
   everything below IS the control bar. */

.video-gate-s3-player {
	max-width: 900px;
	margin: 1.5em auto;
	background: #000;
	border-radius: 8px;
	overflow: hidden;
}

.vg-video-wrap {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	background: #000;
}

.vg-video-wrap video {
	width: 100%;
	height: 100%;
	display: block;
}

.vg-controls {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 14px;
	background: #1a1a1a;
	color: #fff;
}

.vg-btn {
	background: none;
	border: none;
	color: #fff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 4px;
	border-radius: 4px;
	flex-shrink: 0;
	line-height: 0;
}

.vg-btn:hover {
	background: rgba(255, 255, 255, 0.15);
}

.vg-time-current,
.vg-time-duration {
	font-size: 0.8em;
	font-variant-numeric: tabular-nums;
	color: #ccc;
	flex-shrink: 0;
	min-width: 2.5em;
}

.vg-time-duration {
	text-align: right;
}

.vg-seek {
	flex: 1;
	min-width: 60px;
	accent-color: #fff;
}

.vg-volume {
	width: 70px;
	accent-color: #fff;
}

@media (max-width: 480px) {
	.vg-volume {
		display: none;
	}
	.vg-controls {
		gap: 6px;
		padding: 8px 10px;
	}
}
