/**
 * Pretpot Popup Widget Styles
 * File: assets/css/popup.css
 */

/* ========================================
   TRIGGER (CLOSED STATE)
======================================== */
.pretpot-popup-widget {
	position: relative;
	width: 100%;
}

.pretpot-popup-trigger {
	display: flex;
	align-items: center;
	gap: 15px;
	padding: 15px 20px;
	background-color: #f5f5f5;
	border-radius: 4px;
	cursor: pointer;
	transition: all 0.3s ease;
	position: relative;
	z-index: 1;
}

.pretpot-popup-trigger:hover {
	background-color: #e8e8e8;
	transform: translateY(-2px);
	box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.pretpot-popup-trigger-text {
	font-size: 16px;
	color: #333333;
	line-height: 1.4;
}

.pretpot-popup-main-label {
	flex: 1;
	font-weight: 600;
}

.pretpot-popup-left-text {
	font-weight: 400;
	opacity: 0.8;
}

.pretpot-popup-trigger-divider {
	width: 2px;
	height: 20px;
	background-color: #cccccc;
	flex-shrink: 0;
}

.pretpot-popup-trigger-icon {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	font-size: 20px !important;
	color: #333333 !important;
	flex-shrink: 0;
	transition: transform 0.3s ease;
}

.pretpot-popup-trigger-icon i,
.pretpot-popup-trigger-icon svg {
	display: block !important;
	width: 20px !important;
	height: 20px !important;
	font-size: 20px !important;
}

.pretpot-popup-trigger.active .pretpot-popup-trigger-icon {
	transform: rotate(180deg);
}

/* ========================================
   POPUP OVERLAY
======================================== */
.pretpot-popup-overlay {
	position: absolute;
	left: 0;
	right: 0;
	width: 100%;
	max-width: 90%;
	margin: 0 auto;
	background-color: #ffffff;
	border-radius: 8px;
	box-shadow: 0 10px 40px rgba(0,0,0,0.15);
	z-index: 999;
	opacity: 0.95;
	overflow: hidden;
	transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Direction: Downwards */
.pretpot-popup-overlay[data-direction="down"] {
	top: calc(100% + 10px);
	transform-origin: top center;
}

/* Direction: Upwards */
.pretpot-popup-overlay[data-direction="up"] {
	bottom: calc(100% + 10px);
	transform-origin: bottom center;
}

/* Hidden State */
.pretpot-popup-hidden {
	visibility: hidden;
	pointer-events: none;
}

.pretpot-popup-hidden[data-direction="down"] {
	transform: translateY(-20px) scaleY(0.8);
	opacity: 0;
}

.pretpot-popup-hidden[data-direction="up"] {
	transform: translateY(20px) scaleY(0.8);
	opacity: 0;
}

/* Visible State */
.pretpot-popup-visible {
	visibility: visible;
	pointer-events: all;
	opacity: 0.95;
	transform: translateY(0) scaleY(1);
}

/* ========================================
   ANIMATIONS
======================================== */
/* Fade In */
.pretpot-popup-overlay[data-animation="fade"].pretpot-popup-hidden {
	opacity: 0;
}

.pretpot-popup-overlay[data-animation="fade"].pretpot-popup-visible {
	opacity: 0.95;
}

/* Slide from Left */
.pretpot-popup-overlay[data-animation="slide-left"].pretpot-popup-hidden {
	transform: translateX(-100%);
	opacity: 0;
}

.pretpot-popup-overlay[data-animation="slide-left"].pretpot-popup-visible {
	transform: translateX(0);
	opacity: 0.95;
}

/* Slide from Right */
.pretpot-popup-overlay[data-animation="slide-right"].pretpot-popup-hidden {
	transform: translateX(100%);
	opacity: 0;
}

.pretpot-popup-overlay[data-animation="slide-right"].pretpot-popup-visible {
	transform: translateX(0);
	opacity: 0.95;
}

/* Roll Out */
.pretpot-popup-overlay[data-animation="roll-out"].pretpot-popup-hidden {
	max-height: 0;
	opacity: 0;
	transform: scaleY(0);
}

.pretpot-popup-overlay[data-animation="roll-out"].pretpot-popup-visible {
	max-height: 1000px;
	opacity: 0.95;
	transform: scaleY(1);
}

/* ========================================
   POPUP HEADER
======================================== */
.pretpot-popup-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 20px 30px;
}

.pretpot-popup-header-label {
	font-size: 18px;
	font-weight: 600;
	color: #333333;
	flex: 1;
}

.pretpot-popup-close {
	background: transparent;
	border: none;
	cursor: pointer;
	padding: 5px;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	transition: all 0.3s ease;
	border-radius: 4px;
	flex-shrink: 0;
}

.pretpot-popup-close:hover {
	background-color: rgba(0,0,0,0.05);
	transform: rotate(90deg);
}

.pretpot-popup-close svg {
	width: 24px !important;
	height: 24px !important;
	display: block !important;
	color: #333333 !important;
}

.pretpot-popup-header .pretpot-popup-close {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    transform: none !important;
}

.pretpot-popup-header-divider {
	width: 100%;
	height: 1px;
	background-color: #eeeeee;
}

.pretpot-popup-header {
    display: flex;
    justify-content: space-between;   /* pushes label left / X right */
    align-items: center;
}

/* ========================================
   POPUP CONTENT
======================================== */
.pretpot-popup-content-wrapper {
	max-height: 80vh;
	overflow-y: auto;
	overflow-x: hidden;
}

/* Custom Scrollbar */
.pretpot-popup-content-wrapper::-webkit-scrollbar {
	width: 8px;
}

.pretpot-popup-content-wrapper::-webkit-scrollbar-track {
	background: #f1f1f1;
}

.pretpot-popup-content-wrapper::-webkit-scrollbar-thumb {
	background: #888;
	border-radius: 4px;
}

.pretpot-popup-content-wrapper::-webkit-scrollbar-thumb:hover {
	background: #555;
}

.pretpot-popup-body {
	padding: 30px;
}

.pretpot-popup-content-item {
	margin-bottom: 20px;
}

.pretpot-popup-content-item:last-child {
	margin-bottom: 0;
}

/* ========================================
   CONTENT TYPES
======================================== */

/* Heading */
.pretpot-popup-heading {
	margin: 0;
	padding: 0;
	line-height: 1.4;
}

/* Image */
.pretpot-popup-image {
	display: block;
	margin: 0 auto;
}

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

/* Video */
.pretpot-popup-video {
	position: relative;
	width: 100%;
	margin: 0 auto;
}

.pretpot-popup-video video,
.pretpot-popup-video iframe {
	width: 100%;
	height: auto;
	aspect-ratio: 16/9;
	display: block;
	border-radius: 8px;
}

.pretpot-video-play-overlay {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 80px;
	height: 80px;
	background-color: rgba(0,0,0,0.7);
	border-radius: 50%;
	display: flex !important;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: all 0.3s ease;
	z-index: 10;
}

.pretpot-video-play-overlay:hover {
	background-color: rgba(0,0,0,0.9);
	transform: translate(-50%, -50%) scale(1.1);
}

.pretpot-video-play-overlay i,
.pretpot-video-play-overlay svg {
	font-size: 32px !important;
	width: 32px !important;
	height: 32px !important;
	color: #ffffff !important;
	fill: #ffffff !important;
	display: block !important;
}

/* Product */
.pretpot-popup-product {
	display: flex;
	flex-direction: column;
	gap: 15px;
}

.pretpot-product-image {
	width: 100%;
}

.pretpot-product-image img {
	width: 100%;
	height: auto;
	border-radius: 8px;
}

.pretpot-product-title {
	font-size: 20px;
	font-weight: 600;
	margin: 0;
	color: #333333;
}

.pretpot-product-description {
	font-size: 14px;
	line-height: 1.6;
	color: #666666;
}

.pretpot-product-price {
	font-size: 24px;
	font-weight: 700;
	color: #0073aa;
}

.pretpot-product-button {
	display: inline-block;
	padding: 12px 30px;
	background-color: #0073aa;
	color: #ffffff;
	text-decoration: none;
	border-radius: 4px;
	font-weight: 600;
	text-align: center;
	transition: all 0.3s ease;
}

.pretpot-product-button:hover {
	background-color: #005a87;
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0,115,170,0.3);
}

/* Blog Post */
.pretpot-popup-post {
	display: flex;
	flex-direction: column;
	gap: 15px;
}

.pretpot-post-image {
	width: 100%;
}

.pretpot-post-image img {
	width: 100%;
	height: auto;
	border-radius: 8px;
}

.pretpot-post-title {
	font-size: 20px;
	font-weight: 600;
	margin: 0;
	color: #333333;
}

.pretpot-post-excerpt {
	font-size: 14px;
	line-height: 1.6;
	color: #666666;
}

.pretpot-post-button {
	display: inline-block;
	padding: 10px 25px;
	background-color: #333333;
	color: #ffffff;
	text-decoration: none;
	border-radius: 4px;
	font-weight: 600;
	text-align: center;
	transition: all 0.3s ease;
	align-self: flex-start;
}

.pretpot-post-button:hover {
	background-color: #000000;
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* Button */
.pretpot-popup-button-wrapper {
	text-align: center;
}

.pretpot-popup-button {
	display: inline-block;
	padding: 0;
	text-decoration: none;
	border-radius: 4px;
	font-weight: 600;
	transition: all 0.3s ease;
	cursor: pointer;
}

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

/* ========================================
   RESPONSIVE
======================================== */
@media (max-width: 768px) {
	.pretpot-popup-trigger {
		gap: 10px;
		padding: 12px 15px;
	}

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

	.pretpot-popup-overlay {
		max-width: 95%;
	}

	.pretpot-popup-header {
		padding: 15px 20px;
	}

	.pretpot-popup-header-label {
		font-size: 16px;
	}

	.pretpot-popup-body {
		padding: 20px;
	}

	.pretpot-video-play-overlay {
		width: 60px;
		height: 60px;
	}

	.pretpot-video-play-overlay i,
	.pretpot-video-play-overlay svg {
		font-size: 24px !important;
		width: 24px !important;
		height: 24px !important;
	}

	.pretpot-product-title,
	.pretpot-post-title {
		font-size: 18px;
	}

	.pretpot-product-price {
		font-size: 20px;
	}
}

@media (max-width: 480px) {
	.pretpot-popup-trigger {
		flex-wrap: wrap;
	}

	.pretpot-popup-trigger-divider {
		display: none;
	}

	.pretpot-popup-content-wrapper {
		max-height: 70vh;
	}

	.pretpot-popup-body {
		padding: 15px;
	}
}

/* ========================================
   ICON FORCING (CRITICAL)
======================================== */
.pretpot-popup-trigger-icon,
.pretpot-popup-close,
.pretpot-video-play-overlay {
	display: inline-flex !important;
	visibility: visible !important;
	opacity: 1 !important;
}

.pretpot-popup-trigger-icon *,
.pretpot-popup-close *,
.pretpot-video-play-overlay * {
	display: block !important;
	visibility: visible !important;
	opacity: 1 !important;
}

/* SVG icon enforcement */
.pretpot-popup-trigger-icon svg,
.pretpot-popup-close svg,
.pretpot-video-play-overlay svg {
	width: 100% !important;
	height: 100% !important;
	fill: currentColor !important;
	stroke: currentColor !important;
}

/* Font icon enforcement */
.pretpot-popup-trigger-icon i,
.pretpot-popup-close i,
.pretpot-video-play-overlay i {
	font-size: inherit !important;
	line-height: 1 !important;
	font-style: normal !important;
	font-weight: normal !important;
	speak: none !important;
	text-transform: none !important;
	-webkit-font-smoothing: antialiased !important;
	-moz-osx-font-smoothing: grayscale !important;
}