/* CoffeeIdeas Product Popup – frontend styles */
.cipp[hidden],
.cipp [hidden] { display: none !important; }

.cipp {
	--cipp-bg: #1c1008;
	--cipp-text: #f5ead8;
	--cipp-btn: #5a2e0a;
	--cipp-btn-text: #ffffff;
	--cipp-offset: 20px;
	--cipp-offset-m: 80px;
	position: fixed;
	bottom: calc(var(--cipp-offset) + env(safe-area-inset-bottom, 0px));
	z-index: 99990;
	box-sizing: border-box;
	display: block;
	width: min(330px, calc(100vw - 24px));
	margin: 0;
	padding: 0;
	overflow: hidden;
	font-family: inherit;
	font-size: 14px;
	line-height: 1.4;
	color: var(--cipp-text);
	text-align: left;
	background: var(--cipp-bg);
	border: 1px solid rgba(128, 128, 128, 0.35);
	border: 1px solid color-mix(in srgb, var(--cipp-text) 16%, transparent);
	border-radius: 14px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35), 0 2px 6px rgba(0, 0, 0, 0.2);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transform: translateY(24px);
	transition: opacity 0.45s ease, transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s linear 0.45s;
}
.cipp *, .cipp *::before, .cipp *::after { box-sizing: border-box; }
.cipp--left  { left: 20px; }
.cipp--right { right: 20px; }

.cipp.is-visible {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transform: none;
	transition-delay: 0s;
}

/* Slides are stacked in one grid cell, so the card is as tall as the tallest slide (no jumping). */
.cipp__slides { display: grid; }
.cipp__slide {
	grid-area: 1 / 1;
	display: flex;
	min-height: 110px;
	opacity: 0;
	visibility: hidden;
	transform: translateX(14px);
	transition: opacity 0.4s ease, transform 0.4s ease, visibility 0s linear 0.4s;
}
.cipp__slide.is-active {
	opacity: 1;
	visibility: visible;
	transform: none;
	transition-delay: 0s;
}

.cipp__media {
	flex: 0 0 100px;
	background: rgba(128, 128, 128, 0.2);
}
.cipp__media:empty { display: none; }
.cipp__img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
}

.cipp__body {
	flex: 1 1 auto;
	min-width: 0;
	padding: 12px 14px 14px 14px;
}
.cipp__badge {
	display: inline-block;
	margin: 0 0 6px;
	padding: 3px 9px;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.06em;
	line-height: 1.3;
	text-transform: uppercase;
	color: var(--cipp-btn-text);
	background: var(--cipp-btn);
	border-radius: 999px;
}
.cipp__product {
	margin: 0 0 2px;
	font-size: 13px;
	font-weight: 700;
	color: var(--cipp-text);
	opacity: 0.8;
}
.cipp__heading {
	margin: 0 0 4px;
	padding-right: 18px;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.25;
	color: var(--cipp-text);
}
.cipp__desc {
	margin: 0 0 10px;
	font-size: 12.5px;
	color: var(--cipp-text);
	opacity: 0.82;
	overflow-wrap: anywhere;
}
.cipp a.cipp__cta {
	display: inline-block;
	padding: 8px 16px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.04em;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	text-transform: uppercase;
	color: var(--cipp-btn-text);
	background: var(--cipp-btn);
	border: 1px solid rgba(255, 255, 255, 0.15);
	border-radius: 8px;
	transition: filter 0.2s ease, transform 0.2s ease;
}
.cipp a.cipp__cta:hover,
.cipp a.cipp__cta:focus-visible { filter: brightness(1.2); color: var(--cipp-btn-text); }

.cipp .cipp__close {
	position: absolute;
	top: 6px;
	right: 6px;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	margin: 0;
	padding: 0;
	font-size: 20px;
	line-height: 1;
	color: var(--cipp-text);
	background: rgba(0, 0, 0, 0.25);
	border: 0;
	border-radius: 50%;
	cursor: pointer;
	opacity: 0.85;
	box-shadow: none;
}
.cipp .cipp__close:hover { opacity: 1; background: rgba(0, 0, 0, 0.4); }
.cipp .cipp__close:focus-visible,
.cipp a.cipp__cta:focus-visible,
.cipp .cipp__dot:focus-visible {
	outline: 2px solid var(--cipp-text);
	outline-offset: 2px;
}

/* Slide dots. */
.cipp__dots {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0;
	padding: 0 0 6px;
}
.cipp .cipp__dot {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	margin: 0;
	padding: 0;
	background: transparent;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	cursor: pointer;
}
.cipp .cipp__dot::before {
	content: "";
	display: block;
	width: 7px;
	height: 7px;
	background: var(--cipp-text);
	border-radius: 999px;
	opacity: 0.35;
	transition: width 0.25s ease, opacity 0.25s ease;
}
.cipp .cipp__dot:hover::before { opacity: 0.6; }
.cipp .cipp__dot.is-active::before { width: 18px; opacity: 0.95; }

/* One-time attention cue on the visible button (never loops). */
.cipp.is-attn .cipp__slide.is-active a.cipp__cta { animation: cipp-pulse 1.2s ease-out 1 both; }
@keyframes cipp-pulse {
	0%   { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.5); transform: scale(1); }
	40%  { transform: scale(1.06); }
	100% { box-shadow: 0 0 0 12px rgba(255, 255, 255, 0); transform: scale(1); }
}

/* Static variant used in the admin live preview. */
.cipp--stage {
	position: relative;
	bottom: auto;
	left: auto;
	right: auto;
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transform: none;
}

/* Mobile: compact banner, lifted above the theme's bottom menu bar, all text visible. */
@media (max-width: 600px) {
	.cipp {
		bottom: calc(var(--cipp-offset-m, 80px) + env(safe-area-inset-bottom, 0px));
		max-height: calc(100vh - 150px);
		overflow-y: auto;
		font-size: 13px;
	}
	.cipp--left  { left: 12px; }
	.cipp--right { right: 12px; }
	.cipp--stage { bottom: auto; left: auto; right: auto; max-height: none; }
	.cipp__slide { min-height: 92px; }
	.cipp__media { flex-basis: 84px; }
	.cipp__body { padding: 10px 12px 12px; }
	.cipp__heading { font-size: 14px; }
	.cipp__desc { margin-bottom: 8px; }
	.cipp a.cipp__cta { padding: 8px 14px; }
	.cipp .cipp__close { width: 32px; height: 32px; }
}

@media (prefers-reduced-motion: reduce) {
	.cipp,
	.cipp__slide,
	.cipp .cipp__dot::before,
	.cipp a.cipp__cta { transition: none !important; }
	.cipp { transform: none; }
	.cipp__slide { transform: none; }
	.cipp.is-attn .cipp__slide.is-active a.cipp__cta { animation: none !important; }
}
