@import "style-dynamic.css";

/* Slider mode (same pattern as Team) */
.module-cinema .digifox-cinema-slider {
  width: 100%;
  overflow: hidden !important;
  position: relative;
}

.module-cinema .digifox-cinema-slider .digifox-cinema-track {
  position: relative;
  z-index: 1;
}

/* Image artwork: ratio and img styles come from style-dynamic (cinema_setting_image_crop) */
.module-cinema .digifox-cinema-slider .cinema-artwork img {
  display: block;
}

.grid-cinema {
  display: grid;
}

.cinema-description { 
/*	text-align: center;
	margin-bottom: 2.5em;*/
}


/* Icon artwork: top margin + padding (grid and slider) */
.grid-cinema .cinema-artwork:has(.fa-stack),
.module-cinema .cinema-artwork:has(.fa-stack) {
	margin-top: 1em;
	padding: 0.5em;
}

/* Image artwork: ratio and img styles from style-dynamic */
.grid-cinema .cinema-artwork img {
	display: block;
}

/* .box text-align controlled by cinema_setting_text_align (style-dynamic): center when selected, left is default */

.grid-cinema .box .cinema-title {
	margin-bottom: 0.3em;
	margin-top:  0.3em;
}

.grid-cinema .box .cinema-desc {
	margin: 0.2em 0;
}

/* Responsive oEmbed – fills container width, height scales with aspect-ratio */
.cinema-oembed-wrap {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	overflow: hidden;
}
.cinema-oembed-wrap iframe,
.cinema-oembed-wrap object,
.cinema-oembed-wrap embed {
	position: absolute;
	top: 0;
	left: 0;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
}

/* Video poster (lightbox trigger). Aspect ratio comes from style-dynamic (crop) or natural mode; 16/9 is fallback only. */
.cinema-artwork--video-poster {
	position: relative;
	aspect-ratio: 16 / 9;
	overflow: hidden;
}
.cinema-video-lightbox-trigger {
	display: block;
	position: relative;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	background: #1a1a1a;
	cursor: pointer;
	overflow: hidden;
}
/* Ensure button receives clicks; children do not capture */
.cinema-video-lightbox-trigger img,
.cinema-video-lightbox-trigger .cinema-video-play-icon,
.cinema-video-lightbox-trigger .cinema-video-poster-title {
	pointer-events: none;
}
.cinema-video-lightbox-trigger img {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	object-position: center;
	display: block;
}
.cinema-video-poster-title {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	padding: 0.5em 0.75em;
	background: linear-gradient( to bottom, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.4) 70%, transparent 100% );
	color: #fff;
	font-size: 1em;
	line-height: 1.3;
	font-weight: 600;
	text-align: left;
	z-index: 1;
}
/* Circle (setup_icon color from style-dynamic) + white triangle; when icon is very light, triangle is black. */
.cinema-video-play-icon {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 4em;
	height: 4em;
	margin: -2em 0 0 -2em;
	background: rgba(0, 0, 0, 0.8);
	border-radius: 50%;
}
.cinema-video-play-icon::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 0;
	height: 0;
	margin: -0.5em 0 0 -0.25em;
	border-style: solid;
	border-width: 0.5em 0 0.5em 0.9em;
	border-color: transparent transparent transparent #fff;
}
.cinema-video-lightbox-trigger:hover .cinema-video-play-icon,
.cinema-video-lightbox-trigger:focus .cinema-video-play-icon {
	opacity: 1;
}

/* Video lightbox */
.cinema-video-lightbox {
	position: fixed;
	inset: 0;
	z-index: 999991;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.25s ease, visibility 0.25s ease;
}
.cinema-video-lightbox[aria-hidden="false"] {
	opacity: 1;
	visibility: visible;
}
.cinema-video-lightbox__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.85);
	cursor: pointer;
}
.cinema-video-lightbox__inner {
	position: relative;
	width: 100%;
	max-width: 90vw;
	max-height: 90vh;
	aspect-ratio: 16 / 9;
	z-index: 1;
}
.cinema-video-lightbox__close {
	position: absolute;
	top: -2.5rem;
	right: 0;
	width: 2rem;
	height: 2rem;
	border: 0;
	background: transparent;
	cursor: pointer;
	z-index: 2;
	opacity: 0.9;
}
.cinema-video-lightbox__close:hover,
.cinema-video-lightbox__close:focus {
	opacity: 1;
}
.cinema-video-lightbox__close::before,
.cinema-video-lightbox__close::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 1.25rem;
	height: 2px;
	margin: -1px 0 0 -0.625rem;
	background: #fff;
	border-radius: 1px;
}
.cinema-video-lightbox__close::before {
	transform: rotate(45deg);
}
.cinema-video-lightbox__close::after {
	transform: rotate(-45deg);
}
.cinema-video-lightbox__content {
	position: relative;
	width: 100%;
	height: 100%;
	background: #000;
	border-radius: 4px;
	overflow: hidden;
}
.cinema-video-lightbox__content .cinema-oembed-wrap {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}
.cinema-video-lightbox__content .cinema-oembed-wrap iframe,
.cinema-video-lightbox__content .cinema-oembed-wrap object,
.cinema-video-lightbox__content .cinema-oembed-wrap embed {
	position: absolute;
	top: 0;
	left: 0;
	width: 100% !important;
	height: 100% !important;
}