/* ===== FancyTube Features - Watch Later ===== */

/* Video list item position for button */
#spidochetube_list li {
	position: relative;
}

/* Watch Later Button */
.wpgpyt-save-btn {
	position: absolute;
	top: 8px;
	right: 8px;
	width: 32px;
	height: 32px;
	background: rgba( 0, 0, 0, 0.7 );
	border: none;
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 10;
	opacity: 0;
	transition: all 0.25s ease;
	padding: 0;
}
#spidochetube_list li:hover .wpgpyt-save-btn {
	opacity: 1;
}
.wpgpyt-save-btn svg {
	width: 18px;
	height: 18px;
	fill: none;
	stroke: #fff;
	stroke-width: 2;
	transition: all 0.25s ease;
}
.wpgpyt-save-btn:hover {
	background: rgba( 0, 0, 0, 0.9 );
	transform: scale( 1.1 );
}
.wpgpyt-save-btn.wpgpyt-saved svg {
	fill: #ffc107;
	stroke: #ffc107;
}
.wpgpyt-save-btn.wpgpyt-saved {
	opacity: 1;
}

/* Saved Videos Bar */
.wpgpyt-saved-bar {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 8px;
	margin-bottom: 12px;
	padding: 6px 0;
}
.wpgpyt-saved-count-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 16px;
	background: #fff;
	border: 1px solid #ffc107;
	color: #d39e00;
	border-radius: 6px;
	cursor: pointer;
	font-size: 14px;
	font-weight: 600;
	transition: all 0.2s ease;
}
.wpgpyt-saved-count-btn:hover {
	background: #ffc107;
	color: #fff;
}
.wpgpyt-saved-count-btn svg {
	width: 16px;
	height: 16px;
	fill: currentColor;
}

/* Toast */
.wpgpyt-toast {
	position: fixed;
	bottom: 24px;
	left: 50%;
	transform: translateX( -50% ) translateY( 100px );
	background: #212121;
	color: #fff;
	padding: 12px 24px;
	border-radius: 8px;
	font-size: 14px;
	z-index: 9999999;
	box-shadow: 0 6px 20px rgba( 0, 0, 0, 0.25 );
	opacity: 0;
	transition: all 0.35s ease;
}
.wpgpyt-toast.wpgpyt-toast-show {
	transform: translateX( -50% ) translateY( 0 );
	opacity: 1;
}


/* ===== Video Search Feature ===== */
.wpgpyt-search-bar {
	margin-bottom: 16px;
	position: relative;
}
.wpgpyt-search-input {
	width: 100%;
	padding: 12px 44px 12px 16px;
	border: 2px solid #e0e0e0;
	border-radius: 8px;
	font-size: 14px;
	transition: border-color 0.2s ease;
	box-sizing: border-box;
	outline: none;
}
.wpgpyt-search-input:focus {
	border-color: #ff0000;
}
.wpgpyt-search-icon {
	position: absolute;
	right: 14px;
	top: 50%;
	transform: translateY( -50% );
	width: 20px;
	height: 20px;
	fill: #999;
	pointer-events: none;
}
.wpgpyt-search-clear {
	position: absolute;
	right: 12px;
	top: 50%;
	transform: translateY( -50% );
	width: 24px;
	height: 24px;
	background: #ccc;
	border: none;
	border-radius: 50%;
	cursor: pointer;
	display: none;
	align-items: center;
	justify-content: center;
	font-size: 16px;
	line-height: 1;
	color: #fff;
	padding: 0;
}
.wpgpyt-search-clear:hover {
	background: #999;
}
.wpgpyt-search-bar.wpgpyt-has-text .wpgpyt-search-icon {
	display: none;
}
.wpgpyt-search-bar.wpgpyt-has-text .wpgpyt-search-clear {
	display: flex;
}

/* No results message */
.wpgpyt-no-results {
	padding: 30px 20px;
	text-align: center;
	color: #999;
	font-size: 14px;
	display: none;
}
.wpgpyt-no-results.wpgpyt-show {
	display: block;
}

/* Hidden video item */
#spidochetube_list li.wpgpyt-filtered {
	display: none !important;
}

/* ===== Sticky Player Feature ===== */
#spidochetube_player.wpgpyt-sticky {
	position: fixed;
	bottom: 20px;
	right: 20px;
	width: 380px;
	max-width: calc( 100vw - 40px );
	height: auto;
	z-index: 99999;
	box-shadow: 0 10px 40px rgba( 0, 0, 0, 0.4 );
	border-radius: 10px;
	overflow: hidden;
	animation: wpgpyt-sticky-in 0.3s ease;
	background: #000;
}
@keyframes wpgpyt-sticky-in {
	from {
		transform: translateY( 30px ) scale( 0.9 );
		opacity: 0;
	}
	to {
		transform: translateY( 0 ) scale( 1 );
		opacity: 1;
	}
}
#spidochetube_player.wpgpyt-sticky iframe {
	width: 100% !important;
	height: 214px !important;
	display: block;
}

/* Sticky player close button */
.wpgpyt-sticky-close {
	position: absolute;
	top: 8px;
	right: 8px;
	width: 30px;
	height: 30px;
	background: rgba( 0, 0, 0, 0.7 );
	border: none;
	border-radius: 50%;
	cursor: pointer;
	color: #fff;
	font-size: 20px;
	line-height: 1;
	z-index: 5;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 0;
	transition: background 0.2s;
}
.wpgpyt-sticky-close:hover {
	background: rgba( 255, 0, 0, 0.9 );
}
#spidochetube_player.wpgpyt-sticky .wpgpyt-sticky-close {
	display: flex;
}

/* Sticky label */
.wpgpyt-sticky-label {
	position: absolute;
	top: 8px;
	left: 8px;
	background: rgba( 255, 0, 0, 0.9 );
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	padding: 3px 8px;
	border-radius: 4px;
	z-index: 5;
	display: none;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}
#spidochetube_player.wpgpyt-sticky .wpgpyt-sticky-label {
	display: block;
}

/* Placeholder to prevent layout jump */
.wpgpyt-player-placeholder {
	display: none;
}
.wpgpyt-player-placeholder.wpgpyt-active {
	display: block;
}

/* Mobile: smaller sticky */
@media ( max-width: 600px ) {
	#spidochetube_player.wpgpyt-sticky {
		width: 260px;
		bottom: 12px;
		right: 12px;
	}
	#spidochetube_player.wpgpyt-sticky iframe {
		height: 146px !important;
	}
}