/* ==========================================================================
   shopshorts Video Bubble (floating welcome video)
   ========================================================================== */

.shs-bubble {
	--shs-bubble-size: 160px;
	--shs-bubble-accent: #7432ff;
	position: fixed;
	bottom: 100px;
	right: 24px;
	width: var(--shs-bubble-size);
	height: var(--shs-bubble-size);
	border-radius: 50%;
	z-index: 99990;
	cursor: pointer;
	transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1),
		height 0.35s cubic-bezier(0.16, 1, 0.3, 1),
		border-radius 0.35s ease,
		transform 0.3s ease;
	transform-origin: bottom right;
}

.shs-bubble.is-shrunk {
	transform: scale(0.72);
}

.shs-bubble-video,
.shs-bubble-thumb {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100% !important;
	max-height: none !important;
	border-radius: inherit;
	object-fit: cover;
	background: #000;
	display: block;
}

.shs-bubble-video {
	border: 2px solid var(--shs-bubble-accent);
}

.shs-bubble-thumb {
	display: none;
	border: 2px solid var(--shs-bubble-accent);
	filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.3));
}

/* When a poster/GIF is set, show it instead of the video in the bubble. */
.shs-bubble-has-thumb .shs-bubble-video {
	display: none;
}

.shs-bubble-has-thumb .shs-bubble-thumb {
	display: block;
}

/* Expanded state: always show the video, hide the thumb. */
.shs-bubble.is-expanded .shs-bubble-video {
	display: block;
	border: none;
}

.shs-bubble.is-expanded .shs-bubble-thumb {
	display: none;
}

.shs-bubble-overlay {
	position: absolute;
	inset: 0;
	border-radius: inherit;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 12px;
	color: #fff;
	font-size: 20px;
	font-weight: 700;
	line-height: 1.25;
	text-align: center;
	text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
	pointer-events: none;
}

.shs-bubble-close {
	position: absolute;
	top: -4px;
	right: 6px;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	border: none;
	background: rgba(15, 15, 20, 0.65);
	color: #fff;
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
	opacity: 0;
	transition: opacity 0.2s ease;
	z-index: 2;
}

.shs-bubble:hover .shs-bubble-close {
	opacity: 1;
}

.shs-bubble-controls {
	position: absolute;
	inset: 0;
	display: none;
	border-radius: inherit;
	z-index: 3;
}

.shs-bubble.is-expanded .shs-bubble-controls {
	display: block;
}

.shs-bubble-btn {
	position: absolute;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: none;
	background: rgba(15, 15, 20, 0.45);
	color: #fff;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	transition: background 0.2s ease, transform 0.15s ease, opacity 0.2s ease;
}

.shs-bubble-btn:hover {
	background: rgba(15, 15, 20, 0.7);
}

.shs-bubble-btn:active {
	transform: scale(0.92);
}

.shs-bubble-minimize {
	top: 8px;
	right: 8px;
}

.shs-bubble-play {
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 58px;
	height: 58px;
	font-size: 28px;
	background: rgba(15, 15, 20, 0.4);
}

.shs-bubble-play.is-hidden {
	opacity: 0;
	pointer-events: none;
}

.shs-bubble-replay {
	top: 8px;
	left: 52px;
}

.shs-bubble-mute,
.shs-bubble-unmute {
	top: 8px;
	left: 8px;
}

.shs-bubble-fullscreen {
	bottom: 16px;
	right: 8px;
}

/* --- Expanded state --- */
.shs-bubble.is-expanded {
	width: 300px;
	height: 520px;
	border-radius: 18px;
	cursor: default;
}

.shs-bubble.is-expanded .shs-bubble-overlay {
	display: none;
}

.shs-bubble.is-expanded .shs-bubble-close {
	display: none;
}

/* --- Left position --- */
.shs-bubble.shs-bubble-left {
	left: 24px;
	right: auto;
	transform-origin: bottom left;
}

/* --- Responsive --- */
@media only screen and (max-width: 575px) {
	.shs-bubble {
		bottom: 100px;
		right: 16px;
	}

	.shs-bubble.shs-bubble-left {
		left: 16px;
	}

	.shs-bubble.is-expanded {
		width: 260px;
		height: 440px;
	}
}

@media only screen and (max-width: 450px) {
	.shs-bubble.is-expanded {
		width: 220px;
		height: 380px;
	}
}
