/**
 * YouTube 2-Klick Plugin Styles
 *
 * @package YT2Click
 * @version 1.0.0
 */

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

.yt2click-container {
	position: relative;
	width: 100%;
	margin: 1rem 0;
}

.yt2click-wrapper {
	position: relative;
	width: 100%;
	height: 0;
	padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
	background-color: #000;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* ==========================================================================
   Overlay
   ========================================================================== */

.yt2click-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	z-index: 10;
}

.yt2click-thumbnail {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	filter: brightness(0.7);
	transition: filter 0.3s ease;
}

.yt2click-overlay:hover .yt2click-thumbnail {
	filter: brightness(0.5);
}

/* ==========================================================================
   Content Box
   ========================================================================== */

.yt2click-content {
	position: relative;
	z-index: 2;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	padding: 1.5rem;
	max-width: 90%;
}

/* Play Icon */
.yt2click-play-icon {
	margin-bottom: 1rem;
	transition: transform 0.2s ease, opacity 0.2s ease;
	opacity: 0.9;
}

.yt2click-overlay:hover .yt2click-play-icon {
	transform: scale(1.1);
	opacity: 1;
}

.yt2click-play-icon svg {
	filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.yt2click-play-bg {
	transition: fill 0.2s ease;
}

.yt2click-overlay:hover .yt2click-play-bg {
	fill: #ff0000;
	fill-opacity: 1;
}

/* Info Box */
.yt2click-info {
	background-color: rgba(0, 0, 0, 0.85);
	padding: 1.25rem 1.5rem;
	border-radius: 8px;
	backdrop-filter: blur(4px);
	max-width: 500px;
}

.yt2click-info h3 {
	margin: 0 0 0.5rem 0;
	color: #ffffff;
	font-size: 1.125rem;
	font-weight: 600;
	line-height: 1.3;
}

.yt2click-info p {
	margin: 0 0 1rem 0;
	color: rgba(255, 255, 255, 0.85);
	font-size: 0.875rem;
	line-height: 1.5;
}

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

.yt2click-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background-color: #ff0000;
	color: #ffffff;
	border: none;
	padding: 0.75rem 1.5rem;
	font-size: 0.9375rem;
	font-weight: 600;
	border-radius: 4px;
	cursor: pointer;
	transition: background-color 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
	text-decoration: none;
	line-height: 1;
}

.yt2click-button:hover {
	background-color: #cc0000;
	transform: translateY(-1px);
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.yt2click-button:active {
	transform: translateY(0);
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.yt2click-button:focus {
	outline: 2px solid #ffffff;
	outline-offset: 2px;
}

.yt2click-button:disabled {
	opacity: 0.7;
	cursor: not-allowed;
}

/* ==========================================================================
   Privacy Link
   ========================================================================== */

.yt2click-privacy {
	margin: 0.75rem 0 0 0 !important;
	font-size: 0.75rem !important;
	color: rgba(255, 255, 255, 0.7) !important;
}

.yt2click-privacy a {
	color: rgba(255, 255, 255, 0.85);
	text-decoration: none;
	transition: color 0.2s ease;
}

.yt2click-privacy a:hover {
	color: #ffffff;
	text-decoration: underline;
}

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

.yt2click-video {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
}

.yt2click-video iframe {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

/* ==========================================================================
   Loading Spinner
   ========================================================================== */

.yt2click-spinner {
	display: inline-block;
	width: 16px;
	height: 16px;
	margin-left: 8px;
	border: 2px solid rgba(255, 255, 255, 0.3);
	border-radius: 50%;
	border-top-color: #ffffff;
	animation: yt2click-spin 0.8s linear infinite;
	vertical-align: middle;
}

@keyframes yt2click-spin {
	to {
		transform: rotate(360deg);
	}
}

/* ==========================================================================
   Error Message
   ========================================================================== */

.yt2click-error {
	background-color: #f8d7da;
	color: #721c24;
	padding: 1rem 1.25rem;
	border: 1px solid #f5c6cb;
	border-radius: 4px;
	margin: 1rem 0;
	font-size: 0.875rem;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 576px) {
	.yt2click-info {
		padding: 1rem;
	}

	.yt2click-info h3 {
		font-size: 1rem;
	}

	.yt2click-info p {
		font-size: 0.8125rem;
	}

	.yt2click-button {
		padding: 0.625rem 1.25rem;
		font-size: 0.875rem;
	}

	.yt2click-play-icon svg {
		width: 54px;
		height: 38px;
	}
}

@media (max-width: 400px) {
	.yt2click-content {
		padding: 1rem;
	}

	.yt2click-info h3 {
		font-size: 0.9375rem;
	}

	.yt2click-play-icon {
		margin-bottom: 0.75rem;
	}

	.yt2click-play-icon svg {
		width: 48px;
		height: 34px;
	}
}

/* ==========================================================================
   Dark Mode Support
   ========================================================================== */

@media (prefers-color-scheme: dark) {
	.yt2click-error {
		background-color: #2c1215;
		color: #f8d7da;
		border-color: #5c2328;
	}
}

/* ==========================================================================
   Reduced Motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
	.yt2click-thumbnail,
	.yt2click-play-icon,
	.yt2click-button,
	.yt2click-play-bg {
		transition: none;
	}

	.yt2click-spinner {
		animation: none;
	}

	.yt2click-overlay:hover .yt2click-play-icon {
		transform: none;
	}

	.yt2click-button:hover {
		transform: none;
	}
}

/* ==========================================================================
   High Contrast Mode
   ========================================================================== */

@media (forced-colors: active) {
	.yt2click-button {
		border: 2px solid currentColor;
	}

	.yt2click-info {
		border: 1px solid currentColor;
	}
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
	.yt2click-container {
		break-inside: avoid;
	}

	.yt2click-overlay {
		display: block;
	}

	.yt2click-thumbnail {
		filter: none;
	}

	.yt2click-content {
		display: none;
	}

	.yt2click-video {
		display: none;
	}
}
