/**
 * AI Image Assistant — Lite upsell styles.
 *
 * Reproduces Pro's per-image purple sparkle trigger and the "Bulk Image
 * Assistant" button, plus the "PRO feature" upgrade modal.
 */

/* ─── Sparkle icon (mask, inherits color) ─────────────────────────────── */
.envira-ia-sparkle {
	display: inline-block;
	width: 16px;
	height: 16px;
	vertical-align: -3px;
	background: currentColor;
	-webkit-mask:
		url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 2l2.39 5.61L20 10l-5.61 2.39L12 18l-2.39-5.61L4 10l5.61-2.39L12 2zm6 11l1.2 2.8L22 17l-2.8 1.2L18 21l-1.2-2.8L14 17l2.8-1.2L18 13zM5 14l.9 2.1L8 17l-2.1.9L5 20l-.9-2.1L2 17l2.1-.9L5 14z'/></svg>")
		center / contain no-repeat;
	mask:
		url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 2l2.39 5.61L20 10l-5.61 2.39L12 18l-2.39-5.61L4 10l5.61-2.39L12 2zm6 11l1.2 2.8L22 17l-2.8 1.2L18 21l-1.2-2.8L14 17l2.8-1.2L18 13zM5 14l.9 2.1L8 17l-2.1.9L5 20l-.9-2.1L2 17l2.1-.9L5 14z'/></svg>")
		center / contain no-repeat;
}

/* ─── Per-image purple sparkle trigger ────────────────────────────────── */
#envira-gallery-output li.envira-gallery-image {
	position: relative;
}

.envira-ia-image-trigger {
	position: absolute;
	top: 5px;
	left: 65px;
	width: 26px;
	height: 26px;
	border-radius: 4px;
	border: 0;
	background: #8b5cf6;
	color: #fff;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	z-index: 5;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
	transition: background 0.15s ease;
	padding: 0;
}
.envira-ia-image-trigger:hover {
	background: #7c3aed;
}
.envira-ia-image-trigger .envira-ia-sparkle {
	width: 16px;
	height: 16px;
	vertical-align: 0;
}

/* ─── Bulk toolbar button ─────────────────────────────────────────────── */
/* Fallback (before JS lifts it into the title row): keep it in flow. */
.envira-ia-toolbar-lite {
	margin: 0 0 12px;
}
/* JS wraps the "Currently in your Gallery" <p> + this toolbar in an
   .envira-ia-intro-row so the button pins to the far right of the title row,
   matching Pro's placement. */
.envira-ia-intro-row {
	position: relative;
}
.envira-ia-intro-row .envira-ia-toolbar-lite {
	position: absolute;
	top: 0;
	right: 0;
	margin: 0;
}

.envira-ia-bulk {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 14px;
	border: 1px solid #d1d5db;
	background: #fff;
	color: #111827;
	border-radius: 4px;
	font-size: 13px;
	line-height: 1.2;
	cursor: pointer;
}
.envira-ia-bulk:hover {
	border-color: #16a34a;
	color: #16a34a;
}
.envira-ia-bulk .envira-ia-sparkle {
	color: #16a34a;
}

/* ─── Upgrade modal ───────────────────────────────────────────────────── */
.envira-ia-upsell-overlay {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: rgba(17, 24, 39, 0.55);
}

.envira-ia-upsell-card {
	position: relative;
	width: 100%;
	max-width: 560px;
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 20px 60px rgba(17, 24, 39, 0.28);
	overflow: hidden;
	text-align: center;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.envira-ia-upsell-close {
	position: absolute;
	top: 12px;
	right: 14px;
	width: 30px;
	height: 30px;
	border: 0;
	background: transparent;
	color: #9ca3af;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	border-radius: 6px;
}
.envira-ia-upsell-close:hover {
	color: #111827;
	background: #f3f4f6;
}

.envira-ia-upsell-body {
	padding: 34px 40px 26px;
}

.envira-ia-upsell-lock {
	display: inline-flex;
	color: #111827;
}
.envira-ia-upsell-lock svg {
	width: 38px;
	height: 38px;
	fill: currentColor;
}

.envira-ia-upsell-title {
	margin: 16px 0 10px;
	font-size: 20px;
	font-weight: 700;
	color: #111827;
}

.envira-ia-upsell-desc {
	margin: 0;
	font-size: 14px;
	line-height: 1.55;
	color: #4b5563;
}

/* Light-green call-to-action panel (bottom of the card). */
.envira-ia-upsell-cta {
	position: relative;
	background: #edf7ee;
	padding: 30px 40px 34px;
}

.envira-ia-upsell-arrow {
	position: absolute;
	left: 44px;
	top: 2px;
	width: 35px;
	height: 62px;
	background: url("../images/ai-upsell-arrow.png") center / contain no-repeat;
	pointer-events: none;
}

.envira-ia-upsell-cta-btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 15px 34px;
	background: #5cb85c;
	color: #fff;
	font-size: 16px;
	font-weight: 600;
	border-radius: 8px;
	text-decoration: none;
	box-shadow: 0 6px 16px rgba(92, 184, 92, 0.4);
	transition: background 0.15s ease;
}
.envira-ia-upsell-cta-btn:hover,
.envira-ia-upsell-cta-btn:focus {
	background: #4ca64c;
	color: #fff;
}
.envira-ia-upsell-cta-arrow {
	font-size: 18px;
	line-height: 1;
}

.envira-ia-upsell-discount {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	margin-top: 22px;
}
.envira-ia-upsell-badge {
	flex: 0 0 auto;
	width: 32px;
	height: 32px;
	background: url("../images/ai-upsell-star.png") center / contain no-repeat;
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	line-height: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
.envira-ia-upsell-discount-text {
	margin: 0;
	max-width: 360px;
	text-align: left;
	font-size: 13px;
	line-height: 1.5;
	color: #4b5563;
}
.envira-ia-upsell-discount-text strong {
	color: #111827;
}
