/**
 * Video Shortcode Styles
 * Adapted to match existing th-tiervideo shortcode structure
 *
 * @package Tierheim_Design
 * @since 2.0.0
 */

/* Video Container - matches existing tier-video structure */
.tier-video.et_pb_video {
	position: relative;
	width: 100%;
	max-width: 100%;
	margin: 0 auto;
	border-radius: 0;
	overflow: hidden;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Video Box */
.et_pb_video_box {
	position: relative;
	width: 100%;
}

/* Fluid Width Video Wrapper - adjusted for 1160x720 aspect ratio */
.fluid-width-video-wrapper {
	position: relative;
	width: 100%;
	height: 0;
	padding-top: 62.068965%; /* 720/1160 = 0.62068965 (16:10.33 aspect ratio) */
}

.fluid-width-video-wrapper iframe {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border: none;
	border-radius: 0px;
}

/* Video Overlay - matches existing et_pb_video_overlay */
.et_pb_video_overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	cursor: pointer;
	transition: all 0.3s ease;
	border-radius: 0;
	z-index: 10;
	/* Touch-friendly */
	-webkit-tap-highlight-color: transparent;
	touch-action: manipulation;
}

.et_pb_video_overlay:hover {
	transform: scale(1.01);
}

.et_pb_video_overlay.hidden {
	opacity: 0;
	pointer-events: none;
	transform: scale(0.95);
	z-index: 1;
}

/* Overlay Hover - only visual effects */
.et_pb_video_overlay_hover {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.4);
	transition: background 0.3s ease;
}

.et_pb_video_overlay:hover .et_pb_video_overlay_hover {
	background: rgba(0, 0, 0, 0.35);
}

/* Play Button - matches existing et_pb_video_play */
.et_pb_video_play {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 6rem;
    height: 6rem;
    background: rgba(255, 255, 255, 0.23);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    top: auto;
    left: auto;
    margin-left: 0 !important;
    margin-top: 0 !important;
	-webkit-border-radius: 100%;
	border-radius: 100%;
	/* Touch-friendly */
	-webkit-tap-highlight-color: transparent;
	touch-action: manipulation;
	cursor: pointer;
}
.et_pb_video_play:before {
	content:"";
	background-image: url(../images/circle-play-regular-full.svg);
	background-size: contain;
	background-repeat: no-repeat;
	background-position: center;
	width: 100%;
	height: 100%;
}

/* Error Messages */
.th-video-error {
	color: #d63638;
	background: #fcf0f1;
	padding: 12px;
	border: 1px solid #d63638;
	border-radius: 4px;
	margin: 10px 0;
	font-size: 14px;
}

/* Responsive Design - matches Divi breakpoints */
@media only screen and (max-width: 1024px) {
	.tier-video.et_pb_video {
		max-width: 100%;
	}
	
	.et_pb_video_play {
		width: 70px;
		height: 70px;
	}
}

@media only screen and (max-width: 980px) {
	.tier-video.et_pb_video {
		max-width: 100%;
	}
	
	.et_pb_video_play {
		width: 65px;
		height: 65px;
	}
}

@media only screen and (max-width: 768px) {
	.tier-video.et_pb_video {
		max-width: 100%;
	}
	
	.et_pb_video_play {
		width: 60px;
		height: 60px;
	}
}

@media only screen and (max-width: 600px) {
	.tier-video.et_pb_video {
		max-width: 100%;
	}
	
	.et_pb_video_play {
		width: 50px;
		height: 50px;
	}
}

/* Loading State */
.tier-video.et_pb_video.loading .et_pb_video_overlay {
	opacity: 0.7;
}

.tier-video.et_pb_video.loading .et_pb_video_play {
	opacity: 0.5;
}

/* Focus States for Accessibility */
.et_pb_video_play:focus {
	outline: 2px solid #0073aa;
	outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
	.et_pb_video_play {
		background: #000;
		border: 2px solid #fff;
	}
	
	.et_pb_video_overlay_hover {
		background: rgba(0, 0, 0, 0.6);
	}
}
