/**
 * FV Rutube Player — frontend styles.
 * Author: Фёдор Васильев — FV Tools (https://fvtools.ru)
 */

.fvrutube-player {
	position: relative;
	width: 100%;
	margin: 16px auto;
	overflow: hidden;
	background: #000;
}

.fvrutube-poster {
	position: relative;
	width: 100%;
	height: 0;
	cursor: pointer;
	background: #0d0d0d;
	overflow: hidden;
}

.fvrutube-thumb {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform .3s ease, filter .3s ease;
}

.fvrutube-poster:hover .fvrutube-thumb {
	transform: scale(1.03);
	filter: brightness(.85);
}

/* Play button */
.fvrutube-play {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 72px;
	height: 50px;
	border: none;
	border-radius: 12px;
	background: #ff0000;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: .92;
	transition: transform .2s ease, opacity .2s ease;
	box-shadow: 0 4px 14px rgba(0, 0, 0, .4);
}

.fvrutube-poster:hover .fvrutube-play {
	transform: translate(-50%, -50%) scale(1.08);
	opacity: 1;
}

.fvrutube-play-icon {
	display: block;
	width: 0;
	height: 0;
	margin-left: 4px;
	border-top: 11px solid transparent;
	border-bottom: 11px solid transparent;
	border-left: 18px solid #fff;
}

.fvrutube-poster.is-playing {
	cursor: default;
	height: 0;
}

.fvrutube-inline-frame {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

/* Modal overlay */
.fvrutube-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, .82);
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	box-sizing: border-box;
	animation: fvrutubeFade .18s ease;
}

@keyframes fvrutubeFade {
	from { opacity: 0; }
	to   { opacity: 1; }
}

.fvrutube-modal {
	position: relative;
	background: #000;
	border-radius: 10px;
	overflow: visible;
	box-shadow: 0 12px 48px rgba(0, 0, 0, .6);
	animation: fvrutubePop .2s ease;
}

@keyframes fvrutubePop {
	from { transform: scale(.96); opacity: 0; }
	to   { transform: scale(1);   opacity: 1; }
}

.fvrutube-modal-frame {
	position: relative;
	width: 100%;
	height: 0;
	border-radius: 10px;
	overflow: hidden;
}

.fvrutube-modal-frame iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.fvrutube-close {
	position: absolute;
	top: -20px;
	right: -20px;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: none;
	background: #fff;
	color: #111;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 2px 10px rgba(0, 0, 0, .4);
	transition: transform .15s ease, background .15s ease;
	z-index: 2;
}

.fvrutube-close:hover {
	transform: scale(1.1);
	background: #f1f1f1;
}

@media (max-width: 600px) {
	.fvrutube-close {
		top: -17px;
		right: -17px;
		width: 34px;
		height: 34px;
		font-size: 22px;
	}
}

/* Custom Play-button icon (uploaded via settings) */
.fvrutube-play--icon {
	background: transparent !important;
	box-shadow: none;
	width: auto;
	height: auto;
	padding: 0;
	border-radius: 0;
	opacity: 1;
}

.fvrutube-play-img {
	display: block;
	width: 76px;
	height: 76px;
	object-fit: contain;
	pointer-events: none;
	filter: drop-shadow(0 4px 14px rgba(0, 0, 0, .45));
}

.fvrutube-poster:hover .fvrutube-play--icon {
	transform: translate(-50%, -50%) scale(1.08);
}

/* Defensive: keep our boxes intact regardless of template CSS resets */
.fvrutube-player,
.fvrutube-player * {
	box-sizing: border-box;
}

.fvrutube-thumb {
	max-width: none;
}
