/* ----- Mobile drawer ----- */

/* stylelint-disable no-descending-specificity */

/* Drawer state selectors intentionally override header states. */

.argyll-mobile-menu-trigger,
.argyll-mobile-menu-back,
.argyll-mobile-drawer {
	display: none;
}

html.argyll-no-scroll,
html.argyll-no-scroll body {
	overflow: hidden;
}

@media (max-width: 1024px) {

	.site-header__navigation,
	.site-header.is-expanded .site-header__navigation,
	.site-header.is-compact .site-header__navigation {
		display: none;
	}

	.argyll-mobile-menu-trigger {
		align-items: center;
		appearance: none;
		background: transparent;
		border: 0;
		color: var(--wp--preset--color--contrast);
		cursor: pointer;
		display: inline-flex;
		flex: 0 0 auto;
		height: 44px;
		justify-content: center;
		margin: 0;
		margin-left: auto;
		order: 4;
		padding: 0;
		position: relative;
		width: 44px;
		z-index: 1300;
	}

	.argyll-mobile-menu-trigger__icon {
		display: block;
		height: 24px;
		width: 24px;
	}

	.argyll-mobile-menu-trigger__icon--close {
		display: none;
	}

	.argyll-mobile-menu-trigger[aria-expanded="true"] .argyll-mobile-menu-trigger__icon--menu {
		display: none;
	}

	.argyll-mobile-menu-trigger[aria-expanded="true"] .argyll-mobile-menu-trigger__icon--close {
		display: block;
	}

	body.argyll-drawer-open .site-header.is-expanded > .wp-block-template-part {
		pointer-events: none;
		visibility: hidden;
	}

	body.argyll-drawer-open .site-header.is-compact > .wp-block-template-part {
		display: none;
	}

	body.argyll-drawer-open .site-header,
	body.argyll-drawer-open .site-header.is-expanded,
	body.argyll-drawer-open .site-header.is-compact {
		background-color: var(--wp--preset--color--base);
		box-shadow: none;
		left: 0;
		position: fixed;
		right: 0;
		top: 0;
		transform: none;
		z-index: 1300;
	}

	body.argyll-drawer-open .site-header__nav-row,
	body.argyll-drawer-open .site-header.is-expanded .site-header__nav-row,
	body.argyll-drawer-open .site-header.is-compact .site-header__nav-row {
		background-color: var(--wp--preset--color--base);
		position: relative;
		top: auto;
	}

	body.argyll-drawer-open .site-header.is-expanded .site-header__nav-row {
		padding-top: 13px;
		padding-bottom: 17px;
	}

	body.argyll-drawer-open .site-header.is-compact .site-header__nav-row {
		padding-top: 23px;
		padding-bottom: 23px;
	}

	body.argyll-drawer-open .site-header__nav-inner,
	body.argyll-drawer-open .site-header.is-expanded .site-header__nav-inner,
	body.argyll-drawer-open .site-header.is-compact .site-header__nav-inner {
		column-gap: 0;
		justify-content: flex-end;
		max-width: 100%;
	}

	body.argyll-drawer-open[data-argyll-drawer-panel="parks"] .site-header__nav-inner,
	body.argyll-drawer-open[data-argyll-drawer-panel="parks"] .site-header.is-expanded .site-header__nav-inner,
	body.argyll-drawer-open[data-argyll-drawer-panel="parks"] .site-header.is-compact .site-header__nav-inner {
		justify-content: space-between;
	}

	body.argyll-drawer-open .site-header.is-expanded .site-header__brand-row,
	body.argyll-drawer-open .site-header.is-compact .site-header__brand-row,
	body.argyll-drawer-open .site-header__brand-row,
	body.argyll-drawer-open .site-header.is-expanded .site-header__compact-brand,
	body.argyll-drawer-open .site-header.is-compact .site-header__compact-brand,
	body.argyll-drawer-open .site-header__compact-brand,
	body.argyll-drawer-open .site-header .argyll-cta--with-icon,
	body.argyll-drawer-open .site-header__actions {
		display: none !important;
	}

	body.argyll-drawer-open .argyll-mobile-menu-trigger {
		margin-left: 0;
	}

	.argyll-mobile-menu-trigger:focus {
		outline: 0;
	}

	.argyll-mobile-menu-trigger:focus-visible {
		border-radius: 4px;
		outline: 2px solid color-mix(in srgb, var(--wp--preset--color--contrast) 60%, transparent);
		outline-offset: 2px;
	}

	.argyll-mobile-drawer {
		display: block;
		inset: 0;
		pointer-events: none;
		position: fixed;
		visibility: hidden;
		z-index: 1200;
	}

	.argyll-mobile-drawer.is-open {
		pointer-events: auto;
		visibility: visible;
	}

	.argyll-mobile-drawer__backdrop {
		background-color: rgba(30, 30, 30, 0.45);
		inset: 0;
		opacity: 0;
		position: absolute;
		transition: opacity 280ms ease;
	}

	.argyll-mobile-drawer.is-open .argyll-mobile-drawer__backdrop {
		opacity: 1;
	}

	.argyll-mobile-drawer__sheet {
		background-color: var(--wp--preset--color--base);
		color: var(--wp--preset--color--contrast);
		display: flex;
		flex-direction: column;
		height: 100%;
		left: 0;
		overflow: hidden;
		position: absolute;
		top: 0;
		transform: translateX(-100%);
		transition: transform 360ms cubic-bezier(0.22, 1, 0.36, 1);
		width: 100%;
	}

	.argyll-mobile-drawer.is-open .argyll-mobile-drawer__sheet {
		transform: translateX(0);
	}

	.argyll-mobile-menu-back {
		align-items: center;
		appearance: none;
		background: transparent;
		border: 0;
		color: var(--wp--preset--color--contrast);
		cursor: pointer;
		display: none;
		flex: 0 0 auto;
		font-family: var(--wp--preset--font-family--display);
		font-size: 18px;
		font-weight: 500;
		gap: 4px;
		height: 44px;
		line-height: 28px;
		margin: 0;
		margin-right: auto;
		order: 0;
		padding: 0;
		position: relative;
		z-index: 1300;
	}

	body.argyll-drawer-open[data-argyll-drawer-panel="parks"] .argyll-mobile-menu-back {
		display: inline-flex;
	}

	.argyll-mobile-menu-back svg {
		height: 24px;
		width: 24px;
	}

	.argyll-mobile-drawer__track {
		display: flex;
		flex: 1 1 auto;
		min-height: 0;
		transform: translateX(0);
		transition: transform 320ms cubic-bezier(0.22, 1, 0.36, 1);
		width: 200%;
	}

	.argyll-mobile-drawer[data-panel="parks"] .argyll-mobile-drawer__track {
		transform: translateX(-50%);
	}

	.argyll-mobile-drawer__panel {
		flex: 0 0 50%;
		min-width: 0;
		overflow-y: auto;
		padding: 0 20px 32px;
		-webkit-overflow-scrolling: touch;
	}

	.argyll-mobile-drawer__panel--main {
		padding-top: calc(var(--argyll-header-height, 80px) + 16px);
	}

	.argyll-mobile-drawer__panel--parks {
		padding-bottom: calc(120px + env(safe-area-inset-bottom));
		padding-top: calc(var(--argyll-header-height, 80px) + 24px);
	}

	.argyll-mobile-menu-list {
		display: flex;
		flex-direction: column;
		gap: 32px;
		list-style: none;
		margin: 0;
		padding: 0;
	}

	.argyll-mobile-menu-list__item {
		margin: 0;
	}

	.argyll-mobile-menu-link {
		align-items: center;
		appearance: none;
		background: transparent;
		border: 0;
		color: var(--wp--preset--color--contrast);
		cursor: pointer;
		display: inline-flex;
		font-family: var(--wp--preset--font-family--display);
		font-size: 27px;
		font-weight: 400;
		gap: 8px;
		line-height: 1;
		margin: 0;
		min-height: 48px;
		padding: 0;
		text-align: left;
		text-decoration: none;
	}

	.argyll-mobile-menu-link svg {
		flex: 0 0 24px;
		height: 24px;
		width: 24px;
	}

	.argyll-mobile-menu-link--external {
		text-decoration: underline;
		text-underline-offset: 0.18em;
	}

	.argyll-mobile-menu-link.is-argyll-nav-active {
		color: var(--wp--preset--color--secondary);
		text-decoration: underline;
		text-decoration-thickness: 2px;
		text-underline-offset: 0.22em;
	}

	.argyll-mobile-park-grid {
		column-gap: 16px;
		display: grid;
		grid-template-columns: repeat(2, 1fr);
		row-gap: 40px;
	}

	.argyll-mobile-park-card {
		color: var(--wp--preset--color--contrast);
		display: flex;
		flex-direction: column;
		gap: 8px;
		text-decoration: none;
	}

	.argyll-mobile-park-card__media {
		aspect-ratio: 1 / 1;
		border-radius: 8px;
		overflow: hidden;
		position: relative;
		width: 100%;
	}

	.argyll-mobile-park-card__media::after {
		background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, 0.5) 100%);
		content: "";
		inset: 0;
		pointer-events: none;
		position: absolute;
	}

	.argyll-mobile-park-card__image {
		display: block;
		height: 100%;
		object-fit: cover;
		width: 100%;
	}

	.argyll-mobile-park-card__body {
		display: flex;
		flex-direction: column;
	}

	.argyll-mobile-park-card__title {
		font-family: var(--wp--preset--font-family--display);
		font-size: 18px;
		font-weight: 500;
		line-height: 28px;
		margin: 0;
	}

	.argyll-mobile-park-card__location {
		font-family: var(--wp--preset--font-family--body);
		font-size: 14px;
		line-height: 1.3;
		margin: 0;
	}

	.argyll-mobile-view-all {
		align-items: center;
		border-top: 1px solid rgba(30, 30, 30, 0.4);
		color: var(--wp--preset--color--contrast);
		display: flex;
		font-family: var(--wp--preset--font-family--display);
		font-size: 27px;
		font-weight: 400;
		gap: 16px;
		line-height: 1;
		margin-top: 40px;
		padding: 24px 0 8px;
		text-decoration: underline;
		text-underline-offset: 0.18em;
	}

	.argyll-mobile-view-all svg {
		flex: 0 0 22px;
		height: 22px;
		width: 22px;
	}
}

@media (min-width: 656px) and (max-width: 870px) {

	.argyll-mobile-park-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (min-width: 871px) and (max-width: 1024px) {

	.argyll-mobile-park-grid {
		grid-template-columns: repeat(4, 1fr);
	}
}

/* stylelint-enable no-descending-specificity */

@media (prefers-reduced-motion: reduce) {

	.argyll-mobile-drawer__sheet,
	.argyll-mobile-drawer__track,
	.argyll-mobile-drawer__backdrop {
		transition: none;
	}
}
