/**
 * Videos Gallery playback dialog.
 * All selectors are scoped to the Videos page wrapper.
 */

.icango-videos-page .videos-gallery-modal {
	width: min(1040px, calc(100% - 40px));
	max-width: 1040px;
	max-height: calc(100dvh - 40px);
	margin: auto;
	padding: 0;
	color: #ffffff;
	background: transparent;
	border: 0;
	overflow: visible;
}

.icango-videos-page .videos-gallery-modal:not([open]) {
	display: none;
}

.icango-videos-page .videos-gallery-modal::backdrop {
	background: rgba(2, 6, 23, 0.78);
	backdrop-filter: blur(4px);
}

.icango-videos-page .videos-gallery-modal__shell {
	position: relative;
	width: 100%;
	padding: 12px;
	background: #0f172a;
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: 18px;
	box-shadow: 0 28px 80px rgba(2, 6, 23, 0.42);
	box-sizing: border-box;
}

.icango-videos-page .videos-gallery-modal__player {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	background: #000000;
	border-radius: 12px;
	overflow: hidden;
}

.icango-videos-page .videos-gallery-modal__player iframe,
.icango-videos-page .videos-gallery-modal__player video {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	border: 0;
	object-fit: contain;
}

.icango-videos-page .videos-gallery-modal__close {
	position: absolute;
	top: -18px;
	right: -18px;
	z-index: 2;
	display: grid;
	place-items: center;
	width: 42px;
	height: 42px;
	padding: 0;
	color: #0f172a;
	background: #ffffff;
	border: 1px solid #dbe3ef;
	border-radius: 50%;
	box-shadow: 0 8px 24px rgba(2, 6, 23, 0.24);
	font: inherit;
	font-size: 28px;
	font-weight: 400;
	line-height: 1;
	cursor: pointer;
	transition: color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.icango-videos-page .videos-gallery-modal__close:hover {
	color: #ffffff;
	background: #2563eb;
	transform: translateY(-1px);
}

.icango-videos-page .videos-gallery-modal__close:focus-visible {
	outline: 3px solid #93c5fd;
	outline-offset: 3px;
}

@media (max-width: 767px) {
	.icango-videos-page .videos-gallery-modal {
		width: calc(100% - 24px);
		max-height: calc(100dvh - 24px);
	}

	.icango-videos-page .videos-gallery-modal__shell {
		padding: 8px;
		border-radius: 14px;
	}

	.icango-videos-page .videos-gallery-modal__player {
		border-radius: 9px;
	}

	.icango-videos-page .videos-gallery-modal__close {
		top: -14px;
		right: -6px;
		width: 40px;
		height: 40px;
	}
}
