/* JADS Player — front-end styles */

.jads-yt-thumb {
	position: relative;
	display: block;
}

.jads-yt-thumb img {
	display: block;
	max-width: 100%;
	height: auto;
}

.jads-yt-play {
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	display: inline-flex;
	align-items: center;
	gap: 0.5em;
	max-width: calc(100% - 1.5em);
	margin: 0;
	padding: 0.5em 0.9em;
	border: 0;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.55);
	color: #fff;
	font: 600 14px/1 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	cursor: pointer;
	z-index: 2;
	-webkit-backdrop-filter: blur(2px);
	backdrop-filter: blur(2px);
	transition: transform 0.12s ease, background 0.12s ease;
}

.jads-yt-play:hover,
.jads-yt-play:focus-visible {
	background: rgba(0, 0, 0, 0.78);
	transform: translate(-50%, -50%) scale(1.06);
	outline: none;
}

.jads-yt-play__icon {
	width: 1.5em;
	height: 1.5em;
	flex: 0 0 auto;
}

.jads-yt-play__icon circle {
	fill: #fff;
	opacity: 0.18;
}

.jads-yt-play__icon path {
	fill: #fff;
}

.jads-yt-play__label {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

@media (max-width: 600px) {
	.jads-yt-play {
		padding: 0.45em 0.7em;
		font-size: 12px;
	}
}

/* Modal */
.jads-player-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
}

.jads-player-modal[hidden] {
	display: none;
}

.jads-player-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.86);
}

.jads-player-modal__dialog {
	position: relative;
	width: min(92vw, 1100px);
}

.jads-player-modal__frame {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	background: #000;
	border-radius: 10px;
	overflow: hidden;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.jads-player-modal__frame iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.jads-player-modal__close {
	position: absolute;
	top: -2.6em;
	right: 0;
	padding: 0.2em 0.35em;
	border: 0;
	background: transparent;
	color: #fff;
	font-size: 1.6em;
	line-height: 1;
	cursor: pointer;
}

.jads-player-modal__close:hover,
.jads-player-modal__close:focus-visible {
	opacity: 0.75;
	outline: none;
}

body.jads-player-open {
	overflow: hidden;
}
