/* Thim UpSell Frontend Styles */

/* 1. Upsell Progress Bar (Mini-Cart, Cart, Checkout) */
.thim-upsell-progress-container {
	display: flex;
	flex-direction: column;
	gap: 12px;
	width: 100%;
	box-sizing: border-box;
}

/* Context: Mini-Cart (under header, above cart body) */
.thim-upsell-progress-container.thim-upsell-context-minicart {
	padding: 14px 20px 16px 20px;
	background: #ffffff;
	border-bottom: 1px solid #f1f5f9;
	flex: 0 0 auto;
}

/* Context: Cart & Checkout pages */
.thim-upsell-progress-container.thim-upsell-context-cart,
.thim-upsell-progress-container.thim-upsell-context-checkout {
	margin: 0 0 24px 0;
	padding: 16px 20px;
	background: #ffffff;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
	animation: thimSlideDown 0.3s ease-out;
}

.thim-upsell-progress-item {
	display: flex;
	flex-direction: column;
	gap: 8px;
	width: 100%;
}

.thim-upsell-progress-text {
	font-size: 14px;
	line-height: 1.45;
	color: #111827;
	font-weight: 400;
	margin: 0;
}

.thim-upsell-progress-text strong,
.thim-upsell-progress-text b,
.thim-upsell-progress-text .amount {
	font-weight: 700;
	color: inherit;
}

.thim-upsell-progress-bar {
	position: relative;
	width: 100%;
	height: 6px;
	background-color: #e5e7eb;
	border-radius: 9999px;
	overflow: hidden;
}

.thim-upsell-progress-fill {
	height: 100%;
	background-color: var(--thim-body_primary_color, #c41230);
	border-radius: 9999px;
	transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
	min-width: 0;
}

/* Unlocked State */
.thim-upsell-progress-item.is-unlocked .thim-upsell-progress-text {
	color: #065f46;
}

.thim-upsell-progress-item.is-unlocked .thim-upsell-progress-fill {
	background-color: #10b981;
}

/* Legacy Cart / Checkout Notice Banners */
.thim-upsell-cart-notices {
	margin: 0 0 24px 0;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.thim-upsell-notice-banner {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 14px 20px;
	border-radius: 10px;
	font-size: 14px;
	line-height: 1.5;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
	animation: thimSlideDown 0.3s ease-out;
}

@keyframes thimSlideDown {
	from {
		opacity: 0;
		transform: translateY(-8px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.thim-upsell-svg-icon {
	display: inline-block;
	vertical-align: middle;
	flex-shrink: 0;
}

.thim-upsell-notice-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.thim-upsell-notice-info {
	background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
	border: 1px solid #93c5fd;
	color: #1e40af;
}

.thim-upsell-notice-info .thim-upsell-notice-icon svg {
	color: #2563eb;
	stroke: #2563eb;
}

.thim-upsell-notice-success {
	background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
	border: 1px solid #6ee7b7;
	color: #065f46;
}

.thim-upsell-notice-success .thim-upsell-notice-icon svg {
	color: #059669;
	stroke: #059669;
}

.thim-upsell-notice-content strong {
	font-weight: 700;
	color: inherit;
}

/* 2. Voucher Card on Thank You & View Order Pages */
.thim-upsell-voucher-container {
	margin: 32px 0 40px 0;
	background: #ffffff;
	border-radius: 16px;
	border: 1px solid #e2e8f0;
	padding: 24px;
	box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
}

.thim-upsell-voucher-header {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 20px;
	padding-bottom: 14px;
	border-bottom: 1px dashed #cbd5e1;
}

.thim-upsell-gift-icon {
	font-size: 26px;
	line-height: 1;
}

.thim-upsell-voucher-header h3 {
	margin: 0;
	font-size: 18px;
	font-weight: 700;
	color: #0f172a;
}

.thim-upsell-vouchers-list {
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.thim-upsell-voucher-card {
	display: flex;
	background: linear-gradient(135deg, #fafafa 0%, #f4f6f8 100%);
	border: 2px dashed #0284c7;
	border-radius: 12px;
	overflow: hidden;
	position: relative;
	box-shadow: 0 4px 12px rgba(2, 132, 199, 0.06);
	transition: transform 0.2s, box-shadow 0.2s;
}

.thim-upsell-voucher-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 20px rgba(2, 132, 199, 0.12);
}

.thim-upsell-card-left {
	background: #0284c7;
	color: #ffffff;
	padding: 20px;
	min-width: 170px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	text-align: center;
	position: relative;
}

.thim-upsell-badge {
	font-size: 10px;
	text-transform: uppercase;
	letter-spacing: 1px;
	background: rgba(255, 255, 255, 0.2);
	padding: 3px 8px;
	border-radius: 20px;
	font-weight: 700;
	margin-bottom: 8px;
}

.thim-upsell-discount-big {
	font-size: 24px;
	font-weight: 800;
	line-height: 1.1;
	margin-bottom: 6px;
	text-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.thim-upsell-expiry {
	font-size: 11px;
	opacity: 0.9;
}

.thim-upsell-card-right {
	padding: 20px 24px;
	flex-grow: 1;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.thim-upsell-voucher-message {
	margin: 0 0 14px 0;
	font-size: 15px;
	color: #334155;
	font-weight: 500;
}

.thim-upsell-code-wrap {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 14px;
}

.thim-upsell-code-input {
	background: #ffffff !important;
	border: 1px solid #cbd5e1 !important;
	border-radius: 8px !important;
	padding: 8px 16px !important;
	font-family: Menlo, Monaco, Consolas, "Courier New", monospace !important;
	font-size: 16px !important;
	font-weight: 700 !important;
	letter-spacing: 1.5px !important;
	color: #0284c7 !important;
	width: auto !important;
	max-width: 220px !important;
	text-align: center !important;
	box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05) !important;
}

.thim-upsell-copy-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: #0284c7;
	color: #ffffff;
	border: none;
	padding: 9px 18px;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s, transform 0.1s;
}

.thim-upsell-copy-btn:hover {
	background: #0369a1;
	color: #ffffff;
}

.thim-upsell-copy-btn:active {
	transform: scale(0.97);
}

.thim-upsell-copy-btn.copied {
	background: #10b981;
}

.thim-upsell-target-products {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
	font-size: 13px;
	margin-top: 4px;
}

.thim-upsell-target-label {
	color: #64748b;
	font-weight: 600;
}

.thim-upsell-product-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.thim-upsell-product-chip {
	display: inline-flex;
	align-items: center;
	background: #ffffff;
	border: 1px solid #cbd5e1;
	color: #0284c7;
	padding: 4px 12px;
	border-radius: 16px;
	font-size: 12px;
	font-weight: 600;
	text-decoration: none;
	transition: all 0.2s ease;
}

.thim-upsell-product-chip:hover {
	background: #0284c7;
	color: #ffffff;
	border-color: #0284c7;
}

.thim-upsell-target-text {
	margin: 0;
	font-size: 13px;
	color: #64748b;
}

@media (max-width: 768px) {
	.thim-upsell-voucher-card {
		flex-direction: column;
	}

	.thim-upsell-card-left {
		min-width: 100%;
		border-bottom: 2px dashed rgba(255, 255, 255, 0.4);
	}

	.thim-upsell-code-wrap {
		flex-direction: column;
		align-items: stretch;
	}

	.thim-upsell-code-input {
		max-width: 100% !important;
	}
}
