/**
 * Mobile full-screen Cart Screen (fixed below persistent header).
 */

@media (max-width: 63.99rem) {
	.faradoran-mobile-cart-drawer,
	.adonis-mobile-cart-drawer {
		--faradoran-mobile-cart-screen-top: var(
			--faradoran-theme-persistent-header-stack-bottom,
			var(--faradoran-theme-persistent-header-stack-bottom-fallback)
		);

		position: fixed;
		inset-inline: 0;
		inset-block-start: var(--faradoran-mobile-cart-screen-top);
		inset-block-end: 0;
		z-index: var(--faradoran-theme-z-overlay);
		inline-size: 100%;
		max-inline-size: none;
		margin: 0;
		padding: 0;
		border: 0;
		box-shadow: none;
		background-color: var(--faradoran-theme-color-white);
		color: var(--faradoran-theme-color-text);
		display: flex;
		flex-direction: column;
		overflow: hidden;
		transform: translateY(-100%);
		visibility: hidden;
		pointer-events: none;
		transition: transform var(--faradoran-theme-motion-base) var(--faradoran-theme-easing-standard);
		will-change: transform;
	}

	html.faradoran-js .faradoran-mobile-cart-drawer[hidden],
	html.faradoran-js .adonis-mobile-cart-drawer[hidden],
	html.adonis-js .faradoran-mobile-cart-drawer[hidden],
	html.adonis-js .adonis-mobile-cart-drawer[hidden] {
		display: flex !important;
	}

	html.faradoran-js .faradoran-mobile-cart-drawer.is-open,
	html.faradoran-js .adonis-mobile-cart-drawer.is-open,
	html.adonis-js .faradoran-mobile-cart-drawer.is-open,
	html.adonis-js .adonis-mobile-cart-drawer.is-open {
		transform: translateY(0);
		visibility: visible;
		pointer-events: auto;
	}

	.faradoran-mobile-cart-drawer__screen,
	.adonis-mobile-cart-drawer__screen {
		display: flex;
		flex: 1 1 auto;
		flex-direction: column;
		min-block-size: 0;
		overflow: hidden;
	}

	.faradoran-mobile-cart-drawer__toolbar,
	.adonis-mobile-cart-drawer__toolbar {
		position: relative;
		flex: 0 0 auto;
		min-block-size: calc(var(--faradoran-theme-touch-target) + var(--faradoran-theme-space-2));
		padding-block-start: var(--faradoran-theme-space-2);
		padding-block-end: var(--faradoran-theme-space-2);
		padding-inline: max(var(--faradoran-theme-layout-gutter), var(--faradoran-theme-safe-area-inline-start)) max(var(--faradoran-theme-layout-gutter), var(--faradoran-theme-safe-area-inline-end));
		border-block-end: var(--faradoran-theme-border-width) solid var(--faradoran-theme-color-border);
	}

	.faradoran-mobile-cart-drawer__title,
	.adonis-mobile-cart-drawer__title {
		display: block;
		margin: 0;
		padding-inline-start: calc(var(--faradoran-theme-touch-target) + var(--faradoran-theme-space-3));
		color: var(--faradoran-theme-color-text);
		font-size: 1rem;
		font-weight: var(--faradoran-theme-font-weight-semibold);
		line-height: var(--faradoran-theme-touch-target);
	}

	.faradoran-mobile-cart-drawer__close,
	.adonis-mobile-cart-drawer__close {
		position: absolute;
		top: var(--faradoran-theme-space-2);
		left: max(var(--faradoran-theme-layout-gutter), var(--faradoran-theme-safe-area-inline-start));
		display: inline-flex;
		align-items: center;
		justify-content: center;
		inline-size: var(--faradoran-theme-touch-target);
		min-inline-size: var(--faradoran-theme-touch-target);
		min-block-size: var(--faradoran-theme-touch-target);
		margin: 0;
		padding: 0;
		border: var(--faradoran-theme-border-width) solid var(--faradoran-theme-color-border);
		border-radius: var(--faradoran-theme-radius-sm);
		background-color: var(--faradoran-theme-color-white);
		color: var(--faradoran-theme-color-text);
		cursor: pointer;
	}

	.faradoran-mobile-cart-drawer__close:hover,
	.faradoran-mobile-cart-drawer__close:focus-visible,
	.adonis-mobile-cart-drawer__close:hover,
	.adonis-mobile-cart-drawer__close:focus-visible {
		border-color: var(--faradoran-theme-color-green);
		color: var(--faradoran-theme-color-green);
	}

	.faradoran-mobile-cart-drawer__close:focus-visible,
	.adonis-mobile-cart-drawer__close:focus-visible {
		outline: var(--faradoran-theme-focus-ring);
		outline-offset: var(--faradoran-theme-focus-offset);
	}

	.faradoran-mobile-cart-drawer__body,
	.adonis-mobile-cart-drawer__body {
		display: flex;
		flex: 1 1 auto;
		flex-direction: column;
		min-block-size: 0;
		overflow: hidden;
	}

	@media (prefers-reduced-motion: reduce) {
		.faradoran-mobile-cart-drawer,
		.adonis-mobile-cart-drawer {
			transition: none;
		}
	}
}

@media (min-width: 64rem) {
	.faradoran-mobile-cart-drawer,
	.adonis-mobile-cart-drawer {
		display: none !important;
	}
}

html.has-mobile-cart-drawer-open .faradoran-mobile-bottom-nav,
html.has-mobile-cart-drawer-open .adonis-mobile-bottom-nav {
	visibility: hidden;
	pointer-events: none;
}
