.returnflows-overlay {
	--light-grey: #f6f6f6;
	--border-grey: #cbd5e1;
}

.returnflows-overlay * > p {
	margin: 0;
}

.returnflows-overlay .hidden {
	display: none !important;
}

.go-back-button-mobile {
	text-decoration: none;
}
#returnflows-overlay {
	display: none;
}
#returnflows-overlay-wrapper {
	display: initial !important;
}

.collapse .return-products {
	max-height: 0px;
	opacity: 0;
	padding: 0;
}

.collapse .return-heading {
	max-height: 0px;
	opacity: 0;
	padding: 0;
}

.collapse .hide-return {
	transform: translateX(-50%) rotate(180deg);
}

.collapse .balance-container .collapse-ups {
	display: flex;
}

.collapse-ups > div {
	padding: 0;
}

.returnflows-overlay.collapse .return-button-wrapper .button-r {
	width: 50px;
}

.collapse .button-r span {
	max-width: 0px;
}

.collapse .return-button-container {
	padding: 0 0;
}
.collapse .product-when-collapse {
	display: flex;
}

.returnflows-overlay {
	position: fixed;
	bottom: 0;
	right: 0;
	left: 0;
	z-index: 2147483647;
	width: 100%;
	background-color: var(--light-grey);

	padding: 0;
	box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
	border-radius: 25px 25px 0 0;
	/* max-height: 500px; */

	/* transition: max-height 0.5s linear; */
}

.hide-return {
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
	top: -20px;
	border: none;
	background-color: var(--light-grey);
	padding: 10px;
	border-radius: 100%;
	transition: transform 0.5s ease;
	transform-origin: center;
}
.hide-return:focus-visible {
	border: none;
}

.go-back-button {
	display: none;
}

.return-heading {
	max-height: 150px;
	padding: 20px 10px;
	transition:
		padding 0.5s,
		max-height 0.5s,
		opacity 0.5s;
	overflow: hidden;
}

.return-headline {
	font-size: 20px;
	color: #0f172a;
	margin: 0;
	margin-block: 10px;
	font-weight: 500;
	text-align: center;
}

.instant-exchange {
	background-color: #d1e1ff;
	color: #536eff;
	font-size: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 5px;
	border-radius: 5px;
	-webkit-border-radius: 5px;
	-moz-border-radius: 5px;
	-ms-border-radius: 5px;
	-o-border-radius: 5px;
	padding: 8px 10px;
}

.free-returnlabel {
	background-color: #d7f6e0;
	color: #4e9169;
	font-size: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 5px;
	border-radius: 5px;
	-webkit-border-radius: 5px;
	-moz-border-radius: 5px;
	-ms-border-radius: 5px;
	-o-border-radius: 5px;
	padding: 8px 10px;
}

.return-usps {
	display: flex;
	/* align-items: end; */
	justify-content: center;
	gap: 10px;
}

.return-products {
	background-color: #fff;
	border: 1px solid var(--border-grey);
	padding: 10px;
	max-height: 500px;
	transition:
		padding 0.5s,
		max-height 0.5s,
		opacity 0.5s;
	overflow: hidden;
}

.return-products > p {
	margin: 0px;
	color: #475569;
}

.return-products-list {
	padding: 0;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.receive-products-list {
	padding: 0;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.rf-product-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	cursor: pointer;
}

.product-actions {
	display: flex;
	gap: 15px;
	align-items: center;
}

.product-actions .rf-price p {
	text-align: right;
	color: var(--slate-600, #475569);
	font-size: 16px;
	font-weight: 500;
	line-height: 0.8;
}

.product-actions .rf-price a {
	text-align: right;
	color: #001ebf;
	font-size: 14px;
	font-weight: 500;
	text-underline-offset: 5px;
	text-decoration-color: #536eff;
	text-decoration: underline;
}

.rf-remove-product {
	border: none;
	color: #475569;
	background-color: #ededed;
	opacity: 0.9;
	border-radius: 100px;
	font-size: 14px;
	cursor: pointer;
	padding: 5px 15px;
	display: flex;
	align-items: center;
	gap: 5px;
}

.rf-remove-product > span {
	color: #000;
}
.rf-remove-product:hover {
	opacity: 1;
}

.returnflows-overlay .product-info {
	display: flex;
	align-items: center;
	gap: 12px;
}

.returnflows-overlay .product-info div {
	line-height: 1.2;
}

.returnflows-overlay .product-info img {
	width: 40px;
	height: 40px;
	object-fit: cover;
	border-radius: 12px;
	border: 1px solid var(--border-grey);
	-webkit-border-radius: 12px;
	-moz-border-radius: 12px;
	-ms-border-radius: 12px;
	-o-border-radius: 12px;
}

.returnflows-overlay .product-info h4 {
	font-size: 14px;
	font-weight: 500;
	margin: 0;
	color: #0f172a;
}

.returnflows-overlay .product-info p {
	font-size: 12px;
	color: var(--slate-600, #475569);
}

.returnflows-overlay .retur-dot {
	position: relative;
	margin-inline: 4px;
	bottom: 1px;
	display: inline;
}

.returnflows-overlay
	.product-info
	p:has(span:empty)
	:is(.retur-dot, span:empty) {
	display: none;
}

.returnflows-overlay .seperator {
	width: 100%;
	border-top: 1px solid var(--border-grey);
	padding-bottom: 15px;
	position: relative;
}
.returnflows-overlay .seperator:before {
	content: "";
	width: 0;
	height: 0;
	border-left: 10px solid transparent;
	border-right: 10px solid transparent;
	border-top: 10px solid var(--border-grey);
	position: absolute;
	left: 50%;
	/* transform: translateX(-50%); */
	margin: 0 -15px;
	z-index: 1;
}

.returnflows-overlay .seperator:after {
	content: "";
	width: 0;
	height: 0;
	border-left: 10px solid transparent;
	border-right: 10px solid transparent;
	border-top: 10px solid #fff;
	position: absolute;
	left: 50%;
	/* transform: translateX(-50%); */
	margin: 0 -15px -2px -15px;
	z-index: 2;
	top: -1px;
}

.returnflows-overlay .receive-icon-container {
	height: 50px;
	border: 1px dashed var(--border-grey);
	border-radius: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 30px 30px;
}

.returnflows-overlay .receive-icon-container img {
	width: 20px;
	height: 20px;
	opacity: 0.4;
}
.returnflows-overlay .receive-icon-container p {
	text-align: center;
	font-size: 14px;
	color: #0f172a;
}

.returnflows-overlay .return-button-wrapper {
	padding-right: 10px;
	padding-left: 10px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	height: 100%;
	border-top: 1px solid var(--border-grey);
}
.returnflows-overlay .return-button-container {
	padding: 10px 0;
	display: flex;
	gap: 20px;
	justify-content: right;
	/* align-items: center; */
	transition: width 0.5s;
}

.returnflows-overlay
	.return-button-container:not(.collapse .return-button-container) {
	width: 100%;
}

.product-when-collapse {
	overflow: hidden;
	display: none;
}

.return-product-container img,
.receive-product-container img {
	width: 45px;
	height: 45px;
	object-fit: cover;
	border-radius: 8px;
	border: 1px solid var(--border-grey);
}

.return-product-container,
.receive-product-container {
	display: flex;
	padding: 10px 0;
}

.return-products-list__product {
	display: flex;
	align-items: center;
}

.return-product-container,
.receive-product-container {
	align-items: center;
	gap: 15px;
	padding-right: 10px;
	border-right: 1px solid var(--border-grey);
	position: relative;
}

.return-product-container:before {
	content: "";
	width: 0;
	height: 0;
	border-top: 10px solid transparent;
	border-bottom: 10px solid transparent;
	border-left: 10px solid var(--border-grey);
	position: absolute;
	right: -10px;
	top: 25px;
	z-index: 1;
}

.return-product-container:after {
	content: "";
	width: 0;
	height: 0;
	border-top: 10px solid transparent;
	border-bottom: 10px solid transparent;
	border-left: 10px solid var(--light-grey);
	position: absolute;
	right: -9px;
	top: 25px;
	z-index: 1;
}

/* .seperator {
    width: 100%;
    border-top: 1px solid var(--border-grey);
    padding-bottom: 15px;
    position: relative;
    
}
.seperator:before {
    content:'';
    width: 0; 
    height: 0; 
    border-left: 10px solid transparent; 
    border-right: 10px solid transparent;
    border-top: 10px solid var(--border-grey); 
    position: absolute;
    left: 50%;
    
    margin: 0 -15px; 
    z-index:1;       
}

.seperator:after {
    content:'';
    width: 0; 
    height: 0; 
    border-left: 10px solid transparent; 
    border-right: 10px solid transparent; 
    border-top: 10px solid #fff; 
    position: absolute;
    left: 50%;
  
    margin: 0 -15px -2px -15px;	
    z-index: 2;
    top: -1px;
} */

.receive-icon-collapse-container {
	width: 45px;
	height: 45px;
	border: 1px solid var(--border-grey);
	border-radius: 8px;
	margin-block: 15px;
	display: flex;
	justify-content: center;
	align-items: center;
}

.receive-icon-collapse-container img {
	width: 20px;
	height: 20px;
	border: none;
	border-radius: 0;
	opacity: 0.4;
}

.balance-wrapper {
	/* display: flex; */
	align-items: center;
}

.balance-wrapper p {
	margin: 0;
	font-size: 14px;
}

.balance-container {
	text-align: right;
	display: flex;
	justify-content: space-around;
	max-width: 90%;
	margin-inline: auto;
	padding: 10px;
}
.balance-container .collapse-ups {
	display: none;
	gap: 5px;
}

.balance-container .instant-exchange,
.balance-container .free-returnlabel {
	width: 30px;
}

.balance-container > div {
	display: flex;
	justify-content: space-between;
	gap: 6px;
}
.balance-container > div > .rf-value {
	text-align: right;
	color: #475569;
}

.balance-container > div > .rf-label {
	font-weight: 500;
	color: #0f172a;
}

.button-r span {
	overflow: hidden;
	max-width: 100px;
	white-space: nowrap;
	transition: max-width 0.3s;
}

.return-button-wrapper .button-r {
	/* background-color: var(--accent-background); */
	color: var(--accent-foreground);
	border-radius: 8px;
	font-size: 16px;
	height: 50px;
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 5px;
	/* max-width: 700px; */
	transition: width 0.5s;
}

.button-r:disabled {
	background-color: var(--disabled-color);
	cursor: not-allowed;
}

.return-button-wrapper .button-r:nth-child(1) {
	width: 40%;
	border: 1px solid var(--border-grey);
	color: #475569;
}
.return-button-wrapper .button-r:nth-child(2) {
	width: 60%;
	background-color: var(--accent-background);
	color: var(--accent-foreground);
	transition: 300ms;
	-webkit-transition: 300ms;
	-moz-transition: 300ms;
	-ms-transition: 300ms;
	-o-transition: 300ms;
}

.open-cart-button {
	background-color: var(--accent-background);
	color: var(--accent-foreground);
	border-radius: 8px;
	font-size: 16px;
	height: 50px;
	border: none;
	cursor: pointer;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 0px 20px;
	gap: 5px;
}

.return-button-wrapper .button-r:nth-child(2):disabled {
	opacity: 0.5;
	cursor: not-allowed;
}
.return-button-wrapper .button-r:nth-child(2):hover {
	opacity: 0.8;
}

.indicator-arrow {
	min-width: max-content;
}

.return-products-list--collapsed {
	display: flex;
	flex-direction: row;
	gap: 0;
}

.return-products-list--collapsed > li {
	border-radius: 100%;
	overflow: hidden;
	border: 1px solid var(--border-grey);
}

.return-products-list--collapsed > li:nth-child(n + 3) {
	display: none;
}

.return-products-list--collapsed > :not(:first-child) {
	margin-left: -6px;
}

@media not (min-width: 990px) {
	.return-products-list--collapsed-desktop,
	.receive-products-list--collapsed-desktop {
		position: relative;
	}

	.more-exchange-products-indicator:not(
		.collapse .more-exchange-products-indicator
	),
	.more-return-products-indicator:not(
		.collapse .more-return-products-indicator
	) {
		display: none !important;
	}

	.collapse #go-back-button-mobile {
		display: none;
	}

	.indicator-arrow {
		display: none;
	}

	.returnflows-overlay .modal-overlay {
		display: none !important;
	}

	.collapse .balance-container {
		padding-top: 25px;
	}

	.product-overview {
		flex: 1;
		display: flex;
		flex-direction: column;
		overflow-y: hidden; /* Contains the scrolling child */
	}

	.return-products {
		overflow-y: auto; /* Enable scrolling */
		padding: 10px 16px 16px 16px;
	}

	.modal-divider {
		width: 150% !important;
		transform: translateX(-15%);
	}

	/* Remove the height string value that was causing issues */
	.product-overview {
		height: 100%;
	}

	.returnflows-overlay .collapse {
		height: 50vh;
	}

	.returnflows-overlay {
		height: auto;
	}

	/* Font Sizing */
	.returnflows-overlay .product-actions .rf-price p,
	.product-info h4 {
		font-size: 13px;
	}
	.returnflows-overlay .product-info p {
		font-size: 11px;
	}
	.product-actions .rf-price a {
		font-size: 10px;
	}
	.rf-remove-product > span {
		display: none;
	}

	.return-usps > div {
		padding: 5px 8px;
	}
	.return-usps > div > span {
		font-size: 10px;
	}
	.return-usps > div > img {
		width: 15px;
		height: 15px;
	}

	.balance-container > div > p {
		font-size: 12px;
	}
}

.receive-products-list--collapsed
	> .receive-products-list__product:nth-child(n + 3) {
	display: none;
}

.receive-products-list--collapsed {
	padding-left: 20px;
	display: flex;
	flex-direction: row;
	gap: 0;
}

.receive-products-list--collapsed > li:nth-child(-n + 2) .product-info div {
	display: none;
}

.receive-products-list--collapsed > li:nth-child(-n + 3) .product-info img {
	height: 45px;
	width: 45px;
	border-radius: 100%;
}

.receive-products-list--collapsed > li:not(:first-child) {
	margin-left: -6px;
}

.receive-products-list--collapsed > li:nth-child(n + 4) {
	display: none;
}

@media (min-width: 990px) {
	.returnflows-overlay {
		border-radius: 0;
	}

	.overlay-items-divider {
		display: none;
	}

	.return-products-list--collapsed-desktop > li:not(:first-child) {
		display: none;
	}

	.return-products-list--collapsed-desktop > li .product-actions {
		display: none;
	}

	.return-products-list--collapsed-desktop {
		display: flex;
		flex-direction: row;
		gap: 0;
	}

	.receive-products-list--collapsed-desktop > li:nth-child(n + 3) {
		display: none;
	}
	.receive-products-list--collapsed-desktop > li .product-actions {
		display: none;
	}

	.receive-products-list--collapsed-desktop {
		display: flex;
		flex-direction: row;
		gap: 0;
	}

	.receive-products-list--collapsed-desktop
		> li:nth-child(-n + 2)
		.product-info
		div {
		display: none;
	}

	.receive-products-list--collapsed-desktop
		> li:nth-child(-n + 2)
		.product-info
		img {
		height: 45px;
		width: 45px;
		border-radius: 100%;
	}

	.receive-products-list--collapsed-desktop > li:not(:first-child) {
		margin-left: -6px;
	}

	.open-cart-button {
		display: flex;
	}

	.hide-return {
		display: none;
	}
	.return-heading {
		display: flex;
		justify-content: space-between;
		padding: 15px;
	}

	.receive-single-product {
		width: 45px;
		height: 45px;
		border-radius: 100%;
		border: 1px solid var(--border-grey);
		align-items: center;
		justify-content: center;
		overflow: hidden;
	}
	.receive-single-product img {
		width: 100%;
		height: 100%;
		object-fit: cover;
		border-radius: 100%;
	}

	.receive-products-list {
		display: flex;
	}

	.receive-icon-container {
		padding: 10px;
	}

	.go-back-button {
		background-color: transparent;
		border: 0;
		font-family: inherit;
		font-size: 16px;
		color: #64748b;
		padding: 0;
		display: flex;
		align-items: center;
		gap: 5px;
		text-decoration: none;
	}
	.return-usps {
		display: flex;
		align-items: center;
		gap: 10px;
	}

	.product-overview {
		height: "100%";
		display: flex;
		border-top: 1px solid var(--border-grey);
		justify-content: space-between;
		/* border-top: 2px solid #f1f1f1; */
	}
	.balance-wrapper {
		display: flex;
		gap: 8px;
		width: 400px;
	}

	.balance-container {
		min-width: 170px;
		padding: 0px;
	}

	.seperator {
		transform: rotate(-90deg);
		width: unset !important;
		display: block !important;
	}

	.seperator:after {
		border-top: 10px solid black !important;
	}

	.return-products {
		display: flex;
		align-items: center;
		gap: 1rem;
		background-color: var(--light-grey);
		border: none;
		margin-inline: 0;
	}

	.return-products > p {
		display: none;
	}

	.balance-container {
		display: block;
	}

	.more-return-products-indicator {
		margin-left: 10px;
	}

	.return-button-wrapper {
		padding-left: 20px;
		border-top: none;
		border-left: 1px solid var(--border-grey);
	}

	.return-button-wrapper .button-r:nth-child(1) {
		display: none;
	}
	.return-button-wrapper .button-r:nth-child(2) {
		width: 100%;
		padding: 30px 50px;
	}

	.return-heading-title {
		display: flex;
		align-items: center;
		gap: 10px;
	}

	.horizontal-divider {
		display: block !important;
		width: 1px;
		background-color: var(--border-grey);
		height: 100%;
	}
}

.returnflows-overlay .modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.4);
	display: flex;
	justify-content: center;
	align-items: center;
	z-index: 2147483647;
}

/* body.rf-modal-open {
  overflow: hidden;
} */

.returnflows-overlay .hidden {
	display: none !important;
}

.modal-content {
	background-color: white;
	border-radius: 10px;
	width: 650px;
	position: relative;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
	max-height: 70vh; /* Changed from max-height to height */
	display: flex; /* Add this */
	flex-direction: column; /* Add this */
}

.modal-header {
	padding: 15px 30px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	border-bottom: 1px solid var(--border-grey);
}

.modal-title {
	font-size: 20px;
	font-weight: 500;
	color: #0f172a;
	margin: 0;
}

.modal-close {
	border: 1.25px solid var(--border-grey);
	cursor: pointer;
	width: 32px;
	height: 32px;
	border-radius: 100%;
	background-color: white;
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 0;
	min-height: 0;
	padding: 0;
}

.modal-close:hover {
	background-color: rgba(0, 0, 0, 0.05);
}

.modal-body {
	overflow-y: scroll;
	flex: 1; /* Add this */
	min-height: 0; /* Add this */
}

.modal-body .receive-items,
.modal-body .return-items {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 20px 30px;
}
.modal-body .receive-items {
	padding-top: 0;
}

.modal-divider {
	position: relative;
	width: 100%;
	border-top: 1px solid var(--border-grey);
	margin: 25px 0px;
}

.divider-button {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	background-color: var(--accent-background);
	color: var(--accent-foreground);
	padding: 6px 20px;
	border: none;
	border-radius: 100px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	-webkit-transform: translate(-50%, -50%);
	-moz-transform: translate(-50%, -50%);
	-ms-transform: translate(-50%, -50%);
	-o-transform: translate(-50%, -50%);
}

.return-items > p,
.receive-items > p {
	color: #0f172a;
	font-weight: 500;
}

.divider-button > span {
	font-weight: 500;
	font-size: 16px;
	color: var(--accent-foreground);
}

.divider-button > svg {
	transform: scale(1.5);
}

.return-products > p {
	margin-bottom: 10px;
}

.overlay-items-divider {
	margin: 40px 0px;
}

.returnflows-overlay .modal-receive-icon-container {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 80px;
	gap: 10px;
}

.continue-shopping-button {
	color: #001ebf;
	font-size: 14px;
	font-weight: 500;
	text-underline-offset: 5px;
	text-decoration-color: #536eff;
}

.modal-receive-icon-container img {
	width: 30px;
	height: 30px;
	opacity: 0.4;
}

.more-return-products-indicator,
.more-exchange-products-indicator {
	min-width: 45px;
	width: 45px;
	height: 45px;
	border-radius: 100%;
	border: 1px solid var(--border-grey);
	align-items: center;
	justify-content: center;
	display: none;
	color: #0f172a;
	font-weight: 500;
	background-color: white;
}

@media (max-width: 990px) {
	.returnflows-overlay .return-products-list {
		max-height: 150px;
		overflow-y: auto;
	}
	.returnflows-overlay .receive-products-list {
		max-height: 150px;
		overflow-y: auto;
	}
	.shadow-overlay {
		position: absolute;
		bottom: 0;
		left: 0;
		right: 0;
		height: 64px; /* Adjust shadow height */
		pointer-events: none;
		background: linear-gradient(
			to bottom,
			rgba(255, 255, 255, 0) 0%,
			rgba(255, 255, 255, 1) 100%
		);
		opacity: 0;
		transition: opacity 0.2s ease;
	}
}

.overflow-wrapper {
	position: relative;
}

.has-shadow .shadow-overlay {
	opacity: 1;
	display: block;
}
