/* WooCommerce Upgrade Offers — self-contained popup styles (beat theme button CSS) */

.uo-upgrade-popup-root {
	position: relative;
	z-index: 100000;
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	line-height: 1.45;
	color: #111827;
	box-sizing: border-box;
}

.uo-upgrade-popup-root *,
.uo-upgrade-popup-root *::before,
.uo-upgrade-popup-root *::after {
	box-sizing: border-box;
}

body.uo-popup-open {
	overflow: hidden;
}

.uo-popup[hidden] {
	display: none !important;
}

.uo-popup--desktop,
.uo-popup--mobile {
	position: fixed;
	inset: 0;
	z-index: 100001;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
}

.uo-popup__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(17, 24, 39, 0.55);
	backdrop-filter: blur(2px);
}

.uo-popup__dialog {
	position: relative;
	z-index: 1;
	width: min(520px, calc(100vw - 2rem));
	max-height: min(90vh, 720px);
	overflow: auto;
	background: #fff;
	color: #111827;
	border-radius: 16px;
	padding: 1.75rem 1.5rem 1.5rem;
	box-shadow:
		0 0 0 1px rgba(15, 23, 42, 0.06),
		0 24px 48px rgba(15, 23, 42, 0.22);
	animation: uo-pop-in 180ms ease-out;
}

@keyframes uo-pop-in {
	from {
		opacity: 0;
		transform: translateY(8px) scale(0.98);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

.uo-popup__dialog--fullscreen {
	width: 100%;
	height: 100%;
	max-height: none;
	border-radius: 0;
	padding: 1.5rem 1.25rem 2rem;
}

.uo-popup__close {
	position: absolute !important;
	top: 0.85rem !important;
	right: 0.85rem !important;
	width: 2rem !important;
	height: 2rem !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 999px !important;
	background: #f3f4f6 !important;
	color: #374151 !important;
	font-size: 1.25rem !important;
	line-height: 1 !important;
	cursor: pointer !important;
	box-shadow: none !important;
	text-decoration: none !important;
}

.uo-popup__close:hover {
	background: #e5e7eb !important;
	color: #111827 !important;
}

/* Offer body */
.uo-offer {
	display: flex;
	flex-direction: column;
	gap: 1.1rem;
	padding-right: 0.5rem;
}

.uo-offer__header {
	padding-right: 1.75rem;
}

.uo-offer__eyebrow {
	margin: 0 0 0.35rem;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #0f766e;
}

.uo-offer__title {
	margin: 0 !important;
	padding: 0 !important;
	font-size: 1.35rem !important;
	font-weight: 700 !important;
	line-height: 1.25 !important;
	letter-spacing: -0.02em;
	color: #111827 !important;
}

.uo-offer__message {
	margin: 0;
	font-size: 0.98rem;
	font-weight: 600;
	color: #374151;
}

/* Products */
.uo-offer__products {
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.uo-offer__product {
	display: flex !important;
	align-items: center !important;
	gap: 0.85rem !important;
	margin: 0 !important;
	padding: 0.75rem !important;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	background: #f9fafb;
	position: relative;
}

.uo-offer__product img {
	width: 64px !important;
	height: 64px !important;
	border-radius: 8px;
	object-fit: cover;
	flex-shrink: 0;
	background: #fff;
}

.uo-offer__product-meta {
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
	min-width: 0;
}

.uo-offer__product-meta strong {
	font-size: 0.95rem;
	font-weight: 650;
	color: #111827;
}

.uo-offer__price {
	font-size: 0.9rem;
	color: #4b5563;
}

.uo-offer__price .woocommerce-Price-amount,
.uo-offer__price bdi {
	font-weight: 600;
	color: #111827;
}

.uo-offer__price del,
.uo-offer__total-old {
	opacity: 0.65;
	margin-right: 0.35rem;
	text-decoration: line-through;
	font-weight: 500;
	color: #6b7280;
}

.uo-offer__price ins,
.uo-offer__total-new {
	text-decoration: none;
	font-weight: 700;
	color: #111827;
}

/* Bundle: compact horizontal FBT-style row */
.uo-offer__products--bundle {
	flex-direction: row !important;
	flex-wrap: wrap;
	align-items: stretch;
	justify-content: center;
	gap: 0.35rem 0.25rem;
}

.uo-offer__products--bundle .uo-offer__product {
	flex: 1 1 120px;
	max-width: 160px;
	flex-direction: column !important;
	align-items: center !important;
	text-align: center;
	gap: 0.55rem !important;
	padding: 0.7rem 0.55rem !important;
	background: #fff;
}

.uo-offer__products--bundle .uo-offer__product img {
	width: 72px !important;
	height: 72px !important;
}

.uo-offer__products--bundle .uo-offer__product-meta {
	align-items: center;
}

.uo-offer__products--bundle .uo-offer__product-meta strong {
	font-size: 0.85rem;
	line-height: 1.3;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.uo-offer__plus {
	display: flex !important;
	align-items: center;
	justify-content: center;
	align-self: center;
	width: 1.5rem;
	height: 1.5rem;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	background: transparent !important;
	color: #0f766e;
	font-size: 1.15rem;
	font-weight: 700;
	line-height: 1;
	list-style: none !important;
}

.uo-offer__totals {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.25rem;
	padding: 0.85rem 1rem;
	border-radius: 12px;
	background: #f0fdfa;
	border: 1px solid #ccfbf1;
	text-align: center;
}

.uo-offer__total-price {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: center;
	gap: 0.35rem;
	font-size: 1.15rem;
}

.uo-offer__total-new .woocommerce-Price-amount,
.uo-offer__total-new bdi {
	font-size: 1.25rem;
	font-weight: 800;
	color: #0f766e;
}

.uo-offer__savings {
	margin: 0 !important;
	font-size: 0.95rem;
	font-weight: 700;
	color: #0f766e;
}

.uo-offer__products--grid {
	display: grid !important;
	grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	gap: 0.75rem;
}

.uo-offer__select {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
	cursor: pointer;
	height: 100%;
}

.uo-offer__select input[type="checkbox"] {
	margin: 0;
	align-self: flex-start;
}

/* Deal progress */
.uo-offer__progress {
	display: flex;
	flex-direction: column;
	gap: 0.45rem;
}

.uo-offer__progress-meta {
	display: flex;
	justify-content: space-between;
	gap: 0.75rem;
	font-size: 0.8rem;
	font-weight: 600;
	color: #6b7280;
}

.uo-offer__progress-track {
	width: 100%;
	height: 10px;
	border-radius: 999px;
	background: #e5e7eb;
	overflow: hidden;
}

.uo-offer__progress-fill {
	height: 100%;
	border-radius: 999px;
	background: linear-gradient(90deg, #0f766e, #14b8a6);
	transition: width 200ms ease;
	min-width: 0;
}

/* Actions — fully override theme .button styles */
.uo-offer__actions {
	display: flex;
	flex-direction: column;
	gap: 0.55rem;
	margin-top: 0.25rem;
}

.uo-offer__accept,
.uo-upgrade-popup-root .uo-offer__accept.button,
.uo-upgrade-popup-root .uo-offer__accept.button.alt,
.uo-upgrade-popup-root button.uo-offer__accept {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 100% !important;
	min-height: 48px !important;
	height: auto !important;
	margin: 0 !important;
	padding: 0.85rem 1.1rem !important;
	border: 0 !important;
	border-radius: 10px !important;
	background: #0f766e !important;
	color: #fff !important;
	font-size: 1rem !important;
	font-weight: 700 !important;
	letter-spacing: 0.01em;
	line-height: 1.2 !important;
	text-align: center !important;
	text-decoration: none !important;
	text-indent: 0 !important;
	text-transform: none !important;
	white-space: normal !important;
	overflow: visible !important;
	cursor: pointer !important;
	box-shadow: none !important;
	appearance: none !important;
	-webkit-appearance: none !important;
}

.uo-offer__accept .uo-offer__btn-label,
.uo-upgrade-popup-root .uo-offer__accept .uo-offer__btn-label {
	display: inline !important;
	color: #fff !important;
	font-size: 1rem !important;
	font-weight: 700 !important;
	line-height: 1.2 !important;
	opacity: 1 !important;
	visibility: visible !important;
	text-indent: 0 !important;
	text-transform: none !important;
}

.uo-offer__accept:hover,
.uo-upgrade-popup-root .uo-offer__accept.button:hover,
.uo-upgrade-popup-root .uo-offer__accept.button.alt:hover {
	background: #0d9488 !important;
	color: #fff !important;
}

.uo-offer__decline,
.uo-upgrade-popup-root button.uo-offer__decline {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 100% !important;
	min-height: 40px !important;
	margin: 0 !important;
	padding: 0.55rem 0.75rem !important;
	border: 0 !important;
	border-radius: 8px !important;
	background: transparent !important;
	color: #6b7280 !important;
	font-size: 0.92rem !important;
	font-weight: 600 !important;
	text-decoration: underline !important;
	text-underline-offset: 2px;
	text-indent: 0 !important;
	cursor: pointer !important;
	box-shadow: none !important;
	appearance: none !important;
}

.uo-offer__decline .uo-offer__btn-label {
	color: inherit !important;
	font-size: inherit !important;
	font-weight: inherit !important;
	text-decoration: inherit !important;
}

.uo-offer__decline:hover {
	color: #111827 !important;
	background: #f9fafb !important;
	text-decoration: underline !important;
}

@media (max-width: 768px) {
	.uo-popup--desktop {
		display: none !important;
	}

	.uo-offer__products--bundle .uo-offer__product {
		max-width: 140px;
	}
}

@media (min-width: 769px) {
	.uo-popup--mobile {
		display: none !important;
	}
}
