/* ═══════════════════════════════════════════════════════════════════════
   WC Category Offer — Frontend v1.3
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Notice containers ────────────────────────────────────────────────── */
.wcco-notices                { margin-bottom: 18px; }
.wcco-notices--mini          { padding: 4px 0 8px; }
.wcco-notices--shop          { margin-bottom: 24px; }
.wcco-notices--product       { margin-bottom: 16px; }

/* ── Badge base (coupon ticket style) ────────────────────────────────── */
.wcco-badge {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 18px 10px 20px;
	border-radius: 10px;
	border: 1.5px dashed;
	margin-bottom: 8px;
	font-size: .88rem;
	line-height: 1.4;
	position: relative;
	overflow: visible;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.wcco-badge:hover {
	transform: translateY(-1px);
	box-shadow: 0 4px 14px rgba(0,0,0,.09);
}

/* Coupon notch cut-outs */
.wcco-badge::before,
.wcco-badge::after {
	content: '';
	position: absolute;
	width: 14px;
	height: 14px;
	border-radius: 50%;
	top: 50%;
	transform: translateY(-50%);
	background: #fff;
	z-index: 1;
}
.wcco-badge::before { left: -7px; }
.wcco-badge::after  { right: -7px; }

/* Applied — deep green, white text */
.wcco-badge--applied {
	background: #166534;
	border-color: #15803d;
	color: #ffffff;
}
.wcco-badge--applied::before,
.wcco-badge--applied::after {
	background: #f8fafc;
	box-shadow: inset 0 0 0 1.5px #15803d;
}
.wcco-badge--applied .wcco-badge-name {
	color: #bbf7d0;
	opacity: 1;
}
.wcco-badge--applied .wcco-badge-nudge {
	background: rgba(255,255,255,.15);
	color: #fff;
}

/* Progress — deep amber, white text */
.wcco-badge--progress {
	background: #92400e;
	border-color: #d97706;
	color: #ffffff;
}
.wcco-badge--progress::before,
.wcco-badge--progress::after {
	background: #f8fafc;
	box-shadow: inset 0 0 0 1.5px #d97706;
}
.wcco-badge--progress .wcco-badge-name {
	color: #fde68a;
	opacity: 1;
}
.wcco-badge--progress .wcco-badge-label strong {
	color: #fef08a;
}

/* Promo — deep blue, white text */
.wcco-badge--promo {
	background: #1e3a8a;
	border-color: #3b82f6;
	color: #ffffff;
}
.wcco-badge--promo::before,
.wcco-badge--promo::after {
	background: #f8fafc;
	box-shadow: inset 0 0 0 1.5px #3b82f6;
}
.wcco-badge--promo .wcco-badge-cat {
	color: #bfdbfe;
	opacity: 1;
}

/* Badge internals — all text forced white so themes can't override */
.wcco-badge .wcco-badge-icon     { font-size: 1.3rem !important; flex-shrink: 0; line-height: 1; }
.wcco-badge .wcco-badge-body     { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.wcco-badge .wcco-badge-name     { font-size: .72rem !important; font-weight: 700 !important; text-transform: uppercase; letter-spacing: .05em; color: inherit !important; }
.wcco-badge .wcco-badge-label    { font-weight: 500 !important; color: #fff !important; }
.wcco-badge .wcco-badge-label *  { color: inherit !important; }
.wcco-badge .wcco-badge-label em { font-style: italic !important; font-weight: 700 !important; color: #fff !important; }
.wcco-badge .wcco-badge-cat      { font-size: .8rem; margin-left: 4px; color: inherit !important; }
.wcco-badge .wcco-badge-nudge {
	display: inline-block;
	font-size: .76rem !important;
	font-weight: 600 !important;
	border-radius: 20px;
	padding: 2px 9px;
	margin-top: 3px;
	white-space: normal;
	color: #fff !important;
}
/* Applied state overrides */
.wcco-badge--applied .wcco-badge-name  { color: #bbf7d0 !important; }
.wcco-badge--applied .wcco-badge-nudge { background: rgba(255,255,255,.15) !important; color: #fff !important; }
/* Progress state overrides */
.wcco-badge--progress .wcco-badge-name { color: #fde68a !important; }
.wcco-badge--progress .wcco-badge-label strong { color: #fef08a !important; font-weight: 800 !important; }
/* Promo state overrides */
.wcco-badge--promo .wcco-badge-name { color: #bfdbfe !important; }

/* Mini-cart — slimmer */
.wcco-notices--mini .wcco-badge        { padding: 7px 12px; font-size: .81rem; border-radius: 8px; }
.wcco-notices--mini .wcco-badge::before,
.wcco-notices--mini .wcco-badge::after { display: none; }

/* ════════════════════════════════════════════════════════════════════════
   CART ITEM ROW — GROUP HIGHLIGHTS
   ════════════════════════════════════════════════════════════════════════ */

/* Offer rows — subtle left stripe only, no distracting background */
tr.wcco-offer-highlight > td {
	background-color: transparent !important;
	border-top: none !important;
	border-bottom: none !important;
}
tr.wcco-offer-highlight > td:first-child {
	border-left: 3px solid #16a34a !important;
}
tr.wcco-offer-highlight--last > td:first-child {
	border-left: 3px solid #16a34a !important;
}

/* ── Product title offer pill ─────────────────────────────────────────── */
.wcco-item-offer-pill {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	margin-top: 5px;
	margin-left: 0;
	padding: 3px 10px 3px 7px;
	background: #15803d;
	color: #fff !important;
	border-radius: 20px;
	font-size: .72rem !important;
	font-weight: 700 !important;
	letter-spacing: .02em;
	white-space: nowrap;
	vertical-align: middle;
	box-shadow: 0 1px 4px rgba(21,128,61,.25);
	animation: wcco-pill-pop 0.3s cubic-bezier(0.34,1.56,0.64,1) both;
}
@keyframes wcco-pill-pop {
	from { transform: scale(0.7); opacity: 0; }
	to   { transform: scale(1);   opacity: 1; }
}
.wcco-item-offer-pill .wcco-item-offer-pill-tick {
	font-size: .8rem;
	line-height: 1;
}
/* Make the pill sit on its own line below the product name */
.product-name .wcco-item-offer-pill,
td.product-name .wcco-item-offer-pill,
.woocommerce-cart-item__name .wcco-item-offer-pill {
	display: flex;
	width: fit-content;
}

/* ── Group badge row ──────────────────────────────────────────────────── */
tr.wcco-group-badge-row > td.wcco-group-badge-cell {
	padding: 0 !important;
	background: transparent !important;
	border: none !important;
}

.wcco-group-badge {
	display: flex;
	align-items: center;
	gap: 12px;
	background: #15803d;
	color: #ffffff;
	padding: 10px 20px;
	font-size: .875rem;
	font-weight: 600;
	position: relative;
	overflow: hidden;
}

/* Shimmer */
.wcco-group-badge::after {
	content: '';
	position: absolute;
	top: 0; left: -100%; width: 55%; height: 100%;
	background: linear-gradient(90deg, transparent, rgba(255,255,255,.18), transparent);
	animation: wcco-shimmer 2.4s ease infinite;
}
@keyframes wcco-shimmer {
	0%   { left: -100%; }
	60%  { left: 160%; }
	100% { left: 160%; }
}

.wcco-group-badge-tick        { font-size: 1.1rem; flex-shrink: 0; color: #fff !important; }
.wcco-group-badge-text        { flex: 1; color: #fff !important; }
.wcco-group-badge-text *      { color: #fff !important; }
.wcco-group-badge-text strong { font-weight: 800; color: #fff !important; }

.wcco-group-badge-pill {
	font-size: .68rem;
	font-weight: 800;
	letter-spacing: .09em;
	text-transform: uppercase;
	border: 1.5px solid rgba(255,255,255,.7);
	border-radius: 20px;
	padding: 3px 11px;
	color: #fff;
	white-space: nowrap;
	flex-shrink: 0;
	background: rgba(255,255,255,.12);
}

/* ════════════════════════════════════════════════════════════════════════
   CONGRATULATIONS POPUP + CONFETTI
   ════════════════════════════════════════════════════════════════════════ */

#wcco-popup-overlay {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: none;
	opacity: 0;
	transition: opacity 0.3s ease;
}
#wcco-popup-overlay.wcco-popup-visible {
	opacity: 1;
	pointer-events: auto;
}
#wcco-popup-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0,0,0,.4);
	z-index: 1;
	opacity: 0;
	transition: opacity 0.3s ease;
}
#wcco-popup-overlay.wcco-popup-visible #wcco-popup-backdrop { opacity: 1; }

#wcco-popup-box {
	position: relative;
	z-index: 2;
	background: #fff;
	border-radius: 20px;
	padding: 34px 38px 28px;
	text-align: center;
	max-width: 340px;
	width: calc(100vw - 40px);
	box-shadow: 0 24px 64px rgba(0,0,0,.24);
	transform: scale(0.7) translateY(30px);
	transition: transform 0.42s cubic-bezier(0.34, 1.56, 0.64, 1);
}
#wcco-popup-overlay.wcco-popup-visible #wcco-popup-box {
	transform: scale(1) translateY(0);
}

.wcco-popup-emoji {
	display: block;
	font-size: 3.2rem;
	line-height: 1;
	margin-bottom: 12px;
	animation: wcco-bounce 0.6s ease 0.3s both;
}
@keyframes wcco-bounce {
	0%   { transform: scale(0) rotate(-15deg); }
	60%  { transform: scale(1.3) rotate(5deg); }
	80%  { transform: scale(0.9) rotate(-3deg); }
	100% { transform: scale(1) rotate(0); }
}
.wcco-popup-title {
	margin: 0 0 6px;
	font-size: 1.4rem;
	font-weight: 800;
	color: #14532d;
}
.wcco-popup-offer {
	margin: 0 0 6px;
	font-size: 1rem;
	font-weight: 700;
	color: #15803d;
}
.wcco-popup-sub {
	margin: 0 0 22px;
	font-size: .82rem;
	color: #777;
}
.wcco-popup-close {
	background: #15803d;
	color: #fff;
	border: none;
	border-radius: 50px;
	padding: 11px 32px;
	font-size: .9rem;
	font-weight: 700;
	cursor: pointer;
	transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
	box-shadow: 0 4px 14px rgba(21,128,61,.3);
}
.wcco-popup-close:hover {
	background: #166534;
	transform: scale(1.05);
	box-shadow: 0 6px 20px rgba(21,128,61,.4);
}

/* ── Confetti ─────────────────────────────────────────────────────────── */
.wcco-confetti-piece {
	position: fixed;
	z-index: 1000000;
	pointer-events: none;
	border-radius: 2px;
	animation: wcco-fall linear forwards;
}
@keyframes wcco-fall {
	0%   { transform: translateY(-20px) rotate(0deg);   opacity: 1; }
	80%  { opacity: 1; }
	100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

/* ════════════════════════════════════════════════════════════════════════
   CATEGORY LINK / CHIP STYLES
   ════════════════════════════════════════════════════════════════════════ */

/* Inline link inside badge text (progress nudge, promo) */
a.wcco-cat-inline,
.wcco-cat-from a.wcco-cat-inline {
	color: #fff !important;
	text-decoration: underline;
	text-decoration-style: dashed;
	text-underline-offset: 2px;
	font-weight: 700;
	transition: opacity 0.15s;
}
a.wcco-cat-inline:hover { opacity: .75; }

/* Chip floated to the right of the badge */
/* Force white on category inline references */
.wcco-badge .wcco-cat-from,
.wcco-badge .wcco-cat-from strong,
.wcco-badge .wcco-cat-from a  { color: #fff !important; }

.wcco-badge-cat-chip {
	margin-left: auto;
	flex-shrink: 0;
	align-self: center;
}

/* Force white on ALL text inside any category chip/plain span */
.wcco-badge .wcco-cat-plain,
.wcco-badge .wcco-badge-cat-chip,
.wcco-badge .wcco-badge-cat-chip *,
.wcco-badge .wcco-badge-cat-chip a,
.wcco-badge .wcco-badge-cat-chip span { color: #fff !important; }

/* The actual chip link — always white, badge bg handles contrast */
a.wcco-cat-link {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: .75rem;
	font-weight: 700;
	text-decoration: none;
	border-radius: 20px;
	padding: 4px 11px;
	transition: background 0.15s, color 0.15s, transform 0.12s;
	white-space: nowrap;
	letter-spacing: .02em;
	color: #fff !important;
}
a.wcco-cat-link .wcco-cat-arrow { color: #fff !important; }
a.wcco-cat-link span            { color: #fff !important; }
.wcco-cat-arrow { font-style: normal; font-size: .8em; }

/* Applied state chip */
.wcco-badge--applied a.wcco-cat-link {
	background: rgba(255,255,255,.18);
	color: #fff;
	border: 1px solid rgba(255,255,255,.45);
}
.wcco-badge--applied a.wcco-cat-link:hover {
	background: rgba(255,255,255,.28);
	transform: translateX(2px);
}

/* Progress state chip (no chip on progress — inline link used instead) */

/* Promo state chip */
.wcco-badge--promo a.wcco-cat-link {
	background: rgba(255,255,255,.18);
	color: #fff;
	border: 1px solid rgba(255,255,255,.4);
}
.wcco-badge--promo a.wcco-cat-link:hover {
	background: rgba(255,255,255,.28);
	transform: translateX(2px);
}

/* Upgrade badge chip */
.wcco-badge--upgrade a.wcco-cat-link {
	background: rgba(255,255,255,.15);
	color: #fff !important;
	border: 1px solid rgba(255,255,255,.5);
}
.wcco-badge--upgrade a.wcco-cat-link:hover {
	background: rgba(255,255,255,.25);
	transform: translateX(2px);
}
.wcco-badge--upgrade .wcco-cat-plain { color: #fff !important; }

/* Mini-cart — hide chip to save space */
.wcco-notices--mini .wcco-badge-cat-chip { display: none; }

/* ════════════════════════════════════════════════════════════════════════
   MINI CART — SAVINGS SUMMARY BOX + SAVINGS TAG IN BADGE
   ════════════════════════════════════════════════════════════════════════ */

/* "You save ₹X" tag inside the applied badge (mini cart only) */
.wcco-badge .wcco-badge-savings {
	display: block;
	font-size: .77rem !important;
	font-weight: 700 !important;
	color: #bbf7d0 !important;
	margin-top: 3px;
}
.wcco-badge .wcco-badge-savings * { color: #bbf7d0 !important; }
.wcco-badge .wcco-badge-savings .woocommerce-Price-amount { color: #bbf7d0 !important; }

/* Savings summary block above mini cart buttons */
.wcco-mini-savings {
	background: #14532d;
	border-top: 2px solid #16a34a;
	padding: 10px 16px;
	margin: 8px 0 0;
}
.wcco-mini-savings-head {
	font-size: .72rem !important;
	font-weight: 800 !important;
	text-transform: uppercase;
	letter-spacing: .07em;
	color: #86efac !important;
	margin-bottom: 5px;
}
.wcco-mini-savings-body { margin-bottom: 5px; }
.wcco-mini-saving-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: .8rem !important;
	color: #fff !important;
	padding: 2px 0;
}
.wcco-mini-saving-row * { color: #fff !important; }
.wcco-mini-saving-row strong { font-weight: 700 !important; color: #fff !important; }
.wcco-mini-savings-total {
	border-top: 1px solid rgba(255,255,255,.2);
	padding-top: 5px;
	font-size: .82rem !important;
	font-weight: 600 !important;
	color: #4ade80 !important;
	display: flex;
	justify-content: space-between;
}
.wcco-mini-savings-total * { color: #4ade80 !important; }
.wcco-mini-savings-total strong { color: #4ade80 !important; font-weight: 800 !important; }

/* ── Upgrade nudge badge (offer available if customer adds more items) ── */
.wcco-badge--upgrade {
	background: #92400e;
	border-color: #d97706;
	color: #ffffff;
}
.wcco-badge--upgrade::before,
.wcco-badge--upgrade::after {
	background: #f8fafc;
	box-shadow: inset 0 0 0 1.5px #d97706;
}
.wcco-badge--upgrade .wcco-badge-name   { color: #fde68a !important; }
.wcco-badge--upgrade .wcco-badge-label  { color: #fff !important; }
.wcco-badge--upgrade .wcco-badge-label * { color: #fff !important; }
.wcco-badge--upgrade .wcco-badge-label strong { color: #fef08a !important; font-weight: 800 !important; }
.wcco-badge--upgrade .wcco-badge-label em     { color: #fde68a !important; font-style: italic !important; }
.wcco-badge--upgrade .wcco-cat-from,
.wcco-badge--upgrade .wcco-cat-from a,
.wcco-badge--upgrade .wcco-cat-from strong  { color: #fff !important; }

/* Promo badge category suffix "(Tops)" */
.wcco-badge--promo .wcco-promo-cat {
	font-size: .78rem !important;
	opacity: .7;
	color: #bfdbfe !important;
	margin-left: 3px;
}

/* ── Info note below offer badges ─────────────────────────────────────── */
.wcco-offers-note {
	font-size: .78rem !important;
	color: #64748b !important;
	margin: -4px 0 14px !important;
	padding: 0 2px !important;
	display: flex;
	align-items: flex-start;
	gap: 5px;
	line-height: 1.5;
}
.wcco-offers-note .wcco-offers-note-icon { flex-shrink: 0; font-size: .9rem; }
