/**
 * TG Smart Commerce - Frontend Clean Stylesheet
 * Contains ONLY styles for:
 * 1. Popup Builder (.tgsc-popup-*)
 * 2. Pre Booking (.tgsc-prebook-*)
 * 3. Last Order / Recent Purchase Popup (.tgsc-last-order-*)
 */

/* ==================================================
   1. POPUP BUILDER (.tgsc-popup-*)
   ================================================== */
.tgsc-popup-builder-modal {
	position: fixed;
	top: 0; left: 0; right: 0; bottom: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

.tgsc-popup-hidden {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
}

.tgsc-popup-visible {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

.tgsc-popup-overlay {
	position: absolute;
	top: 0; left: 0; right: 0; bottom: 0;
	background: rgba(15, 23, 42, 0.65);
	backdrop-filter: blur(4px);
}

.tgsc-popup-card {
	position: relative;
	background: #ffffff;
	border-radius: 16px;
	padding: 28px;
	max-width: 480px;
	width: 90%;
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
	z-index: 2;
	text-align: center;
	overflow: hidden;
}

.tgsc-popup-close {
	position: absolute;
	top: 10px;
	right: 14px;
	background: none;
	border: none;
	font-size: 24px;
	color: #94a3b8;
	cursor: pointer;
	line-height: 1;
	z-index: 5;
}

.tgsc-popup-close:hover {
	color: #0f172a;
}

.tgsc-badge-popup {
	display: inline-block;
	background: #0284c7;
	color: #ffffff;
	padding: 4px 10px;
	border-radius: 20px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	margin-bottom: 12px;
}

.tgsc-popup-title {
	margin: 8px 0;
	font-size: 22px;
	font-weight: 700;
	color: #0f172a;
}

.tgsc-popup-subtitle {
	margin: 0 0 10px 0;
	font-size: 14px;
	color: #64748b;
}

.tgsc-popup-body {
	color: #475569;
	font-size: 14px;
	margin-bottom: 18px;
	line-height: 1.5;
}

.tgsc-popup-product-box {
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	padding: 10px 14px;
	margin-bottom: 16px;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.tgsc-popup-prod-name { font-weight: 600; color: #0f172a; font-size: 13px; }
.tgsc-popup-prod-price { font-weight: 700; color: #10b981; font-size: 14px; }

.tgsc-popup-coupon-code {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	background: #f1f5f9;
	padding: 10px;
	border-radius: 8px;
	margin-bottom: 15px;
}

.tgsc-popup-coupon-code code {
	font-size: 18px;
	font-weight: 700;
	color: #0284c7;
	letter-spacing: 1px;
}

.tgsc-popup-cta {
	display: inline-block;
	width: 100%;
	background: #0284c7 !important;
	color: #ffffff !important;
	font-size: 15px !important;
	font-weight: 700 !important;
	padding: 12px 20px !important;
	border-radius: 8px !important;
	border: none !important;
	text-decoration: none !important;
	text-align: center;
	box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
	transition: background 0.2s ease;
}

.tgsc-popup-cta:hover {
	background: #0369a1 !important;
}

.tgsc-popup-img-desktop {
	max-width: 100%;
	height: auto;
	border-radius: 8px;
	margin-bottom: 14px;
}

/* ==================================================
   2. PRE BOOKING (.tgsc-prebook-*)
   ================================================== */
.tgsc-prebook-box {
	background: #ffffff;
	border: 2px solid #8e44ad;
	border-radius: 12px;
	padding: 20px;
	margin: 20px 0;
	box-shadow: 0 4px 15px rgba(142, 68, 173, 0.1);
}

.tgsc-badge-prebook {
	display: inline-block;
	background: #8e44ad;
	color: #ffffff;
	padding: 4px 12px;
	border-radius: 20px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.tgsc-prebook-msg {
	margin: 8px 0 0 0;
	color: #475569;
	font-size: 14px;
	font-weight: 500;
}

.tgsc-prebook-breakdown {
	background: #f8fafc;
	border-radius: 8px;
	padding: 12px 16px;
	border: 1px solid #e2e8f0;
	margin: 14px 0;
}

.tgsc-pb-row {
	display: flex;
	justify-content: space-between;
	padding: 6px 0;
	font-size: 14px;
	border-bottom: 1px dashed #e2e8f0;
}

.tgsc-pb-row:last-child {
	border-bottom: none;
}

.tgsc-pb-highlight {
	background: #f0fdf4;
	padding: 8px 10px;
	border-radius: 6px;
	margin: 4px -10px;
}

.tgsc-advance-price {
	color: #10b981;
	font-size: 16px;
	font-weight: 700;
}

.tgsc-btn-prebook {
	width: 100%;
	background: #8e44ad !important;
	color: #ffffff !important;
	font-size: 16px !important;
	font-weight: 700 !important;
	padding: 14px 20px !important;
	border-radius: 8px !important;
	border: none !important;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	transition: background 0.2s ease;
	box-shadow: 0 4px 12px rgba(142, 68, 173, 0.25);
}

.tgsc-btn-prebook:hover {
	background: #732d91 !important;
}

.tgsc-btn-loop-prebook {
	background: #8e44ad !important;
	color: #ffffff !important;
	font-weight: 600 !important;
}

/* ==================================================
   3. LAST ORDER POPUP (.tgsc-last-order-*)
   ================================================== */
.tgsc-last-order-popup-modal {
	position: fixed;
	z-index: 99999;
	transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
}

.tgsc-last-order-bottom-left {
	bottom: 20px;
	left: 20px;
}

.tgsc-last-order-bottom-right {
	bottom: 20px;
	right: 20px;
}

.tgsc-last-order-hidden {
	opacity: 0;
	transform: translateY(25px);
	pointer-events: none;
}

.tgsc-last-order-visible {
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
}

.tgsc-last-order-card {
	position: relative;
	background: #ffffff;
	border-radius: 12px;
	box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.18), 0 4px 6px -2px rgba(15, 23, 42, 0.05);
	padding: 12px 14px;
	border: 1px solid #e2e8f0;
	max-width: 320px;
	width: 100%;
}

.tgsc-last-order-close {
	position: absolute;
	top: 4px;
	right: 8px;
	background: none;
	border: none;
	font-size: 16px;
	color: #94a3b8;
	cursor: pointer;
	line-height: 1;
}

.tgsc-last-order-close:hover {
	color: #0f172a;
}

.tgsc-last-order-inner {
	display: flex;
	align-items: center;
	gap: 12px;
}

.tgsc-last-order-media img.tgsc-last-order-img {
	width: 52px;
	height: 52px;
	border-radius: 8px;
	object-fit: cover;
	border: 1px solid #f1f5f9;
}

.tgsc-last-order-details {
	flex: 1;
	min-width: 0;
}

.tgsc-last-order-customer {
	font-size: 12px;
	font-weight: 700;
	color: #0f172a;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	letter-spacing: 0.3px;
}

.tgsc-last-order-product {
	font-size: 12px;
	color: #334155;
	font-weight: 500;
	margin-top: 2px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.tgsc-last-order-variation {
	font-size: 11px;
	color: #64748b;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.tgsc-last-order-time {
	font-size: 10px;
	color: #0284c7;
	font-weight: 600;
	margin-top: 3px;
}

/* Mobile Responsive Adjustments for Non-blocking Layout */
@media (max-width: 768px) {
	.tgsc-last-order-bottom-left,
	.tgsc-last-order-bottom-right {
		bottom: 12px;
		left: 12px;
		right: auto;
	}

	.tgsc-last-order-card {
		max-width: 270px;
		padding: 10px 12px;
	}

	.tgsc-last-order-media img.tgsc-last-order-img {
		width: 42px;
		height: 42px;
	}

	.tgsc-last-order-customer { font-size: 11px; }
	.tgsc-last-order-product { font-size: 11px; }
}
