/* Cart gift overlay: it sits above the native checkout footer without adding a layout row. */
.kwan-native-cart-wrapper {
	position: relative;
}

.kwan-opt-cart-footer {
	position: relative;
	z-index: 4;
}

.kwan-cart-gift {
	position: absolute;
	left: 16px;
	right: 16px;
	bottom: calc(var(--kwan-gift-footer-height, 0px) + 12px);
	z-index: 3;
	max-height: min(360px, calc(100% - var(--kwan-gift-footer-height, 0px) - 24px));
	overflow: auto;
	-webkit-overflow-scrolling: touch;
	border: 1px solid #cdbb94;
	border-radius: 12px;
	background: #fff9f0;
	box-shadow: 0 5px 20px rgba(36, 30, 24, .14);
	color: #33291b;
}

.kwan-cart-gift[hidden],
.kwan-cart-gift [hidden] {
	display: none !important;
}

.kwan-cart-gift__spacer {
	height: 0;
	width: 100%;
	pointer-events: none;
}

[data-cart-scroll] {
	position: relative;
	scroll-padding-bottom: var(--kwan-gift-space, 0px);
}

.kwan-cart-gift__near {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 14px;
	background: #fff9f0;
}

.kwan-cart-gift__near-copy {
	min-width: 0;
	flex: 1 1 auto;
}

.kwan-cart-gift__near-title {
	display: block;
	font-size: 15px;
	line-height: 1.3;
	color: #604109;
}

.kwan-cart-gift__near-text {
	margin: 4px 0 0;
	font-size: 12px;
	line-height: 1.4;
	color: #685535;
}

.kwan-cart-gift__continue {
	flex: 0 0 auto;
	min-height: 44px;
	width: auto;
	max-width: 126px;
	padding: 8px 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: #795200;
	font: inherit;
	font-weight: 600;
	text-align: center;
	text-decoration: none;
	white-space: nowrap;
	font-size: 13px;
	text-underline-offset: 4px;
	cursor: pointer;
}

.kwan-cart-gift__eligible {
	padding: 14px;
	background: #fff9f0;
}

.kwan-cart-gift__toggle {
	display: flex;
	align-items: center;
	width: 100%;
	gap: 10px;
	padding: 0;
	border: 0;
	background: transparent;
	color: #604109;
	font: inherit;
	text-align: left;
	cursor: pointer;
}

.kwan-cart-gift__toggle:disabled {
	cursor: wait;
	opacity: .75;
}

.kwan-cart-gift__icon {
	flex: 0 0 auto;
	font-size: 24px;
	line-height: 1;
}

.kwan-cart-gift__heading-copy {
	min-width: 0;
	flex: 1 1 auto;
}

.kwan-cart-gift__heading-copy strong {
	display: block;
	font-size: 15px;
	line-height: 1.3;
}

.kwan-cart-gift__heading-copy small {
	display: block;
	margin-top: 3px;
	font-size: 12px;
	line-height: 1.4;
	color: #685535;
}

.kwan-cart-gift__arrow {
	flex: 0 0 auto;
	font-size: 20px;
	line-height: 1;
}

.kwan-cart-gift__options {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 8px;
	min-width: 0;
	margin: 10px 0 0;
	padding: 0;
	border: 0;
}

.kwan-cart-gift__choice {
	display: grid;
	grid-template-columns: auto 76px minmax(0, 1fr);
	align-items: start;
	gap: 8px;
	min-width: 0;
	min-height: 84px;
	padding: 9px;
	border: 1px solid #cdbb94;
	border-radius: 9px;
	background: #fffaf0;
	color: #33291b;
	cursor: pointer;
}

.kwan-cart-gift__choice:has(input:checked) {
	border-color: #795200;
	background: #fff4d9;
	box-shadow: inset 0 0 0 1px #795200;
}

.kwan-cart-gift__choice:has(input:disabled) {
	cursor: wait;
}

.kwan-cart-gift__choice input {
	width: 18px;
	height: 18px;
	margin: 3px 0 0;
	accent-color: #795200;
}

.kwan-cart-gift__choice-image {
	display: block;
	width: 76px;
	height: 64px;
	object-fit: contain;
	border-radius: 4px;
	background: #fff;
}

.kwan-cart-gift__choice-copy {
	min-width: 0;
	padding-top: 1px;
}

.kwan-cart-gift__choice-title {
	display: block;
	font-size: 14px;
	line-height: 1.3;
}

.kwan-cart-gift__choice-description {
	display: block;
	margin-top: 4px;
	font-size: 11px;
	line-height: 1.4;
	color: #685535;
}

.kwan-cart-gift__choice--decline {
	grid-column: 1 / -1;
	grid-template-columns: auto minmax(0, 1fr);
	align-items: center;
	min-height: 56px;
	padding: 16px;
}

.kwan-cart-gift__choice--decline .kwan-cart-gift__choice-copy {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 10px;
}

.kwan-cart-gift__choice--decline .kwan-cart-gift__choice-description {
	margin-top: 0;
	text-align: right;
}

.kwan-cart-gift__reference-note {
	grid-column: 1 / -1;
	margin: 1px 0 0;
	font-size: 10px;
	line-height: 1.4;
	color: #75664c;
	text-align: center;
}

.kwan-cart-gift .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.kwan-cart-gift button:focus-visible,
.kwan-cart-gift input:focus-visible {
	outline: 2px solid #795200;
	outline-offset: 3px;
}

@media (max-width: 520px) {
	.kwan-cart-gift--en .kwan-cart-gift__near {
		gap: 8px;
		padding: 8px 12px;
	}
	.kwan-cart-gift--en .kwan-cart-gift__near-title {
		font-size: 13px;
	}
	.kwan-cart-gift--en .kwan-cart-gift__near-text {
		margin-top: 3px;
		font-size: 12px;
	}
	.kwan-cart-gift {
		left: 12px;
		right: 12px;
	}

	.kwan-cart-gift__near {
		gap: 12px;
		padding: 12px;
	}

	.kwan-cart-gift__near-title,
	.kwan-cart-gift__heading-copy strong {
		font-size: 14px;
	}

	.kwan-cart-gift__continue {
		max-width: 108px;
	}

	.kwan-cart-gift__choice {
		grid-template-columns: auto 64px minmax(0, 1fr);
	}

	.kwan-cart-gift__choice--decline {
		grid-template-columns: auto minmax(0, 1fr);
	}

	.kwan-cart-gift__choice-image {
		width: 64px;
		height: 56px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.kwan-cart-gift,
	.kwan-cart-gift * {
		scroll-behavior: auto !important;
		transition: none !important;
	}
}
