/* ========================================
   GENERAL — OVERLAY, MODAL AND LOADER
======================================== */

.tko_overlay {
	position: fixed;
	z-index: 100000;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	color: rgb(255, 255, 255);
	background: rgba(0, 0, 0, 0.6);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.5s;
}

.tko_overlay [hidden],
.tko_overlay[hidden] {
	display: none;
}

.tko_visible {
	opacity: 1;
	pointer-events: auto;
}

.tko_modal {
	position: relative;
	display: flex;
	flex-direction: column;
	width: 90%;
	max-width: 600px;
	max-height: calc(100% - 40px);
	font-family: inherit;
	font-size: 16px;
	line-height: 1.5;
	color: rgb(255, 255, 255);
	background: rgba(0, 0, 0, 0.8);
	border: 1px solid rgba(255, 255, 255, 0.5);
	border-radius: 10px;
	transform: scale(1);
	transition: transform 0.5s;
}

.tko_resizing {
	transition: height 0.5s ease, transform 0.5s;
}

.tko_closing .tko_modal {
	transform: scale(0.97);
}

.tko_overlay *,
.tko_overlay *::before,
.tko_overlay *::after {
	box-sizing: border-box;
}

.tko_content {
	position: relative;
	z-index: 0;
	min-height: 0;
	overflow: auto;
	overscroll-behavior: contain;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.5s;
}

.tko_content_ready {
	opacity: 1;
	visibility: visible;
}

.tko_modal.tko_loading {
	min-height: 160px;
}

.tko_loader {
	position: absolute;
	z-index: 5;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.3s, visibility 0s linear 0.3s;
}

.tko_spinner {
	width: 40px;
	height: 40px;
	background-image: url("loader.png");
	background-position: center;
	background-size: contain;
	background-repeat: no-repeat;
}

.tko_loading .tko_loader {
	opacity: 1;
	visibility: visible;
	transition-delay: 0s;
}

.tko_loading .tko_spinner {
	animation: tko_spin 1.5s linear infinite;
}

.tko_loading .tko_status {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

@keyframes tko_spin {
	from {
		transform: rotate(0deg);
	}

	to {
		transform: rotate(360deg);
	}
}

.tko_close {
	position: absolute;
	z-index: 10;
	top: 0;
	right: 0;
	display: block;
	width: 40px;
	height: 40px;
	margin: 10px;
	padding: 0;
	line-height: 300%;
	color: rgb(255, 255, 255);
	background: rgb(0, 0, 0);
	border: 1px solid rgba(255, 255, 255, 0.3);
	border-radius: 50%;
	cursor: pointer;
	transition: transform 0.3s;
}

.tko_close::before,
.tko_close::after {
	position: absolute;
	top: 50%;
	left: 30%;
	width: 40%;
	height: 1px;
	background: rgb(255, 255, 255);
	pointer-events: none;
	content: "";
}

.tko_close::before {
	transform: rotate(45deg);
}

.tko_close::after {
	transform: rotate(-45deg);
}

.tko_close:hover {
	transform: scale(1.1);
}

.tko_modal:focus-visible,
.tko_close:focus-visible,
.tko_button_link:focus-visible {
	outline: 0px solid currentColor;
	outline-offset: 4px;
}


.tko_status {
	margin: 0;
	padding: 60px 24px 24px;
}

.tko_status:empty {
	display: none;
}

body.tko_open {
	overflow: hidden;
}

/* ========================================
   GENERAL — TITLES, TEXT AND BUTTONS
======================================== */

.tko_copy {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	padding: 60px 32px 0px;
	text-align: center;
}

.tko_title {
	margin: 0;
	font-family: "Inter", sans-serif;
	font-size: 30px;
	font-weight: 900;
	line-height: 1.1;
	text-transform: uppercase;
	overflow-wrap: anywhere;
	margin-top: 40px;
}

.tko_subtitle {
	margin: 0;
	font-size: 20px;
	font-family: "Inter", sans-serif;
	font-weight: 900;
}

.tko_text {
	width: 100%;
	overflow-wrap: anywhere;
}

.tko_text p {
	margin: 0 0 16px;
}

.tko_text p:last-child {
	margin-bottom: 0;
}

.tko_text ul,
.tko_text ol {
	padding-left: 24px;
	text-align: left;
}

.tko_text a {
	color: inherit;
	text-decoration: underline;
}

.tko_button_link {
	display: inline-block;
	max-width: 100%;
	padding: 0 5px;
	font-family: "Inter", sans-serif;
	font-size: 20px;
	font-weight: 900;
	line-height: 1.5;
	text-transform: uppercase;
	text-decoration: none;
	color: rgb(255, 255, 255);
	background-color: rgba(0, 0, 0, 0.8);
	overflow-wrap: anywhere;
	transition: color 0.5s, background-color 0.5s;
	text-shadow: 0px 0px 0px rgba(0, 0, 0, 0);

	
}

.tko_button_link::after {
	padding-left: 10px;
	content: "➔";
}

.tko_button_link:hover {
	color: rgb(0, 0, 0);
	background: rgb(255, 255, 255);
}

/* ========================================
   YOUTUBE — VIEWPORT SIZING
   Edit these values to change the contained box
   and the bottom control bar. No resize JS.
======================================== */

.tko_type_youtube {
	--tko_screen_height: 100vh;
	--tko_video_width: 80vw;
	--tko_video_height: 80vh;
	--tko_controls_height: 40px;
	--tko_controls_inset: 20px;
	--tko_bottom_space: 0px;
	--tko_contain_height: min(var(--tko_video_height), calc(var(--tko_screen_height) - 2 * var(--tko_bottom_space)));
	width: 100%;
	max-width: none;
	height: 100%;
	max-height: none;
	background: transparent;
	border: 0;
	border-radius: 0;
}

.tko_youtube_controls {
	--tko_bottom_space: calc(var(--tko_controls_height) + var(--tko_controls_inset) + env(safe-area-inset-bottom, 0px) + 8px);
}

/* Use the visible mobile viewport; vh remains the older-browser fallback. */
@supports (height: 100dvh) {
	.tko_type_youtube {
		--tko_screen_height: 100dvh;
		--tko_video_height: 80dvh;
	}
}

.tko_youtube_content {
	width: 100%;
	height: 100%;
	overflow: visible;
	display: flex;
	align-items: flex-end;
}

.tko_player {
	position: absolute;
	inset: 0;
}

.tko_video_frame {
	position: absolute;
	inset: 0;
	overflow: hidden;
}

.tko_video {
	position: absolute;
	top: 50%;
	left: 50%;
	max-width: none;
	border: 0;
	transform: translate(-50%, -50%);
}

/* The two dimensions use the same 16:9 calculation, without rounding. */
.tko_video_contain {
	width: min(var(--tko_video_width), calc(var(--tko_contain_height) * 16 / 9));
	height: min(var(--tko_contain_height), calc(var(--tko_video_width) * 9 / 16));
}

.tko_video_cover {
	width: max(100vw, calc(var(--tko_screen_height) * 16 / 9));
	height: max(var(--tko_screen_height), calc(100vw * 9 / 16));
}

/* ========================================
   YOUTUBE — BOTTOM CONTROLS AND OPTIONAL COPY
======================================== */

.tko_player_controls {
	position: fixed;
	z-index: 4;
	right: var(--tko_controls_inset);
	bottom: var(--tko_controls_inset);
	left: var(--tko_controls_inset);
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	align-items: center;
	gap: 12px;
	height: calc(var(--tko_controls_height) + env(safe-area-inset-bottom, 0px));
	padding: 12px 16px;
	padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
	background: rgba(0, 0, 0, 0.7);
	border-radius: 10px;
	border: solid 1px rgba(255, 255, 255, 0.3);
}

.tko_player_button,
.tko_player_start {
	min-height: 20px;
	padding: 6px 10px;
	font-family: "Inter", sans-serif;
	font-size: 14px;
	font-weight: 900;
	text-transform: uppercase;
	color: rgb(255, 255, 255);
	background: rgb(0, 0, 0);
	border: 1px solid rgba(255, 255, 255, 0.5);
	border-radius: 6px;
	cursor: pointer;
}

.tko_player_button {
	flex-shrink: 0;
	width: 20px;
	height: 20px;
	padding: 0;
	background-color: transparent;
	background-position: left;
	background-size: contain;
	background-repeat: no-repeat;
	border: 0;
}

.tko_player_play {
	background-image: url("icons/play.svg");
}

.tko_player_playing {
	background-image: url("icons/pause.svg");
}

.tko_player_mute {
	background-image: url("icons/volume-high.svg");
}

.tko_player_muted {
	background-image: url("icons/volume-xmark.svg");
}

.tko_player_button:disabled {
	opacity: 0.5;
	cursor: default;
}

.tko_player_seek {
	flex-grow: 1;
	flex-shrink: 1;
	flex-basis: 0;
	height: 6px;
	min-width: 0;
	margin: 0;
	background: rgba(255, 255, 255, 0.25);
	cursor: pointer;
	touch-action: none;
	border-radius: 3px;
}

.tko_player_seek[aria-disabled="true"] {
	cursor: default;
}


.tko_player_seek:focus-visible {
	outline: 0px solid currentColor;
	outline-offset: 4px;
}


.tko_player_progress {
	width: 0;
	height: 100%;
	background: rgb(255, 255, 255);
	pointer-events: none;
	border-radius: 3px;
}

.tko_player_start {
	position: fixed;
	z-index: 4;
	bottom: calc(var(--tko_bottom_space) + 16px);
	left: 50%;
	transform: translateX(-50%);
}

.tko_player_message {
	position: fixed;
	z-index: 3;
	top: 60px;
	left: 10%;
	width: 80%;
	margin: 0;
	padding: 8px 16px;
	font-size: 14px;
	text-align: center;
}

.tko_player_message:empty {
	display: none;
}

.tko_watch_link {
	position: fixed;
	z-index: 4;
	bottom: calc(var(--tko_bottom_space) + 16px);
	left: 10%;
	width: 80%;
	color: inherit;
	text-align: center;
	text-decoration: underline;
}

.tko_youtube_copy {
	position: fixed;
	z-index: 2;
	left: 10%;
	width: 80%;
	max-height: calc(var(--tko_screen_height) - 2 * max(60px, var(--tko_bottom_space)));
	gap: 8px;
	padding: 8px 12px;
	overflow: auto;
	text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8);
	transform: translateY(-50%);
	margin-bottom: 10px;
}

/* ========================================
   IMAGE — FULLSCREEN, CONTAIN OR COVER
======================================== */

.tko_type_image {
	width: 100%;
	max-width: none;
	height: 100%;
	max-height: none;
	background: rgb(0, 0, 0);
	border: 0;
	border-radius: 0;
}

.tko_image_content {
	height: 100%;
}

.tko_image_picture {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: contain;
	padding: 5%;
}

.tko_picture_cover {
	object-fit: cover;
}

.tko_image_copy {
	position: absolute;
	inset: 0;
	justify-content: safe center;
	padding: 70px 24px;
	overflow: auto;
	text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8);
	background-color: rgba(0, 0, 0, 0.2);
}

/* ========================================
   COLUMNS — IMAGE AND TEXT
======================================== */

.tko_type_split {
	max-width: 1000px;
}

.tko_split_content {
	display: flex;
	flex-direction: row;
	align-items: stretch;
}

.tko_split_picture {
	width: 50%;
	height: auto;
	min-width: 0;
	object-fit: contain;
	align-self: center;
	padding: 2%;
}

.tko_split_copy {
	width: 50%;
	justify-content: safe center;
}

/* ========================================
   TEXT — SHARED COPY STYLES ABOVE
======================================== */

/* ========================================
   EMBED — SCROLLABLE FORM OR DOCUMENT
======================================== */

.tko_type_embed {
	max-width: 600px;
}

.tko_embed_frame {
	display: block;
	width: 100%;
	height: 550px;
	max-width: 100%;
	border: 0;
	color-scheme: normal;
	border-radius: 10px;
}

.tko_embed_content {
	padding-top: 0px;
}

.tko_embed_copy {
	padding-top: 0;
}

/* ========================================
   MOBILE — THE ONLY WIDTH BREAKPOINT
======================================== */

@media (max-width: 768px) {
	.tko_title {
		font-size: 26px;
	}

	.tko_copy {
		padding: 60px 20px 24px;
	}

	.tko_type_youtube {
		--tko_controls_height: 72px;
	}

	.tko_player_controls {
		padding: 8px 12px;
		padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
	}

	.tko_youtube_copy {
		padding: 8px 12px;
	}

	.tko_image_copy {
		padding: 70px 24px;
	}

	.tko_split_content {
		flex-direction: column;
	}

	.tko_split_picture,
	.tko_split_copy {
		width: 100%;
	}

	.tko_split_picture {
		max-height: 40vh;
	}

	.tko_embed_copy {
		padding-top: 0;
	}
}

/* ========================================
   REDUCED MOTION
======================================== */

@media (prefers-reduced-motion: reduce) {
	.tko_overlay,
	.tko_modal,
	.tko_loader,
	.tko_content,
	.tko_close,
	.tko_button_link {
		transition: none;
	}

	.tko_loading .tko_spinner {
		animation: none;
	}
}
