/* TOA Product Combo — combo_offer editable single page (list + completeness + swap modal). */

/* The JS shows/hides the per-item "Save" tag and the right-box was/saving lines
   via the [hidden] attribute. Several of those elements set their own `display`
   (e.g. .toa-offer-item__save is inline-block), which beats the UA [hidden] rule
   and would leave a stale tag visible after a swap to a no-discount item.
   Restore the contract: a [hidden] element inside the widget stays hidden. */
[data-toa-offer] [hidden] {
	display: none !important;
}

/* ---- Left: "Your Combo" editable list ---- */
.toa-offer {
	margin: 0;
}

.toa-offer__title {
	font-family: "Cormorant Garamond", Georgia, serif;
	font-size: 30px;
	font-weight: 700;
	color: var(--toa-text-dark, #1a1a1a);
	margin: 0 0 16px;
}

.toa-offer__tip {
	display: flex;
	gap: 10px;
	background: #f8fafc;
	border: 1px solid #e8edf2;
	border-radius: 12px;
	padding: 14px 16px;
	font-family: "DM Sans", system-ui, sans-serif;
	font-size: 13.5px;
	line-height: 1.5;
	color: #5a6473;
	margin-bottom: 18px;
}

.toa-offer__tip b {
	color: #3a424e;
}

.toa-offer__list {
	background: #f7f8fa;
	border-radius: 16px;
	padding: 14px;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

/* Item card */
.toa-offer-item {
	position: relative;
	display: flex;
	align-items: center;
	gap: 18px;
	background: #fff;
	border: 1px solid #eef0f3;
	border-radius: 14px;
	padding: 24px 20px;
}

.toa-offer-item__media {
	flex: 0 0 84px;
}

.toa-offer-item__media img {
	width: 84px;
	height: 84px;
	object-fit: contain;
	display: block;
}

.toa-offer-item__body {
	flex: 1 1 auto;
	min-width: 0;
}

.toa-offer-item__name {
	font-family: "DM Sans", system-ui, sans-serif;
	font-size: 17px;
	font-weight: 700;
	color: #1f2430;
	margin: 0 0 2px;
}

.toa-offer-item__variant {
	font-size: 13px;
	color: #9aa3af;
	margin-bottom: 14px;
}

.toa-offer-item__actions {
	display: flex;
	align-items: center;
	gap: 16px;
}

.toa-offer-item__swap {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: #fff;
	border: 1px solid #e2c9a0;
	color: #b4690e;
	font-family: "DM Sans", system-ui, sans-serif;
	font-size: 14px;
	font-weight: 600;
	padding: 9px 16px;
	border-radius: 8px;
	cursor: pointer;
	transition: border-color 0.15s ease, background 0.15s ease;
}

.toa-offer-item__swap:hover {
	border-color: #b4690e;
	background: #fff8ef;
}

.toa-offer-item__remove {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: none;
	border: 0;
	color: #d9382f;
	cursor: pointer;
	font-family: "DM Sans", system-ui, sans-serif;
	font-size: 14px;
	font-weight: 600;
	padding: 6px 2px;
}

.toa-offer-item__remove:hover {
	color: #b3211a;
}

/* Right side: pricing + qty */
.toa-offer-item__aside {
	flex: 0 0 auto;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 16px;
}

.toa-offer-item__pricing {
	text-align: right;
	line-height: 1.2;
}

.toa-offer-item__save {
	font-family: "DM Sans", system-ui, sans-serif;
	display: inline-block;
	background: #FFF1BB;
	color: #C07A00;
	font-size: 12px;
	font-weight: 500;
	padding: 4px 10px;
	border-radius: 34px;
	margin-right: 8px;
}

.toa-offer-item__pricing-inner {
  align-items: center;
	display: flex;
}

.toa-offer-item__price {
	font-family: "DM Sans", system-ui, sans-serif;
	font-size: 24px;
	font-weight: 500;
	color: #16a34a;
}

.toa-offer-item__each {
	display: block;
	font-size: 13px;
	color: #9aa3af;
	margin-top: 4px;
}

/* Qty stepper */
.toa-offer-qty {
	display: inline-flex;
	align-items: center;
	background: #f1f3f5;
	border-radius: 10px;
	overflow: hidden;
}

.toa-offer-qty__btn {
	width: 38px;
	height: 40px;
	border: 0;
	background: transparent;
	cursor: pointer;
	font-size: 18px;
	color: #4a525e;
	line-height: 1;
}

.toa-offer-qty__btn:hover {
	background: #e7eaee;
}

.toa-offer-qty__btn[disabled] {
	opacity: 0.4;
	cursor: not-allowed;
}

.toa-offer-qty__val {
	min-width: 34px;
	text-align: center;
	font-size: 15px;
	font-weight: 600;
	color: #1f2430;
}

/* Swapped flag */
.toa-offer-item__flag {
	display: none;
	position: absolute;
	top: -1px;
	right: -1px;
	align-items: center;
	gap: 6px;
	background: #c2410c;
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	padding: 2px 12px;
	border-radius: 0 14px 0 14px;
}

.toa-offer-item.is-swapped {
	border-color: #c2410c;
}

.toa-offer-item.is-swapped .toa-offer-item__flag {
	display: inline-flex;
}

/* Restore (removed state) */
.toa-offer-item__restore {
	display: none;
	margin-left: auto;
	align-items: center;
	gap: 8px;
	background: #fff;
	border: 1px solid #e3c7c7;
	color: #b23b34;
	font-size: 14px;
	font-weight: 600;
	padding: 9px 16px;
	border-radius: 8px;
	cursor: pointer;
}

.toa-offer-item__restore:hover {
	border-color: #b23b34;
}

.toa-offer-item.is-removed {
	background: #fafbfc;
}

.toa-offer-item.is-removed .toa-offer-item__media,
.toa-offer-item.is-removed .toa-offer-item__name,
.toa-offer-item.is-removed .toa-offer-item__variant {
	opacity: 0.45;
}

.toa-offer-item.is-removed .toa-offer-item__actions,
.toa-offer-item.is-removed .toa-offer-item__aside,
.toa-offer-item.is-removed .toa-offer-item__flag {
	display: none;
}

.toa-offer-item.is-removed .toa-offer-item__restore {
	display: inline-flex;
}

.toa-offer-item.is-removed .toa-offer-item__variant {
	margin-bottom: 0;
}

/* ---- Right box: offer badge + completeness ---- */
.toa-combo-buy__badge--offer {
	background: #e0f2fe;
	color: #0369a1;
}

.toa-offer-completeness {
	margin: 18px 0 4px;
}

.toa-offer-completeness__head {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	margin-bottom: 8px;
}

.toa-offer-completeness__label {
	font-size: 14px;
	font-weight: 700;
	color: #3a424e;
}

.toa-offer-completeness__count {
	font-size: 15px;
	font-weight: 800;
	color: #b4690e;
}

.toa-offer-completeness__bar {
	height: 7px;
	background: #eceff2;
	border-radius: 999px;
	overflow: hidden;
}

.toa-offer-completeness__fill {
	display: block;
	height: 100%;
	width: 100%;
	background: #16a34a;
	border-radius: 999px;
	transition: width 0.2s ease, background 0.2s ease;
}

.toa-offer-completeness__status {
	font-size: 13px;
	color: #8a929d;
	margin: 8px 0 0;
}

.toa-offer-completeness.is-incomplete .toa-offer-completeness__count {
	color: #c2410c;
}

.toa-offer-completeness.is-incomplete .toa-offer-completeness__fill {
	background: #f59e0b;
}

/* ---- Swap modal ---- */
.toa-offer-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: none;
}

.toa-offer-modal.is-open {
	display: block;
}

.toa-offer-modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba(15, 18, 22, 0.55);
}

.toa-offer-modal__panel {
	position: relative;
	max-width: 760px;
	margin: 5vh auto;
	max-height: 90vh;
	overflow: auto;
	background: #fff;
	border-radius: 16px;
	padding: 30px 32px 0;
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
	display: flex;
	flex-direction: column;
}

.toa-offer-modal__title {
	font-family: "Cormorant Garamond", Georgia, serif;
	font-size: 30px;
	font-weight: 700;
	color: var(--toa-crimson, #4a0d0d);
	margin: 0 0 18px;
}

.toa-offer-modal__subtitle {
	font-size: 20px;
	font-weight: 700;
	color: #1f2430;
	margin: 0 0 14px;
}

.toa-offer-modal__search {
	width: 100%;
	box-sizing: border-box;
	border: 1px solid #e6e9ee;
	background: #f6f7f9;
	border-radius: 10px;
	padding: 13px 16px;
	font-size: 15px;
	margin-bottom: 18px;
}

.toa-offer-modal__grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
}

.toa-offer-alt {
	display: flex;
	gap: 14px;
	align-items: center;
	text-align: left;
	background: #fff;
	border: 1px solid #e9ecf1;
	border-radius: 12px;
	padding: 14px;
	cursor: pointer;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.toa-offer-alt:hover {
	border-color: #c9d0da;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.07);
}

.toa-offer-alt__media {
	flex: 0 0 64px;
}

.toa-offer-alt__media img {
	width: 64px;
	height: 64px;
	object-fit: contain;
	display: block;
}

.toa-offer-alt__brand {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.04em;
	color: #c2730c;
	text-transform: uppercase;
}

.toa-offer-alt__name {
	font-size: 15px;
	font-weight: 700;
	color: #1f2430;
	margin: 2px 0;
}

.toa-offer-alt__variant {
	font-size: 13px;
	color: #9aa3af;
}

.toa-offer-alt__price {
	display: block;
	font-size: 17px;
	font-weight: 800;
	color: #16a34a;
	margin-top: 6px;
}

.toa-offer-modal__empty,
.toa-offer-modal__loading {
	color: #8a929d;
	padding: 16px 2px;
}

.toa-offer-modal__footer {
	position: sticky;
	bottom: 0;
	background: #fff;
	padding: 20px 0 24px;
	margin-top: 8px;
}

.toa-offer-modal__keep {
	width: 100%;
	background: var(--toa-crimson, #4a0d0d);
	color: #fff;
	border: 0;
	border-radius: 10px;
	padding: 15px;
	font-size: 16px;
	font-weight: 700;
	cursor: pointer;
}

.toa-offer-modal__keep:hover {
	filter: brightness(1.08);
}

.toa-offer-modal__cancel {
	display: block;
	width: 100%;
	background: none;
	border: 0;
	color: var(--toa-crimson, #4a0d0d);
	font-size: 15px;
	font-weight: 600;
	padding: 14px;
	margin-top: 4px;
	cursor: pointer;
}

@media (max-width: 768px) {
	.toa-offer-item {
		flex-wrap: wrap;
	}

	.toa-offer-item__aside {
		width: 100%;
		flex-direction: row;
		justify-content: space-between;
		align-items: center;
	}

	.toa-offer-modal__grid {
		grid-template-columns: 1fr;
	}

	.toa-offer-modal__panel {
		margin: 0;
		min-height: 100vh;
		border-radius: 0;
	}
}

/* ---- Incomplete-combo warning modal ---- */
.toa-offer-warn {
	position: fixed;
	inset: 0;
	z-index: 100001;
	display: none;
}

.toa-offer-warn.is-open {
	display: block;
}

.toa-offer-warn__overlay {
	position: absolute;
	inset: 0;
	background: rgba(15, 18, 22, 0.55);
}

.toa-offer-warn__panel {
	position: relative;
	max-width: 640px;
	margin: 12vh auto;
	background: #fff;
	border-radius: 16px;
	padding: 40px 44px;
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
	text-align: center;
}

.toa-offer-warn__title {
	font-family: "Cormorant Garamond", Georgia, serif;
	font-size: 40px;
	font-weight: 700;
	color: var(--toa-crimson, #4a0d0d);
	margin: 0 0 24px;
}

.toa-offer-warn__lead {
	font-family: "DM Sans", system-ui, sans-serif;
	font-size: 24px;
	font-weight: 800;
	color: #1f2430;
	margin: 0 0 14px;
}

.toa-offer-warn__desc {
	font-size: 16px;
	line-height: 1.5;
	color: #7a828d;
	margin: 0 0 28px;
}

.toa-offer-warn__restore {
	display: block;
	width: 100%;
	background: var(--toa-crimson, #4a0d0d);
	color: #fff;
	border: 0;
	border-radius: 12px;
	padding: 18px;
	font-size: 17px;
	font-weight: 700;
	cursor: pointer;
}

.toa-offer-warn__restore:hover {
	filter: brightness(1.08);
}

.toa-offer-warn__continue {
	display: block;
	width: 100%;
	background: #fff;
	color: var(--toa-crimson, #4a0d0d);
	border: 1px solid #e3cccc;
	border-radius: 12px;
	padding: 17px;
	font-size: 16px;
	font-weight: 700;
	cursor: pointer;
	margin-top: 14px;
}

.toa-offer-warn__continue:hover {
	border-color: var(--toa-crimson, #4a0d0d);
}

.toa-offer-warn__cancel {
	display: block;
	width: 100%;
	background: none;
	border: 0;
	color: var(--toa-crimson, #4a0d0d);
	font-size: 16px;
	font-weight: 700;
	padding: 18px;
	margin-top: 6px;
	cursor: pointer;
}

@media (max-width: 768px) {
	.toa-offer-warn__panel {
		margin: 0;
		min-height: 100vh;
		border-radius: 0;
		display: flex;
		flex-direction: column;
		justify-content: center;
	}

	.toa-offer-warn__title {
		font-size: 32px;
	}
}
