/* ===== PRETPOT STORY BANNERS WIDGET ===== */

.pretpot-story-banners-container {
	position: relative;
	width: 100%;
	overflow: visible;
}

.pretpot-story-banners-wrapper {
	display: flex;
	flex-wrap: nowrap;
	align-items: flex-start;
}

/* Horizontal Orientation */
.pretpot-orientation-horizontal .pretpot-story-banners-wrapper {
	flex-direction: row;
}

.pretpot-orientation-horizontal.pretpot-scrolling-enabled .pretpot-story-banners-wrapper {
	overflow-x: auto;
	overflow-y: hidden;
	-webkit-overflow-scrolling: touch;
	scroll-behavior: smooth;
	scrollbar-width: thin;
	scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

.pretpot-orientation-horizontal.pretpot-scrolling-enabled .pretpot-story-banners-wrapper::-webkit-scrollbar {
	height: 6px;
}

.pretpot-orientation-horizontal.pretpot-scrolling-enabled .pretpot-story-banners-wrapper::-webkit-scrollbar-track {
	background: transparent;
}

.pretpot-orientation-horizontal.pretpot-scrolling-enabled .pretpot-story-banners-wrapper::-webkit-scrollbar-thumb {
	background: rgba(0, 0, 0, 0.2);
	border-radius: 3px;
}

.pretpot-orientation-horizontal.pretpot-scrolling-enabled .pretpot-story-banners-wrapper::-webkit-scrollbar-thumb:hover {
	background: rgba(0, 0, 0, 0.3);
}

/* Vertical Orientation */
.pretpot-orientation-vertical .pretpot-story-banners-wrapper {
	flex-direction: column;
}

.pretpot-orientation-vertical.pretpot-scrolling-enabled .pretpot-story-banners-wrapper {
	overflow-x: hidden;
	overflow-y: auto;
	max-height: 500px;
	-webkit-overflow-scrolling: touch;
	scroll-behavior: smooth;
	scrollbar-width: thin;
	scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

.pretpot-orientation-vertical.pretpot-scrolling-enabled .pretpot-story-banners-wrapper::-webkit-scrollbar {
	width: 6px;
}

.pretpot-orientation-vertical.pretpot-scrolling-enabled .pretpot-story-banners-wrapper::-webkit-scrollbar-track {
	background: transparent;
}

.pretpot-orientation-vertical.pretpot-scrolling-enabled .pretpot-story-banners-wrapper::-webkit-scrollbar-thumb {
	background: rgba(0, 0, 0, 0.2);
	border-radius: 3px;
}

.pretpot-orientation-vertical.pretpot-scrolling-enabled .pretpot-story-banners-wrapper::-webkit-scrollbar-thumb:hover {
	background: rgba(0, 0, 0, 0.3);
}

/* Story Item */
.pretpot-story-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	cursor: pointer;
	transition: transform 0.3s ease;
	flex-shrink: 0;
	outline: none !important;
}

.pretpot-story-item:hover {
	transform: scale(1.05);
}

.pretpot-story-item:active {
	transform: scale(0.98);
}

/* Remove blue focus ring on click - only show on keyboard focus */
.pretpot-story-item:focus:not(:focus-visible) {
	outline: none !important;
}

.pretpot-story-item:focus-visible {
	outline: 2px solid #007cba !important;
	outline-offset: 4px;
	border-radius: 50%;
}

/* Story Circle */
.pretpot-story-circle {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	transition: all 0.3s ease;
	box-sizing: border-box;
}

.pretpot-story-circle img {
	width: 100%;
	height: 100%;
	display: block;
	border-radius: inherit;
	transition: transform 0.3s ease;
}

.pretpot-story-item:hover .pretpot-story-circle img {
	transform: scale(1.1);
}

/* Story Label */
.pretpot-story-label {
	display: block;
	width: 100%;
	font-size: 12px;
	line-height: 1.4;
	word-wrap: break-word;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	max-width: 100px;
}

/* ===== POPUP / MODAL ===== */

.pretpot-story-popup-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
	overflow-y: auto;
	padding: 20px;
	box-sizing: border-box;
}

.pretpot-story-popup-overlay.pretpot-popup-visible {
	opacity: 1;
	visibility: visible;
}

.pretpot-story-popup-container {
	position: relative;
	width: 100%;
	box-sizing: border-box;
	transform: scale(0.9);
	transition: transform 0.3s ease;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
	overflow: hidden;
	z-index: 10;
}

.pretpot-story-popup-overlay.pretpot-popup-visible .pretpot-story-popup-container {
	transform: scale(1);
}

.pretpot-popup-close {
	position: absolute;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(255, 255, 255, 0.9);
	border: none;
	cursor: pointer;
	transition: transform 0.2s ease, background 0.2s ease;
	z-index: 20;
	padding: 8px;
	line-height: 1;
	border-radius: 50%;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.pretpot-popup-close:hover {
	transform: scale(1.1);
	background: rgba(255, 255, 255, 1);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.pretpot-popup-close svg {
	width: 100%;
	height: 100%;
	display: block;
}

/* Popup Content */
.pretpot-popup-content {
	position: relative;
}

.pretpot-popup-image {
	width: 100%;
	height: auto;
	display: block;
	margin-bottom: 20px;
	border-radius: 8px;
	overflow: hidden;
}

.pretpot-popup-image img {
	width: 100%;
	height: auto;
	display: block;
}

.pretpot-popup-title {
	font-size: 28px;
	font-weight: 700;
	line-height: 1.3;
	margin: 0 0 15px;
}

.pretpot-popup-description {
	font-size: 16px;
	line-height: 1.6;
	margin: 0 0 20px;
}

.pretpot-popup-offer {
	display: inline-block;
	padding: 12px 24px;
	border-radius: 8px;
	font-size: 20px;
	font-weight: 700;
	margin: 0 0 25px;
	letter-spacing: 1px;
}

.pretpot-popup-button {
	display: inline-block;
	padding: 15px 40px;
	text-decoration: none;
	border-radius: 5px;
	font-size: 16px;
	font-weight: 600;
	transition: all 0.3s ease;
	border: none;
	cursor: pointer;
	text-align: center;
}

.pretpot-popup-button:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Prevent Body Scroll */
body.pretpot-story-popup-open {
	overflow: hidden;
	padding-right: var(--pretpot-scrollbar-width, 0);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
	.pretpot-story-banners-wrapper {
		gap: 10px !important;
	}

	.pretpot-story-label {
		font-size: 11px;
		max-width: 80px;
	}

	.pretpot-story-popup-container {
		max-width: 95% !important;
	}

	.pretpot-popup-title {
		font-size: 24px;
	}

	.pretpot-popup-description {
		font-size: 14px;
	}

	.pretpot-popup-offer {
		font-size: 18px;
		padding: 10px 20px;
	}

	.pretpot-popup-button {
		width: 100%;
		padding: 12px 30px;
	}
}

@media (max-width: 480px) {
	.pretpot-story-popup-overlay {
		padding: 10px;
	}

	.pretpot-popup-title {
		font-size: 20px;
	}

	.pretpot-popup-description {
		font-size: 13px;
	}

	.pretpot-popup-offer {
		font-size: 16px;
		padding: 8px 16px;
	}
}

/* Animation for popup entrance */
@keyframes pretpot-popup-fade-in {
	from {
		opacity: 0;
		transform: scale(0.9);
	}
	to {
		opacity: 1;
		transform: scale(1);
	}
}

.pretpot-story-popup-overlay.pretpot-popup-visible .pretpot-story-popup-container {
	animation: pretpot-popup-fade-in 0.3s ease forwards;
}

/* Accessibility - Only show focus ring on keyboard navigation */
.pretpot-popup-close:focus:not(:focus-visible) {
	outline: none;
}

.pretpot-popup-close:focus-visible {
	outline: 2px solid #007cba;
	outline-offset: 2px;
}

.pretpot-popup-button:focus:not(:focus-visible) {
	outline: none;
}

.pretpot-popup-button:focus-visible {
	outline: 2px solid #007cba;
	outline-offset: 2px;
}

/* Loading State */
.pretpot-story-circle.pretpot-loading {
	position: relative;
}

.pretpot-story-circle.pretpot-loading::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 20px;
	height: 20px;
	margin: -10px 0 0 -10px;
	border: 2px solid rgba(255, 255, 255, 0.3);
	border-top-color: #ffffff;
	border-radius: 50%;
	animation: pretpot-spin 0.6s linear infinite;
}

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