/* Основные форматы видео */
.videoFormat-classic {
	position: relative;
	width: 100%;
	height: 0;
	padding-bottom: 56.25%;
	background-color: #000;
}

.videoFormat-shorts {
	--shorts_width: 210px;
	padding-bottom: calc(var(--shorts_width) * 1.77);
	border-radius: 0.75rem;
	overflow: hidden;
	max-width: var(--shorts_width);
}

/* Компоненты видео */
.video__link {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
}

.video__media {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border: none;
	object-fit: cover;
}

.video__button {
	position: absolute;
	top: 50%;
	left: 50%;
	z-index: 1;
	display: none;
	padding: 0;
	width: 13%;
	max-width: 68px;
	height: 17%;
	max-height: 48px;
	border: none;
	background-color: transparent;
	transform: translate(-50%, -50%);
	cursor: pointer;
}

.video__button-shape {
	fill: #212121;
	fill-opacity: .8;
}

.video__button-icon {
	fill: #fff;
}

.video__button:focus {
	outline: none;
}

/* Интерактивные состояния */
[data-gvd="inline"]:hover .video__button-shape,
[data-gvd="modal"]:hover .video__button-shape,
.video__button:focus .video__button-shape {
	fill: red;
	fill-opacity: 1;
}

.video--enabled {
	cursor: pointer;
}

.video--enabled .video__button {
	display: block;
}

/* Модальное окно */
.gvd__modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 100000;
}

.gvd__modal::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.6);
	backdrop-filter: blur(3px);
}

.gvd__wrap {
	position: relative;
	max-height: 90vh;
	aspect-ratio: 16 / 9;
	width: 90vw;
}

.gvd__iframe {
	width: 100%;
	height: 100%;
	border: none;
	position: relative;
	z-index: 11;
	background: rgb(0 0 0 / 80%);
}

/* Загрузчик */
.gvd__loader {
	position: absolute;
	width: 100%;
	height: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	z-index: 12;
}

.gvd__loader::before {
	content: "";
	width: 2rem;
	height: 2rem;
	border: 4px solid transparent;
	border-top: 4px solid #fff;
	border-radius: 50%;
	animation: spin 0.6s linear infinite;
	margin-bottom: 1rem;
}

.gvd__loading-message {
	color: #fff;
	font-size: 1rem;
	text-align: center;
}

.gvd__iframe-loaded .gvd__loader {
	display: none;
}

/* Кнопка закрытия модального окна */
.gvd__close {
	position: absolute;
	top: -3.5rem;
	right: 0;
	background: transparent;
	border: none;
	cursor: pointer;
	transition: all .3s ease;
	display: flex;
	justify-content: center;
	align-items: center;
	padding: 0.5rem;
	background: rgb(0 0 0 / 20%);
}

.gvd__close:hover {
	background: var(--dark, #000);
}

.gvd__close svg {
	width: 2.5rem;
	height: 2.5rem;
	stroke: #fff;
	stroke-width: 2;
	fill: none;
}

@keyframes spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}