/**
 * Navigation block — the header's slide-in drawer.
 *
 * WordPress renders custom navigation overlays full-screen. Here the
 * full-screen layer becomes a soft teal scrim and the overlay template part
 * (.ma-drawer) becomes the panel from the design: a white sheet, 340px wide,
 * sliding in from the left, with the cream monogram near the bottom.
 */

.ma-header__menu .wp-block-navigation__responsive-container.disable-default-overlay.is-menu-open {
	background-color: color-mix(in srgb, var(--wp--preset--color--accent-strong) 45%, transparent);
	padding: 0;
}

.ma-header__menu .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-close,
.ma-header__menu .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-dialog,
.ma-header__menu .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
	min-height: 100%;
}

.ma-drawer {
	box-sizing: border-box;
	max-width: 100%;
	min-height: 100vh;
	min-height: 100dvh;
	overflow: hidden auto;
	position: relative;
	width: min(340px, 86vw);
}

@media (prefers-reduced-motion: no-preference) {
	.is-menu-open .ma-drawer {
		animation: ma-drawer-in 0.28s cubic-bezier(0.2, 0.8, 0.2, 1) both;
	}
}

@keyframes ma-drawer-in {
	from {
		transform: translateX(-100%);
	}

	to {
		transform: none;
	}
}

.ma-drawer .wp-block-navigation-overlay-close {
	align-items: center;
	background: transparent;
	border: 0;
	border-radius: var(--wp--preset--border-radius--pill);
	color: var(--wp--preset--color--accent);
	cursor: pointer;
	display: inline-flex;
	height: 48px;
	justify-content: center;
	margin-left: -12px;
	padding: 0;
	width: 48px;
}

.ma-drawer .wp-block-navigation-overlay-close:hover {
	background-color: color-mix(in srgb, var(--wp--preset--color--accent) 10%, transparent);
}

/* The design's close icon: two rounded strokes. */
.ma-drawer .wp-block-navigation-overlay-close svg {
	display: none;
}

.ma-drawer .wp-block-navigation-overlay-close::before {
	background-color: currentColor;
	content: "";
	height: 22px;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.75' stroke-linecap='round'%3E%3Cpath d='M18 6 6 18'/%3E%3Cpath d='m6 6 12 12'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.75' stroke-linecap='round'%3E%3Cpath d='M18 6 6 18'/%3E%3Cpath d='m6 6 12 12'/%3E%3C/svg%3E") center / contain no-repeat;
	width: 22px;
}

/* Links inherit their colour (core forces "inherit" on them), so it is set on the menu. */
.ma-drawer__nav.ma-drawer__nav {
	color: var(--wp--preset--color--accent-light);
	font-family: var(--wp--preset--font-family--alegreya);
	font-style: italic;
	font-weight: 700;
	margin-top: 6px;
}

.ma-drawer__nav .wp-block-navigation-item {
	width: 100%;
}

.ma-drawer__nav .wp-block-navigation-item__content {
	align-items: center;
	display: flex;
	font-size: 1.5625rem;
	line-height: 1.2;
	min-height: 52px;
}

.ma-drawer__nav .wp-block-navigation-item__content.wp-block-navigation-item__content:hover {
	color: var(--wp--preset--color--accent);
}

.ma-drawer__nav .current-menu-item > .wp-block-navigation-item__content.wp-block-navigation-item__content {
	color: var(--wp--preset--color--berry);
}

/* Product search, under the close button (phones have no search icon in the header). */
.ma-drawer > .ma-drawer__search {
	margin-block: 2px 4px;
}

/*
 * The shop's product categories (a Terms List block, so new categories show
 * up by themselves): below a dashed line, a small heading and a plain list,
 * sub-categories indented. Each row is a 44px tap target.
 */
.ma-drawer > .ma-drawer__categories {
	border-top: 1.5px dashed var(--wp--preset--color--sea-glass);
	margin-top: 12px;
	padding-top: 18px;
}

.ma-drawer__categories > .is-style-ma-kicker {
	margin: 0 0 2px;
}

.ma-drawer__terms.ma-drawer__terms,
.ma-drawer__terms .children {
	list-style: none;
	margin: 0;
	padding: 0;
}

.ma-drawer__terms .children {
	padding-left: 16px;
}

.ma-drawer__terms a {
	align-items: center;
	color: var(--wp--preset--color--accent);
	display: flex;
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 600;
	line-height: 1.3;
	min-height: 44px;
	text-decoration: none;
}

.ma-drawer__terms .children a {
	color: var(--wp--preset--color--contrast-soft);
	font-weight: 500;
}

.ma-drawer__terms a:hover {
	color: var(--wp--preset--color--accent-light);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.ma-drawer__terms .current-cat > a {
	color: var(--wp--preset--color--berry);
}

/* The cream monogram sits low in the sheet, just above the Instagram link. */
.ma-drawer > .ma-drawer__mark {
	margin: auto 0 4px;
	padding-top: 12px;
	width: 64px;
}

.ma-drawer > .ma-drawer__mark img {
	display: block;
	height: 64px;
	width: 64px;
}

.ma-drawer > .ma-drawer__footer {
	margin-top: 0;
}

/* A drawer saved with the second design keeps its flower in the corner. */
.ma-drawer > .wp-block-image.is-style-ma-sticker {
	--ma-sticker-size: 130px;
	--ma-sticker-tilt: -12deg;
	bottom: 96px;
	right: -30px;
}

.ma-drawer:not(:has(.ma-drawer__mark)) > .ma-drawer__footer {
	margin-top: auto;
}
