/**
 *  Screenshot block
 */
.bw-screenshot {
	margin-block: 20px;
	text-align: center;
}

.bw-screenshot__figure {
	max-width: 830px;
	margin: 0 auto;
}

.bw-screenshot .bw-screenshot__figure .bw-screenshot__trigger {
	position: relative;
	display: inline-block;
	width: 100%;
	aspect-ratio: 830 / 442;
	padding: 0;
	border: 0;
	background: none;
	line-height: 0;
	cursor: pointer;
	border-radius: 16px;
	overflow: hidden;
}

.bw-screenshot .bw-screenshot__figure .bw-screenshot__trigger[disabled] {
	cursor: default;
}

.bw-screenshot__picture {
	display: block;
	width: 100%;
	height: 100%;
}

.bw-screenshot__image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 16px;
}

.bw-screenshot__expand {
	position: absolute;
	top: 10px;
	right: 10px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 5px;
	color: #fafafa;
	background: #262626;
	border-radius: 8px;
	pointer-events: none;
	transition: background 0.2s ease;
}

.bw-screenshot__trigger:hover .bw-screenshot__expand,
.bw-screenshot__trigger:focus-visible .bw-screenshot__expand {
	background: #404040;
}

.bw-screenshot__expand-icon {
	display: block;
	width: 32px;
	height: 32px;
}

.bw-screenshot__caption {
	margin-top: 8px;
	font-size: 12px;
	line-height: 1.5;
}

.bw-screenshot__modal {
	width: 100%;
}

.bw-screenshot__modal.mfp-hide {
	display: none;
}

.bw-screenshot__modal-inner {
	position: relative;
	width: 100%;
	max-width: 1220px;
	margin: 0 auto;
}

.bw-screenshot__modal-header {
	margin-bottom: 12px;
}

.bw-screenshot__modal-caption {
	margin: 0;
	color: #fff;
	font-size: 22px;
	font-weight: 600;
	line-height: 1.5;
	text-align: center;
}

.bw-screenshot__close {
	position: absolute;
	top: 0px;
	right: -68px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	flex-shrink: 0;
	padding: 0;
	color: #404040;
	background: #fafafa;
	border: 0;
	border-radius: 50%;
	cursor: pointer;
	transition: background 0.2s ease;
}

.bw-screenshot__close:hover,
.bw-screenshot__close:focus-visible {
	background: #e5e5e5;
}

.bw-screenshot__close-icon {
	display: block;
	width: 20px;
	height: 20px;
}

.bw-screenshot__modal-picture {
	display: block;
	border: 1px solid #404040;
	border-radius: 16px;
	overflow: hidden;
	max-width: 1220px;
	margin: 0 auto;
}

.bw-screenshot__modal-image {
	display: block;
	width: 100%;
	aspect-ratio: 830 / 442;
	object-fit: cover;
}

.bw-screenshot__tilt {
	display: none;
	color: #9a9fac;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.5;
	text-align: left;
}

.bw-screenshot__tilt-icon {
	display: block;
	flex-shrink: 0;
	width: 33px;
	height: 51px;
}

.bw-screenshot__tilt--has-mobile {
	display: none;
}

@media (max-width: 1023px) {
	.bw-screenshot__tilt {
		display: flex;
		gap: 12px;
		align-items: center;
		justify-content: center;
	}

	.bw-screenshot__tilt--has-mobile {
		display: none;
	}
}

@media screen and (min-width: 767px) and (max-width: 1023px) {
	.bw-screenshot__tilt {
		display: flex;
	}
	
	.bw-screenshot__tilt--has-mobile {
		display: flex;
	}
}

@media (orientation: landscape) {
	.bw-screenshot__tilt {
		display: none;
	}
}

.bw-screenshot-popup.mfp-bg {
	z-index: 10000;
	opacity: 0;
	background: #262626;
	transition: opacity 0.3s ease;
}

.bw-screenshot-popup.mfp-wrap {
	z-index: 10001;
}

.bw-screenshot-popup.mfp-bg.mfp-ready {
	opacity: 1;
}

.bw-screenshot-popup.mfp-bg.mfp-removing {
	opacity: 0;
}

.bw-screenshot-popup .mfp-container {
	padding: 40px 80px;
	overflow-y: auto;
}

body.admin-bar .bw-screenshot-popup .mfp-container {
	top: 32px;
	height: calc(100% - 32px);
}

.bw-screenshot-popup .mfp-content {
	width: 100%;
	opacity: 0;
	transition: opacity 0.3s ease;
}

.bw-screenshot-popup.mfp-ready .mfp-content {
	opacity: 1;
}

.bw-screenshot-popup.mfp-removing .mfp-content {
	opacity: 0;
}

.bw-screenshot-modal-opened {
	overflow: hidden;
}

@media (max-width: 1023px) {
	.bw-screenshot__close {
		position: static;
		margin-left: auto;
		margin-bottom: 32px;
	}

	.bw-screenshot-popup .mfp-container {
		display: flex;
		flex-direction: column;
		padding: 40px;
	}

	.bw-screenshot-popup .mfp-container:before {
		display: none;
	}

	.bw-screenshot__modal-caption {
		font-size: 16px;
	}

	.bw-screenshot-popup .mfp-content,
	.bw-screenshot__modal,
	.bw-screenshot__modal-inner {
		display: flex;
		flex-direction: column;
		flex: 1 0 auto;
	}

	.bw-screenshot__modal-header {
		max-width: 830px;
		margin-inline: auto;
	}

	.bw-screenshot__modal-picture {
		flex-shrink: 0;
		max-width: 830px;
	}

	.bw-screenshot__expand {
		padding: 4px;
	}

	.bw-screenshot__expand-icon {
		width: 26px;
		height: 26px;
	}

	.bw-screenshot__tilt {
		margin-top: auto;
		padding-top: 24px;
	}
}

@media (max-width: 782px) {
	body.admin-bar .bw-screenshot-popup .mfp-container {
		top: 46px;
		height: calc(100% - 46px);
	}
}

@media (max-width: 767px) {
	.bw-screenshot__modal-header {
		padding-inline: initial;
	}

	.bw-screenshot .bw-screenshot__figure .bw-screenshot__trigger--has-mobile {
		width: 162px;
		margin-inline: auto;
		aspect-ratio: 162/350;
		border-radius: 4px;
	}

	.bw-screenshot .bw-screenshot__figure .bw-screenshot__trigger--has-mobile .bw-screenshot__image {
		border-radius: 4px;
	}

	.bw-screenshot__modal-image--has-mobile {
		width: 100%;
		max-width: 100%;
		aspect-ratio: auto;
	}

	.bw-screenshot-popup .mfp-container {
		padding: 20px;
	}

	.bw-screenshot-popup .mfp-container:has(.bw-screenshot__modal-image--has-mobile) .bw-screenshot__modal-picture {
		max-width: 352px;
		border-radius: 8px;
	}

	.bw-screenshot-popup .mfp-container:has(.bw-screenshot__modal-image--has-mobile) .bw-screenshot__close {
		margin-bottom: 37px;
	}
}
