/*
 * WC Quantity Pricing Pro — Frontend Styles
 */

/* Offer banner shown next to the product price */
.wcqpp-offer-notice {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-top: 10px;
	padding: 8px 14px;
	background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
	border: 1px solid #f59e0b;
	border-radius: 6px;
	color: #78350f;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.3;
}
.wcqpp-offer-icon { font-size: 18px; }
.wcqpp-offer-text { font-weight: 600; }

.wcqpp-pricing-table {
	margin: 20px 0 24px;
	padding: 16px 18px;
	background: #f9fafb;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
}
.wcqpp-pt-title {
	margin: 0 0 12px;
	font-size: 15px;
	font-weight: 600;
	color: #111827;
}
.wcqpp-pt {
	width: 100%;
	border-collapse: collapse;
	background: #fff;
	border-radius: 6px;
	overflow: hidden;
	box-shadow: 0 1px 0 rgba(0,0,0,0.04);
}
.wcqpp-pt thead th {
	background: #f3f4f6;
	color: #374151;
	font-weight: 600;
	font-size: 12px;
	text-align: left;
	padding: 10px 12px;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}
.wcqpp-pt tbody td {
	padding: 10px 12px;
	border-top: 1px solid #f3f4f6;
	color: #1f2937;
	font-size: 14px;
}
.wcqpp-pt tbody tr:hover td { background: #fafbfc; }
.wcqpp-pt-savings {
	color: #059669;
	font-weight: 600;
}

/* Cart line savings badge */
.wcqpp-savings-badge {
	display: inline-block;
	margin-top: 4px;
	padding: 2px 8px;
	background: #d1fae5;
	color: #065f46;
	border-radius: 10px;
	font-size: 11px;
	font-weight: 600;
}

/* Countdown timer */
.wcqpp-countdown {
	margin-top: 12px;
	padding: 8px 12px;
	background: #fef3c7;
	border: 1px solid #fde68a;
	border-radius: 6px;
	color: #92400e;
	font-size: 13px;
	display: flex;
	align-items: center;
	gap: 6px;
}
.wcqpp-countdown-clock {
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

/* ----------------------------------------------------------
 * Cheers panel — appears inline below the add-to-cart button
 * when the chosen quantity triggers a discount.
 * -------------------------------------------------------- */
.wcqpp-cheers-inline {
	position: relative;
	margin: 18px 0 0;
	padding: 18px 50px 18px 22px;
	background: linear-gradient(135deg, #10b981 0%, #059669 100%);
	color: #fff;
	border-radius: 10px;
	box-shadow: 0 8px 24px -6px rgba(5, 150, 105, 0.5), 0 2px 8px -2px rgba(0,0,0,0.1);
	font-size: 16px;
	font-weight: 600;
	line-height: 1.45;
	display: flex;
	align-items: center;
	gap: 10px;
	max-width: 100%;
	opacity: 0;
	transform: translateY(-8px);
	transition: opacity 0.35s ease, transform 0.35s ease;
}
.wcqpp-cheers-inline.is-visible {
	opacity: 1;
	transform: translateY(0);
}
.wcqpp-cheers-inline.is-leaving {
	opacity: 0;
	transform: translateY(-8px);
}
.wcqpp-cheers-msg {
	display: block;
	flex: 1;
}

/* Server-rendered persistent panel: pulse once to grab attention after reload */
.wcqpp-cheers-inline.is-persistent {
	animation: wcqpp-cheers-pulse 1.6s ease-out 1;
}
@keyframes wcqpp-cheers-pulse {
	0%   { box-shadow: 0 8px 24px -6px rgba(5, 150, 105, 0.5), 0 0 0 0 rgba(16, 185, 129, 0.7); }
	60%  { box-shadow: 0 8px 24px -6px rgba(5, 150, 105, 0.5), 0 0 0 14px rgba(16, 185, 129, 0); }
	100% { box-shadow: 0 8px 24px -6px rgba(5, 150, 105, 0.5), 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Dismiss button */
.wcqpp-cheers-close {
	position: absolute;
	top: 50%;
	right: 14px;
	transform: translateY(-50%);
	width: 28px;
	height: 28px;
	border: 0;
	background: rgba(255, 255, 255, 0.18);
	color: #fff;
	font-size: 22px;
	line-height: 1;
	border-radius: 50%;
	cursor: pointer;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.15s ease;
}
.wcqpp-cheers-close:hover,
.wcqpp-cheers-close:focus {
	background: rgba(255, 255, 255, 0.32);
	outline: none;
}

/* ----------------------------------------------------------
 * Archive thumbnail badge — overlays product thumbnail in shop
 * and category pages, indicating an active quantity discount.
 * -------------------------------------------------------- */
/* The product loop item needs to be a positioning context so the
   absolutely-positioned badge anchors to the thumbnail area. */
.woocommerce ul.products li.product,
ul.products li.product,
.products li.product {
	position: relative;
}

.wcqpp-archive-badge {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 5;
	display: inline-flex;
	flex-direction: column;
	align-items: flex-start;
	padding: 6px 10px;
	background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
	color: #fff;
	border-radius: 6px;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: 0.01em;
	box-shadow: 0 4px 10px -2px rgba(217, 119, 6, 0.4);
	pointer-events: none;
}
.wcqpp-archive-badge-main {
	display: block;
}
.wcqpp-archive-badge-sub {
	display: block;
	margin-top: 2px;
	font-size: 10px;
	font-weight: 600;
	opacity: 0.92;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

/* Don't fight other on-sale badges — stack our badge below WC's */
.woocommerce ul.products li.product .onsale + .wcqpp-archive-badge,
ul.products li.product .onsale + .wcqpp-archive-badge {
	top: 50px;
}
