/**
 * VideoPLAY: кнопки в теле сообщения / предпросмотре (qrabbct_listener).
 */

.qrabbct-videoplay-wrap {
	display: inline-block;
	margin: 0.4em 0.65em 0.4em 0;
	vertical-align: middle;
	max-width: 100%;
}

.qrabbct-videoplay-btn {
	display: inline-block;
	padding: 0.5em 1.15em;
	border-radius: 6px;
	font-weight: 600;
	font-size: 0.95em;
	text-align: center;
	text-decoration: none !important;
	border: 0;
	cursor: pointer;
	line-height: 1.35;
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.14);
	transition: filter 0.15s ease, transform 0.08s ease, box-shadow 0.15s ease;
	white-space: normal;
	word-break: break-word;
}

.qrabbct-videoplay-btn:hover,
.qrabbct-videoplay-btn:focus {
	filter: brightness(1.08);
	text-decoration: none !important;
	box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
	outline: none;
}

.qrabbct-videoplay-btn:active {
	transform: translateY(1px);
}

/* Rutube */
.qrabbct-videoplay-btn--rutube {
	color: #fff !important;
	background: linear-gradient(180deg, #ff9348 0%, #e85a1a 100%);
}

/* Яндекс.Диск */
.qrabbct-videoplay-btn--yandex {
	color: #fff !important;
	background: linear-gradient(180deg, #ff6a52 0%, #fc3f1e 100%);
}

/* Дзен */
.qrabbct-videoplay-btn--dzen {
	color: #fff !important;
	background: linear-gradient(180deg, #454545 0%, #1c1c1c 100%);
}

/* VK */
.qrabbct-videoplay-btn--vk {
	color: #fff !important;
	background: linear-gradient(180deg, #4aa3ff 0%, #0077ff 100%);
}

/* Одноклассники */
.qrabbct-videoplay-btn--ok {
	color: #fff !important;
	background: linear-gradient(180deg, #ffc266 0%, #ee8208 100%);
}

/* --- Модальное окно просмотра (Rutube / VK / OK) --- */

body.qrabbct-videoplay-viewer-open {
	overflow: hidden;
}

.qrabbct-video-viewer {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 100050;
	align-items: center;
	justify-content: center;
	padding: 1rem;
	box-sizing: border-box;
}

.qrabbct-video-viewer.is-open {
	display: flex;
}

.qrabbct-video-viewer__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.72);
	cursor: pointer;
}

.qrabbct-video-viewer__dialog {
	position: relative;
	z-index: 1;
	width: min(96vw, 960px);
	max-height: 92vh;
	display: flex;
	flex-direction: column;
	background: #111;
	border-radius: 10px;
	box-shadow: 0 12px 48px rgba(0, 0, 0, 0.55);
	overflow: hidden;
}

.qrabbct-video-viewer__close {
	position: absolute;
	top: 0.35rem;
	right: 0.35rem;
	z-index: 3;
	width: 2.5rem;
	height: 2.5rem;
	padding: 0;
	margin: 0;
	border: 0;
	border-radius: 6px;
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
	color: #fff;
	background: rgba(0, 0, 0, 0.55);
	transition: background 0.15s ease;
}

.qrabbct-video-viewer__close:hover,
.qrabbct-video-viewer__close:focus {
	background: rgba(255, 255, 255, 0.2);
	outline: none;
}

.qrabbct-video-viewer__ratio {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	max-height: calc(92vh - 2rem);
	background: #000;
}

.qrabbct-video-viewer__ratio iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}
