.wp-block-kkart-checkout .with-scroll-to-top__scroll-point {
	top: -96px;
}

.kkart-block-checkout__sidebar {
	.kkart-block-components-product-name {
		color: inherit;
		padding-right: $gap-small;
		flex-grow: 1;
		// Required by IE11.
		flex-basis: 0;
	}
}

.kkart-block-checkout__actions {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin: 0 0 $gap-large*2;
	padding: 0 0 0 $gap-larger;

	.kkart-block-components-checkout-place-order-button {
		width: 50%;
		padding: 1em;
		height: auto;
		margin-left: auto;

		.kkart-block-components-button__text {
			line-height: 24px;

			> svg {
				fill: $white;
				vertical-align: top;
			}
		}
	}
}


// Loading placeholder state.
.kkart-block-checkout--is-loading {
	.kkart-block-components-express-payment,
	.kkart-block-checkout__actions button {
		@include placeholder();
		@include force-content();
	}
	.kkart-block-components-express-payment {
		min-height: 150px;
	}
	.kkart-block-components-express-payment-continue-rule > span {
		@include placeholder();
		@include force-content();
		width: 150px;
	}
	.kkart-block-checkout__form {
		.kkart-block-components-checkout-step__title {
			@include placeholder();
			@include force-content();
			display: block;
			width: 10em;

			&::before {
				@include placeholder();
				@include force-content();
				border-radius: 50%;
				display: block;
				height: 100%;
				width: 1.5em;
			}
		}
		.kkart-block-components-checkout-step__container::after {
			@include placeholder();
		}
		.kkart-block-components-checkout-step__content > span {
			@include placeholder();
			@include force-content();
			display: block;
			min-height: 100px;
		}
		.kkart-block-components-checkout-step::before,
		.kkart-block-components-checkout-step::after {
			@include placeholder();
		}
	}
	.kkart-block-checkout__sidebar .components-card {
		@include placeholder();
		@include force-content();
		min-height: 460px;
	}
}
.kkart-block-components-sidebar-layout.kkart-block-checkout--skeleton {
	display: none;
}
.is-loading + .kkart-block-components-sidebar-layout.kkart-block-checkout--skeleton {
	display: flex;
}

.kkart-block-checkout-empty,
.kkart-block-checkout-error {
	padding: $gap-largest;
	text-align: center;
	width: 100%;

	.kkart-block-checkout-empty__image,
	.kkart-block-checkout-error__image {
		max-width: 150px;
		margin: 0 auto 1em;
		display: block;
		color: inherit;
	}
	.kkart-block-checkout-empty__title,
	.kkart-block-checkout-error__title {
		display: block;
		margin: 0;
		font-weight: bold;
	}
	.kkart-block-checkout-empty__description,
	.kkart-block-checkout-error__description {
		display: block;
		margin: 0.25em 0 1em 0;
	}
}

.is-mobile {
	.kkart-block-checkout__actions {
		.kkart-block-components-checkout-return-to-cart-button {
			display: none;
		}

		.kkart-block-components-checkout-place-order-button {
			width: 100%;
		}
	}
}

.is-mobile,
.is-small,
.is-medium {
	.kkart-block-checkout__main {
		order: 1;
	}

	.kkart-block-checkout__sidebar {
		margin-bottom: $gap-largest;
		order: 0;
	}
}

.is-large {
	.kkart-block-checkout__actions {
		padding-right: 36px;
	}
}
