/* Customer popup — frontend */

.phs-popup {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	font-family: Vazirmatn, Tahoma, sans-serif;
	direction: rtl;
}

.phs-popup[hidden] {
	display: none !important;
}

.phs-popup.is-visible {
	display: flex;
}

.phs-popup-overlay {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.55);
	backdrop-filter: blur(4px);
	cursor: pointer;
}

.phs-popup-box {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 480px;
	max-height: 90vh;
	overflow: auto;
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
	animation: phsPopupIn 0.35s ease;
}

@keyframes phsPopupIn {
	from {
		opacity: 0;
		transform: scale(0.92) translateY(12px);
	}
	to {
		opacity: 1;
		transform: scale(1) translateY(0);
	}
}

.phs-popup-close {
	position: absolute;
    top: 12px;
    left: 12px;
    width: 40px;
    height: 40px;
    border: none;
    background: rgb(0 0 0 / .06);
    border-radius: 50%;
    font-size: 17px;
    line-height: 0.5;
    cursor: pointer;
    color: #64748b;
    transition: background 0.15s, color 0.15s;
    z-index: 2;
}

.phs-popup-close:hover {
	background: rgba(0, 0, 0, 0.1);
	color: #1e293b;
}

.phs-popup-image img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 16px 16px 0 0;
	object-fit: cover;
	max-height: 220px;
}

.phs-popup-body {
	padding: 24px 28px 28px;
	text-align: center;
}

.phs-popup-title {
	margin: 0 0 12px;
	font-size: 22px;
	font-weight: 700;
	color: #f5683c;
	line-height: 1.4;
}

.phs-popup-content {
	font-size: 15px;
	line-height: 1.8;
	color: #475569;
	margin-bottom: 20px;
}

.phs-popup-content p:last-child {
	margin-bottom: 0;
}

.phs-popup-btn {
	    display: inline-block;
    padding: 12px 28px;
    background: linear-gradient(135deg, #f5683c, #f69679);
    color: #fff !important;
    text-decoration: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    transition: transform 0.15s, box-shadow 0.15s;
    box-shadow: 0 4px 14px rgb(245 112 70 / 35%);
}

.phs-popup-btn:hover {
	transform: translateY(-1px);
    box-shadow: 0 6px 20px rgb(246 134 99 / 45%);
	color: #fff !important;
}

body.phs-popup-open {
	overflow: hidden;
}

/* Related products in popup */
.phs-popup-products {
	display: flex;
	gap: 10px;
	overflow-x: auto;
	margin: 16px 0;
	padding: 4px 0;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
	text-align: right;
}

.phs-popup-products::-webkit-scrollbar {
	display: none;
}

.phs-popup-product-card {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	gap: 10px;
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	padding: 8px 12px;
	min-width: 180px;
	max-width: 240px;
	text-decoration: none;
	color: #1e293b;
	transition: background 0.15s, transform 0.15s;
}

.phs-popup-product-card:hover {
	background: #f1f5f9;
	transform: translateY(-1px);
	color: #1e293b;
}

.phs-popup-product-card img {
	width: 48px;
	height: 48px;
	object-fit: contain;
	border-radius: 8px;
	flex-shrink: 0;
}

.phs-popup-product-info {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
	text-align: right;
}

.phs-popup-product-name {
	font-size: 12px;
	font-weight: 600;
	line-height: 1.4;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.phs-popup-product-price {
	font-size: 12px;
	color: #0d9488;
	font-weight: 700;
}

@media (max-width: 480px) {
	.phs-popup-box {
		max-width: 100%;
		border-radius: 12px;
	}

	.phs-popup-body {
		padding: 20px;
	}

	.phs-popup-title {
		font-size: 18px;
	}
}
