/**
 * PlugeTune Video Player Shortcode Styles
 *
 * @package PlugeTune
 */

/* ============================================================ */
/* Facade container - 16:9 aspect ratio wrapper                  */
/* ============================================================ */

.plugetune-video-facade {
	position: relative;
	width: 100%;
	padding-bottom: 56.25%; /* 16:9 */
	height: 0;
	overflow: hidden;
	max-width: 100%;
	background: #000;
	border-radius: 10px;
	cursor: pointer;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.plugetune-video-facade img {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.plugetune-video-facade:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}

/* Playing state — no cursor change, no hover transform */
.plugetune-facade--playing,
.plugetune-facade--playing:hover {
	cursor: default !important;
	transform: none !important;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
}

/* ============================================================ */
/* Facade overlay + play button                                  */
/* ============================================================ */

.plugetune-facade-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	transition: background 0.3s ease;
	display: flex;
	align-items: center;
	justify-content: center;
}

.plugetune-video-facade:hover .plugetune-facade-overlay {
	background: rgba(0, 0, 0, 0.25);
}

.plugetune-facade-play-btn {
	width: 80px;
	height: 80px;
	background: rgba(229, 9, 20, 0.95);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.3s ease, background 0.3s ease;
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

.plugetune-facade-play-btn svg {
	margin-left: 4px;
}

.plugetune-video-facade:hover .plugetune-facade-play-btn {
	transform: scale(1.1);
	background: rgba(229, 9, 20, 1);
}

/* ============================================================ */
/* Dynamic iframe (created by frontend.js)                       */
/* ============================================================ */

.plugetune-facade-iframe {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

/* ============================================================ */
/* Loading spinner (created by frontend.js)                      */
/* ============================================================ */

@keyframes plugetune-spin {
	to {
		transform: rotate(360deg);
	}
}

.plugetune-facade-spinner {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 44px;
	height: 44px;
	margin: -22px 0 0 -22px;
	border: 3px solid rgba(255, 255, 255, 0.35);
	border-top-color: #ffffff;
	border-radius: 50%;
	animation: plugetune-spin 0.8s linear infinite;
	pointer-events: none;
	z-index: 3;
}

/* ============================================================ */
/* Direct iframe wrapper (used by the shortcode's non-thumbnail   */
/* mode)                                                         */
/* ============================================================ */

.plugetune-video-wrapper {
	position: relative;
	padding-bottom: 56.25%;
	height: 0;
	overflow: hidden;
	max-width: 100%;
	background: #000;
	border-radius: 10px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.plugetune-video-wrapper iframe {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

/* ============================================================ */
/* Legacy .plugetune-container markup support                    */
/* ============================================================ */

.plugetune-video--hidden {
	display: none;
}

.plugetune-video--visible {
	display: block;
	z-index: 20;
}

.plugetune-overlay--visible {
	display: block;
}

.plugetune-overlay--hidden {
	display: none !important;
	opacity: 0 !important;
	visibility: hidden !important;
	pointer-events: none !important;
}

.plugetune-container.playing .plugetune-video--visible {
	display: block !important;
	z-index: 20 !important;
}

/* ============================================================ */
/* Responsive                                                    */
/* ============================================================ */

@media (max-width: 768px) {
	.plugetune-facade-play-btn {
		width: 65px;
		height: 65px;
	}

	.plugetune-facade-play-btn svg {
		width: 26px;
		height: 26px;
	}

	.plugetune-facade-spinner {
		width: 36px;
		height: 36px;
		margin: -18px 0 0 -18px;
		border-width: 2px;
	}
}

@media (max-width: 480px) {
	.plugetune-facade-play-btn {
		width: 55px;
		height: 55px;
	}

	.plugetune-facade-play-btn svg {
		width: 22px;
		height: 22px;
	}

	.plugetune-facade-spinner {
		width: 32px;
		height: 32px;
		margin: -16px 0 0 -16px;
	}
}