/**
 * SED Elementor Vertical Video – Frontend Styles
 *
 * Default styling is based on the dark-card design reference.
 * All values can be overridden via Elementor's Style tab.
 *
 * @package SED_Elementor_Vertical_Video
 * @version 1.0.0
 */

/* ==========================================================================
   Container
   ========================================================================== */

.sed-vv-container {
	position: relative;
	overflow: hidden;
	border-radius: 16px;
	background-color: #0f172a;
	cursor: pointer;
	user-select: none;
	-webkit-user-select: none;
	outline: none;
}

/* Aspect Ratios via padding-bottom (broad support) */
.sed-vv-container::before {
	content: "";
	display: block;
	width: 100%;
}

.sed-vv-ratio-1x1::before {
	padding-bottom: 100%;
}

.sed-vv-ratio-4x5::before {
	padding-bottom: 125%;
}

.sed-vv-ratio-9x16::before {
	padding-bottom: 177.78%;
}

.sed-vv-ratio-16x9::before {
	padding-bottom: 56.25%;
}

.sed-vv-ratio-3x4::before {
	padding-bottom: 133.33%;
}

/* ==========================================================================
   Video
   ========================================================================== */

.sed-vv-video {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	z-index: 1;
}

/* ==========================================================================
   Cover Image
   ========================================================================== */

.sed-vv-cover {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 2;
	transition: opacity 0.5s ease, visibility 0.5s ease;
}

.sed-vv-cover img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Hide cover when playing */
.sed-vv-container.is-playing .sed-vv-cover {
	opacity: 0;
	visibility: hidden;
}

/* ==========================================================================
   Pause Overlay (shown on hover while playing)
   ========================================================================== */

.sed-vv-pause-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 4;
	display: flex;
	align-items: center;
	justify-content: center;
	background-color: rgba(0, 0, 0, 0.4);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.25s ease;
}

.sed-vv-pause-overlay svg {
	width: 48px;
	height: 48px;
	fill: rgba(255, 255, 255, 0.9);
}

/* Show on hover only while playing */
.sed-vv-container.is-playing:hover .sed-vv-pause-overlay {
	opacity: 1;
}

/* ==========================================================================
   Floating Wrapper
   ========================================================================== */

.sed-vv-floating-wrapper {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 3;
	padding: 40px 20px 20px 20px;
	background: linear-gradient(0deg, rgba(15, 23, 42, 0.85) 0%, rgba(15, 23, 42, 0) 100%);
	transition: opacity 0.4s ease, visibility 0.4s ease;
}

/* Fade out while playing */
.sed-vv-container.is-playing .sed-vv-floating-wrapper {
	opacity: 0;
	visibility: hidden;
}

/* Fade back in when paused */
.sed-vv-container.is-paused .sed-vv-floating-wrapper {
	opacity: 1;
	visibility: visible;
}

/* ==========================================================================
   Category Tag
   ========================================================================== */

.sed-vv-category {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 6px 14px;
	margin-bottom: 12px;
	border-radius: 20px;
	background-color: rgba(255, 255, 255, 0.15);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	transition: background-color 0.2s ease;
}

.sed-vv-category-bullet {
	display: inline-block;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background-color: #ffffff;
	flex-shrink: 0;
}

.sed-vv-category-text {
	font-size: 13px;
	font-weight: 500;
	line-height: 1.3;
	color: #ffffff;
	letter-spacing: 0.02em;
}

/* ==========================================================================
   Title Row (text + play button side by side)
   ========================================================================== */

.sed-vv-title-row {
	display: flex;
	align-items: flex-end;
	gap: 12px;
}

.sed-vv-text-col {
	flex: 1;
	min-width: 0;
}

/* ==========================================================================
   Title
   ========================================================================== */

.sed-vv-title {
	margin: 0 0 4px 0;
	padding: 0;
	font-size: 24px;
	font-weight: 700;
	line-height: 1.2;
	color: #ffffff;
}

/* ==========================================================================
   Intro Text
   ========================================================================== */

.sed-vv-intro {
	margin: 0;
	padding: 0;
	font-size: 15px;
	font-weight: 400;
	line-height: 1.45;
	color: rgba(255, 255, 255, 0.85);
}

/* ==========================================================================
   Play Button
   ========================================================================== */

.sed-vv-play-btn {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background-color: rgba(255, 255, 255, 0.15);
	border: 2px solid rgba(255, 255, 255, 0.3);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.sed-vv-play-btn:hover {
	transform: scale(1.08);
}

.sed-vv-play-btn svg {
	width: 18px;
	height: 18px;
	fill: #ffffff;
	/* Slight offset to visually center the play triangle */
	margin-left: 2px;
}

/* ==========================================================================
   Timeline (progress bar at bottom)
   ========================================================================== */

.sed-vv-timeline {
	position: absolute;
	bottom: 0;
	left: 0;
	width: 100%;
	height: 3px;
	z-index: 5;
	background-color: rgba(255, 255, 255, 0.25);
	opacity: 0;
	transition: opacity 0.3s ease;
}

/* Show timeline while playing */
.sed-vv-container.is-playing .sed-vv-timeline,
.sed-vv-container.is-paused .sed-vv-timeline {
	opacity: 1;
}

.sed-vv-timeline-progress {
	height: 100%;
	width: 0%;
	background-color: rgba(255, 255, 255, 0.85);
	transition: width 0.1s linear;
}

/* ==========================================================================
   Focus / Accessibility
   ========================================================================== */

.sed-vv-container:focus-visible {
	outline: 2px solid #3b82f6;
	outline-offset: 2px;
}

/* ==========================================================================
   Elementor Editor – always show overlay in editor for easier editing
   ========================================================================== */

.elementor-editor-active .sed-vv-floating-wrapper {
	opacity: 1 !important;
	visibility: visible !important;
}

.elementor-editor-active .sed-vv-container {
	cursor: default;
}
