/* ==========================================================================
   DESERT TO GLOBAL (D2G) - CUSTOM BRANDED VIDEO PLAYER SKIN (PLYR)
   Theme Palette:
     - Desert Night: #0B3D36 (Deep rich emerald background & controls)
     - Desert Gold:  #C89B5B (Primary accents, play buttons, progress bar)
     - Desert Sand:  #EADCC8 (Borders, volume rails, subtle timestamps)
     - Desert Oasis: #5F7F6E (Secondary accents & tooltips)
     - Desert Cloud: #F8F7F4 (Clean modern text)
   ========================================================================== */

.d2g-video-widget {
	width: 100%;
	position: relative;
	box-sizing: border-box;
	clear: both;
}

/* Optional Section Title & Description */
.d2g-video-header {
	margin-bottom: 1.5rem;
}

.d2g-video-title {
	font-family: 'Playfair Display', Georgia, serif;
	font-weight: 700;
	font-size: 1.875rem; /* 30px */
	line-height: 1.33;
	color: #0B3D36;
	margin: 0 0 0.5rem 0;
	letter-spacing: -0.015em;
}

.d2g-video-description {
	font-family: 'Inter', sans-serif;
	font-size: 1.125rem; /* 18px */
	line-height: 1.77;
	color: #0B3D36;
	margin: 0;
}

/* Outer Card Container - ALWAYS enforce aspect ratio so it never collapses into a strip */
.d2g-video-card {
	position: relative;
	width: 100%;
	overflow: hidden;
	border-radius: 0.75rem; /* 12px */
	border: 2px solid #EADCC8;
	box-shadow: 0 20px 25px -5px rgba(11, 61, 54, 0.1), 0 8px 10px -6px rgba(11, 61, 54, 0.1);
	background-color: #0B3D36;
	aspect-ratio: 16 / 9;
	transition: border-color 0.3s ease, box-shadow 0.3s ease;
	box-sizing: border-box;
}

.d2g-video-card:hover {
	border-color: #C89B5B;
	box-shadow: 0 25px 30px -5px rgba(11, 61, 54, 0.16), 0 10px 12px -6px rgba(11, 61, 54, 0.12);
}

/* Aspect ratio classes */
.d2g-video-card.d2g-video-aspect-16-9 { aspect-ratio: 16 / 9; }
.d2g-video-card.d2g-video-aspect-21-9 { aspect-ratio: 21 / 9; }
.d2g-video-card.d2g-video-aspect-4-3  { aspect-ratio: 4 / 3; }
.d2g-video-card.d2g-video-aspect-1-1  { aspect-ratio: 1 / 1; }
.d2g-video-card.d2g-video-aspect-9-16 { aspect-ratio: 9 / 16; }

/* Ensure embed containers, iframes, and videos fill the card completely */
.d2g-video-card .plyr,
.d2g-video-card .plyr__video-embed,
.d2g-video-card iframe,
.d2g-video-card video {
	position: absolute;
	top: 0;
	left: 0;
	width: 100% !important;
	height: 100% !important;
	border: 0;
	outline: none;
}

.d2g-video-card .plyr__video-wrapper {
	width: 100% !important;
	height: 100% !important;
}

/* --------------------------------------------------------------------------
   PLYR THEME OVERRIDES (Desert To Global Branding)
   -------------------------------------------------------------------------- */
:root {
	--plyr-color-main: #C89B5B;
	--plyr-video-control-color: #F8F7F4;
	--plyr-video-control-color-hover: #ffffff;
	--plyr-video-control-background-hover: rgba(11, 61, 54, 0.85);
	--plyr-range-track-height: 4px;
	--plyr-range-thumb-height: 14px;
	--plyr-range-thumb-background: #C89B5B;
	--plyr-range-thumb-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
	--plyr-video-controls-background: linear-gradient(rgba(0, 0, 0, 0), rgba(11, 61, 54, 0.95));
	--plyr-font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
	--plyr-control-radius: 4px;
}

.d2g-video-card .plyr--video {
	border-radius: 0.75rem;
	overflow: hidden;
}

/* Big Play Button Overlay in center */
.d2g-video-card .plyr__control--overlaid {
	position: absolute !important;
	top: 50% !important;
	left: 50% !important;
	transform: translate(-50%, -50%) scale(1) !important;
	background: rgba(200, 155, 91, 0.9) !important; /* Desert Gold */
	color: #ffffff !important;
	border: 2px solid rgba(255, 255, 255, 0.6) !important;
	border-radius: 50% !important;
	width: 68px !important;
	height: 68px !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	padding: 0 !important;
	box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.4), 0 0 0 8px rgba(200, 155, 91, 0.25) !important;
	transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, color 0.25s ease !important;
	cursor: pointer !important;
	z-index: 5 !important;
}

.d2g-video-card .plyr__control--overlaid:hover,
.d2g-video-card .plyr__control--overlaid:focus {
	background: #0B3D36 !important; /* Desert Night */
	color: #C89B5B !important; /* Desert Gold icon */
	border-color: #C89B5B !important;
	transform: translate(-50%, -50%) scale(1.12) !important; /* Retain center position and smoothly enlarge */
	box-shadow: 0 15px 35px rgba(11, 61, 54, 0.6), 0 0 0 12px rgba(200, 155, 91, 0.35) !important;
}

.d2g-video-card .plyr__control--overlaid svg {
	width: 26px !important;
	height: 26px !important;
	fill: currentColor !important;
	margin-left: 3px !important; /* Optically centers the triangle inside the circle */
	transition: fill 0.25s ease !important;
}

/* Bottom Controls Bar */
.d2g-video-card .plyr__controls {
	background: linear-gradient(180deg, rgba(11, 61, 54, 0) 0%, rgba(11, 61, 54, 0.92) 50%, #0B3D36 100%) !important;
	padding: 1rem 1.25rem 0.85rem !important;
	border-bottom-left-radius: 0.75rem;
	border-bottom-right-radius: 0.75rem;
}

/* Small Control Buttons */
.d2g-video-card .plyr__controls button.plyr__control {
	color: #F8F7F4 !important;
	transition: color 0.2s ease, background-color 0.2s ease;
}

.d2g-video-card .plyr__controls button.plyr__control:hover {
	color: #C89B5B !important;
	background: rgba(200, 155, 91, 0.15) !important;
}

/* Timestamps */
.d2g-video-card .plyr__time {
	font-family: 'Montserrat', sans-serif !important;
	font-weight: 600 !important;
	font-size: 0.75rem !important;
	letter-spacing: 0.05em !important;
	color: #EADCC8 !important;
}

/* Progress and Volume Sliders */
.d2g-video-card .plyr--full-ui input[type="range"] {
	color: #C89B5B !important;
}

.d2g-video-card .plyr--full-ui input[type="range"]::-webkit-slider-thumb {
	background: #C89B5B !important;
	box-shadow: 0 0 0 2px #0B3D36, 0 2px 6px rgba(0, 0, 0, 0.4) !important;
}

/* Tooltips */
.d2g-video-card .plyr__tooltip {
	background: #0B3D36 !important;
	color: #C89B5B !important;
	border: 1px solid #C89B5B !important;
	font-family: 'Montserrat', sans-serif !important;
	font-size: 0.75rem !important;
	font-weight: 600 !important;
	border-radius: 4px !important;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3) !important;
}

/* Elementor Editor Placeholder Notice */
.d2g-video-placeholder-notice {
	display: flex;
	align-items: center;
	gap: 1.25rem;
	padding: 1.5rem 2rem;
	background: #0B3D36;
	border: 2px dashed #C89B5B;
	border-radius: 0.75rem;
	color: #F8F7F4;
	box-sizing: border-box;
}

.d2g-video-placeholder-icon {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: rgba(200, 155, 91, 0.2);
	color: #C89B5B;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.5rem;
	flex-shrink: 0;
}

.d2g-video-placeholder-text {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
}

.d2g-video-placeholder-text strong {
	font-family: 'Montserrat', sans-serif;
	font-size: 1rem;
	color: #C89B5B;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

.d2g-video-placeholder-text span {
	font-family: 'Inter', sans-serif;
	font-size: 0.875rem;
	color: #EADCC8;
	line-height: 1.5;
}
