/**
 * TP Product Promo - Frontend Styles
 * עיצוב נקי בסגנון התמונה שצורפה
 */

#tppp-banner-root {
	position: fixed;
	bottom: 24px;
	z-index: 99998;
	pointer-events: none;
}

#tppp-banner-root.tppp-pos-right {
	right: 24px;
	left: auto;
}

#tppp-banner-root.tppp-pos-left {
	left: 24px;
	right: auto;
}

/* קופסת הבאנר עצמה */
.tppp-banner {
	position: relative;
	width: 360px;
	max-width: calc(100vw - 48px);
	background: var(--tppp-bg, #ffffff);
	color: var(--tppp-text, #1a1a1a);
	border-radius: 12px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15), 0 2px 8px rgba(0, 0, 0, 0.08);
	overflow: hidden;
	pointer-events: auto;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Heebo", "Rubik", Roboto, Helvetica, Arial, sans-serif;
	opacity: 0;
	transform: translateY(20px) scale(0.95);
	transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.tppp-banner.tppp-visible {
	opacity: 1;
	transform: translateY(0) scale(1);
}

.tppp-banner.tppp-hiding {
	opacity: 0;
	transform: translateY(20px) scale(0.95);
}

/* כפתור סגירה */
.tppp-close {
	position: absolute;
	top: 8px;
	left: 8px;
	width: 28px;
	height: 28px;
	background: rgba(0, 0, 0, 0.06);
	border: none;
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #555;
	transition: background 0.2s, color 0.2s;
	z-index: 2;
	padding: 0;
}

[dir="rtl"] .tppp-close {
	left: auto;
	right: 8px;
}

.tppp-close:hover {
	background: rgba(0, 0, 0, 0.12);
	color: #000;
}

.tppp-close svg {
	width: 14px;
	height: 14px;
}

/* פריט מוצר בודד */
.tppp-product {
	display: flex;
	align-items: stretch;
	min-height: 120px;
	text-decoration: none;
	color: inherit;
}

[dir="rtl"] .tppp-product {
	flex-direction: row-reverse;
}

/* תמונה */
.tppp-product__image {
	flex-shrink: 0;
	width: 130px;
	height: 130px;
	background-color: #f5f5f5;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
}

/* תוכן */
.tppp-product__content {
	flex: 1;
	padding: 16px 18px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 6px;
	min-width: 0;
}

.tppp-product__title {
	font-size: 15px;
	font-weight: 700;
	line-height: 1.35;
	margin: 0;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.tppp-product__tag {
	font-size: 12px;
	color: #888;
	font-weight: 400;
	margin: 0;
}

.tppp-product__price {
	font-size: 14px;
	font-weight: 600;
	margin: 2px 0 0;
	color: var(--tppp-text, #1a1a1a);
}

.tppp-product__price del {
	color: #999;
	font-weight: 400;
	margin-left: 6px;
	font-size: 13px;
}

.tppp-product__price ins {
	text-decoration: none;
	color: #d63638;
}

/* כפתור */
.tppp-product__button {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	margin-top: 6px;
	color: var(--tppp-button, #0073aa);
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
}

.tppp-product__button svg {
	width: 12px;
	height: 12px;
	transition: transform 0.2s;
}

[dir="rtl"] .tppp-product__button svg {
	transform: rotate(180deg);
}

.tppp-product:hover .tppp-product__button svg {
	transform: translateX(-3px);
}

[dir="rtl"] .tppp-product:hover .tppp-product__button svg {
	transform: rotate(180deg) translateX(-3px);
}

/* קרוסלה - מחוונים */
.tppp-dots {
	display: flex;
	justify-content: center;
	gap: 6px;
	padding: 8px 0 12px;
	background: var(--tppp-bg, #ffffff);
}

.tppp-dot {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.2);
	border: none;
	padding: 0;
	cursor: pointer;
	transition: background 0.2s, width 0.2s;
}

.tppp-dot.tppp-dot--active {
	background: var(--tppp-button, #0073aa);
	width: 18px;
	border-radius: 3px;
}

/* רספונסיביות - מובייל */
@media (max-width: 600px) {
	#tppp-banner-root {
		bottom: 16px;
	}

	#tppp-banner-root.tppp-pos-right,
	#tppp-banner-root.tppp-pos-left {
		right: 12px;
		left: 12px;
	}

	.tppp-banner {
		width: 100%;
		max-width: none;
	}

	.tppp-product__image {
		width: 110px;
		height: 110px;
	}

	.tppp-product__title {
		font-size: 14px;
	}
}

/* מצב כשהבאנר מוסתר לחלוטין */
#tppp-banner-root:empty {
	display: none;
}
