/* WP Story Showcase Pro - Frontend Styles */
.wssp-wrapper,
.wssp-modal {
	--wssp-ring-color: #E85B25;
	--wssp-seen-color: #D1D5DB;
	--wssp-size-desktop: 88px;
	--wssp-size-mobile: 74px;
	--wssp-ring-thickness: 3px;
	--wssp-ring-gap: 3px;
	--wssp-item-spacing: 20px;
	--wssp-title-color: #111827;
	--wssp-title-size: 13px;
	--wssp-title-weight: 500;
	--wssp-modal-opacity: 0.88;
	--wssp-modal-blur: 6px;
	--wssp-video-radius: 16px;
	--wssp-video-aspect: 9/16;
	--wssp-cta-bg: #1D2218;
	--wssp-cta-color: #FFFFFF;
	--wssp-cta-radius: 999px;
}

.wssp-wrapper {
	position: relative;
	width: 100%;
	max-width: 100%;
	margin: 16px auto;
	padding: 4px 0;
	box-sizing: border-box;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.wssp-wrapper *,
.wssp-modal * {
	box-sizing: border-box;
}

/* Horizontal Story Carousel Track */
.wssp-track {
	display: flex !important;
	align-items: flex-start !important;
	gap: var(--wssp-item-spacing);
	overflow-x: auto;
	scroll-behavior: smooth;
	scrollbar-width: none;
	-ms-overflow-style: none;
	padding: 4px 6px 8px;
	cursor: grab;
}

.wssp-track::-webkit-scrollbar {
	display: none;
}

.wssp-track.is-dragging {
	cursor: grabbing;
	scroll-behavior: auto;
}

.wssp-story-item {
	flex: 0 0 auto;
	width: calc(var(--wssp-size-desktop) + 14px);
	text-align: center;
}

.wssp-story-trigger {
	background: transparent !important;
	border: none !important;
	padding: 0 !important;
	margin: 0 !important;
	min-width: 0 !important;
	min-height: 0 !important;
	width: 100%;
	display: flex !important;
	flex-direction: column !important;
	align-items: center !important;
	cursor: pointer;
	text-decoration: none !important;
	box-shadow: none !important;
	outline: none !important;
}

/* Story Ring & Inner Avatar */
.wssp-ring-outer {
	position: relative;
	width: var(--wssp-size-desktop);
	height: var(--wssp-size-desktop);
	border-radius: 50%;
	border: var(--wssp-ring-thickness) solid var(--wssp-item-ring, var(--wssp-ring-color));
	padding: var(--wssp-ring-gap);
	background: #ffffff;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.22s ease, border-color 0.25s ease;
}

.wssp-story-trigger:hover .wssp-ring-outer {
	transform: scale(1.04);
}

.wssp-story-item.is-seen .wssp-ring-outer {
	border-color: var(--wssp-seen-color) !important;
}

.wssp-ring-inner {
	width: 100%;
	height: 100%;
	border-radius: 50%;
	overflow: hidden;
	background: #F3F4F6;
	display: flex;
	align-items: center;
	justify-content: center;
}

.wssp-ring-inner img {
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	aspect-ratio: 1 / 1;
	object-fit: cover !important;
	border-radius: 50% !important;
	display: block !important;
	pointer-events: none;
	user-select: none;
}

.wssp-placeholder-avatar {
	font-size: 20px;
	color: #9CA3AF;
}

/* Orange Play Badge (Bottom-Right Corner) */
.wssp-play-badge {
	position: absolute;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background-color: var(--wssp-ring-color);
	border: 2px solid #ffffff;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.16);
	z-index: 2;
	transition: transform 0.2s ease;
}

.wssp-play-badge svg {
	margin-left: 1px;
}

.wssp-badge-bottom-right {
	bottom: -1px;
	right: -1px;
}

.wssp-badge-bottom-left {
	bottom: -1px;
	left: -1px;
}

.wssp-badge-center {
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
}

/* Label Under Ring */
.wssp-story-label {
	margin-top: 8px;
	width: 100%;
	color: var(--wssp-title-color) !important;
	font-size: var(--wssp-title-size) !important;
	font-weight: var(--wssp-title-weight) !important;
	line-height: 1.25;
	text-align: center;
	word-break: break-word;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.wssp-lines-1 {
	-webkit-line-clamp: 1;
}

.wssp-lines-2 {
	-webkit-line-clamp: 2;
}

/* =========================================================
   FULLSCREEN VERTICAL STORY VIDEO MODAL
   ========================================================= */
body.wssp-modal-open {
	overflow: hidden !important;
}

.wssp-modal {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: none;
	align-items: center;
	justify-content: center;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.wssp-modal.is-open {
	display: flex !important;
	animation: wsspFadeIn 0.2s ease-out;
}

@keyframes wsspFadeIn {
	from { opacity: 0; }
	to { opacity: 1; }
}

.wssp-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, var(--wssp-modal-opacity));
	backdrop-filter: blur(var(--wssp-modal-blur));
	-webkit-backdrop-filter: blur(var(--wssp-modal-blur));
}

.wssp-modal-stage {
	position: relative;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 24px;
	max-width: 100vw;
	max-height: 100vh;
}

/* External Side Arrows (< >) */
.wssp-modal-side-arrow {
	width: 44px;
	height: 44px;
	min-width: 44px !important;
	min-height: 44px !important;
	border-radius: 50% !important;
	border: none !important;
	background: rgba(255, 255, 255, 0.14) !important;
	color: #ffffff !important;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: background 0.2s ease, transform 0.15s ease;
	flex-shrink: 0;
	padding: 0 !important;
	box-shadow: none !important;
}

.wssp-modal-side-arrow:hover {
	background: rgba(255, 255, 255, 0.28) !important;
	transform: scale(1.06);
}

.wssp-modal-side-arrow:disabled {
	opacity: 0.25;
	cursor: default;
	pointer-events: none;
}

/* 9:16 Portrait Video Container */
.wssp-story-card-player {
	position: relative;
	height: min(88vh, 760px);
	aspect-ratio: var(--wssp-video-aspect);
	max-width: 92vw;
	background: #0f0f0f;
	border-radius: var(--wssp-video-radius);
	overflow: hidden;
	box-shadow: 0 24px 64px rgba(0, 0, 0, 0.7);
	user-select: none;
	-webkit-user-select: none;
}

.wssp-player-top-scrim {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 110px;
	background: linear-gradient(180deg, rgba(0, 0, 0, 0.68) 0%, rgba(0, 0, 0, 0) 100%);
	z-index: 4;
	pointer-events: none;
}

/* Segmented Story Progress Bars */
.wssp-progress-bars {
	position: absolute;
	top: 10px;
	left: 12px;
	right: 12px;
	z-index: 6;
	display: flex;
	gap: 5px;
	pointer-events: none;
}

.wssp-progress-track {
	flex: 1;
	height: 3px;
	border-radius: 3px;
	background: rgba(255, 255, 255, 0.32);
	overflow: hidden;
}

.wssp-progress-fill {
	height: 100%;
	width: 0%;
	background: #ffffff;
	border-radius: 3px;
	transition: width 0.08s linear;
}

/* Player Header (Title + Mute + Close) */
.wssp-player-header {
	position: absolute;
	top: 22px;
	left: 14px;
	right: 14px;
	z-index: 6;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
}

.wssp-player-title-wrap {
	flex: 1;
	min-width: 0;
	pointer-events: none;
}

.wssp-player-title {
	display: block;
	color: #ffffff;
	font-size: 14px;
	font-weight: 600;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	text-shadow: 0 1px 4px rgba(0, 0, 0, 0.55);
}

.wssp-player-controls {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-shrink: 0;
}

.wssp-player-icon-btn {
	width: 36px;
	height: 36px;
	min-width: 36px !important;
	min-height: 36px !important;
	border-radius: 50% !important;
	border: none !important;
	background: rgba(25, 25, 25, 0.62) !important;
	backdrop-filter: blur(4px);
	color: #ffffff !important;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	padding: 0 !important;
	transition: background 0.2s ease, transform 0.15s ease;
	box-shadow: none !important;
}

.wssp-player-icon-btn:hover {
	background: rgba(25, 25, 25, 0.88) !important;
	transform: scale(1.06);
}

.wssp-mute-btn[data-muted="0"] .wssp-svg-unmuted { display: block; }
.wssp-mute-btn[data-muted="0"] .wssp-svg-muted { display: none; }
.wssp-mute-btn[data-muted="1"] .wssp-svg-unmuted { display: none; }
.wssp-mute-btn[data-muted="1"] .wssp-svg-muted { display: block; }

/* Video, Iframe & Image Viewport */
.wssp-media-viewport {
	position: relative;
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #000;
}

.wssp-video-el,
.wssp-image-el,
.wssp-iframe-el {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	border: none;
}

.wssp-empty-slide-msg {
	color: #ffffff;
	font-size: 14px;
	text-align: center;
	padding: 24px;
	opacity: 0.85;
}

.wssp-loader-spinner {
	position: absolute;
	width: 38px;
	height: 38px;
	border: 3px solid rgba(255, 255, 255, 0.25);
	border-top-color: #ffffff;
	border-radius: 50%;
	animation: wsspSpin 0.8s linear infinite;
	z-index: 5;
}

@keyframes wsspSpin {
	to { transform: rotate(360deg); }
}

/* Invisible Tap Zones */
.wssp-tap-zone {
	position: absolute;
	top: 64px;
	bottom: 84px;
	z-index: 5;
	cursor: pointer;
}

.wssp-tap-left {
	left: 0;
	width: 32%;
}

.wssp-tap-right {
	right: 0;
	width: 68%;
}

/* Bottom CTA Button ("ÜRÜNÜ İNCELE") */
.wssp-player-footer {
	position: absolute;
	bottom: 24px;
	left: 16px;
	right: 16px;
	z-index: 7;
	display: flex;
	justify-content: center;
	pointer-events: none;
}

.wssp-cta-button {
	pointer-events: auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	background-color: var(--wssp-cta-bg) !important;
	color: var(--wssp-cta-color) !important;
	border-radius: var(--wssp-cta-radius) !important;
	padding: 13px 26px;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.5px;
	text-decoration: none !important;
	border: 1px solid rgba(255, 255, 255, 0.14);
	box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
	transition: transform 0.2s ease, filter 0.2s ease;
}

.wssp-cta-button:hover {
	transform: translateY(-2px) scale(1.02);
	filter: brightness(1.12);
	color: var(--wssp-cta-color) !important;
}

.wssp-cta-pulse {
	animation: wsspPulse 2.2s infinite;
}

@keyframes wsspPulse {
	0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.35); }
	70% { box-shadow: 0 0 0 12px rgba(255, 255, 255, 0); }
	100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}

/* Responsive Mobile Tweaks */
@media (max-width: 767px) {
	.wssp-story-item {
		width: calc(var(--wssp-size-mobile) + 10px);
	}
	.wssp-ring-outer {
		width: var(--wssp-size-mobile);
		height: var(--wssp-size-mobile);
	}
	.wssp-play-badge {
		width: 22px;
		height: 22px;
	}
	.wssp-modal-side-arrow {
		display: none;
	}
	.wssp-story-card-player {
		width: 100vw;
		height: 100dvh;
		max-width: 100vw;
		border-radius: 0;
	}
}
