/*
 * Site chrome 2026 — mobile header + drawer (< 1100px). Companion to chrome-26.css,
 * same token rules. Spacing tokens are picked by their value below 768px, where the
 * design's mobile frames are measured; between 768 and 1099px they read at desktop size.
 */

/* ------------------------------------------------------------ mobile header */
.c26-mbar,
.c26-drawer { display: none; }

@media (max-width: 1099.98px) {
	.c26-header {
		top: var(--spacing-l);
		left: var(--spacing-xl);
		right: var(--spacing-xl);
	}
	.c26.is-retracted .c26-header { transform: translateY(calc(-100% - 2 * var(--spacing-l))); }
	.c26-nav,
	.c26-actions { display: none; }

	.c26-header .c26-bar {
		height: 56px;
		padding: var(--spacing-l) var(--spacing-xl);
		border-radius: var(--wp--preset--border-radius--s);
	}
	.c26.is-drawer-open .c26-bar { border-radius: var(--wp--preset--border-radius--s) var(--wp--preset--border-radius--s) 0 0; box-shadow: none; }
	.c26-logo { width: 127.333px; height: 24px; }

	.c26-mbar { display: flex; gap: var(--spacing-3xl); align-items: center; }
	.c26-lang--mobile .c26-lang__btn {
		min-width: 60px;
		gap: var(--spacing-xs);
		padding: 0 var(--spacing-s);
		justify-content: center;
		box-shadow: inset 0 0 0 1px var(--border-default-tertiary);
	}
	.c26.is-drawer-open .c26-lang--mobile { display: none; }

	.c26-burger {
		display: flex;
		align-items: center;
		justify-content: center;
		width: 24px;
		height: 24px;
		padding: 0;
		border: 0;
		background: transparent;
		color: var(--icon-default-default);
		cursor: pointer;
		transition: color 0.3s ease-out;
	}
	.c26-burger svg { width: 24px; height: 24px; }
	.c26-burger__close,
	.c26.is-drawer-open .c26-burger__open { display: none; }
	.c26.is-drawer-open .c26-burger__close { display: flex; }

	/* Drawer: hangs under the bar inside the same rounded box (.nds-scheme-light in the markup) */
	.c26.is-drawer-open .c26-drawer {
		display: flex;
		flex-direction: column;
		max-height: calc(100vh - 2 * var(--spacing-l) - 56px);
		max-height: calc(100dvh - 2 * var(--spacing-l) - 56px);
		border-radius: 0 0 var(--wp--preset--border-radius--s) var(--wp--preset--border-radius--s);
		background: var(--background-default-binary);
		box-shadow: var(--nds-elevation-4);
		overflow: hidden;
	}
	.c26-drawer__screen { display: none; flex: 1 1 auto; min-height: 0; flex-direction: column; }
	.c26-drawer[data-level="root"] .c26-drawer__root,
	.c26-drawer__screen.is-active { display: flex; }
	.c26-drawer[data-level="root"] .c26-drawer__root { min-height: 429px; }

	.c26-drawer__item,
	.c26-drawer__back,
	.c26-drawer__explore,
	.c26-drawer__head,
	.c26-drawer__ln {
		font-family: var(--typography-body-small-font-family);
		font-size: var(--typography-body-small-font-size);
		font-weight: var(--typography-body-small-font-weight);
		line-height: var(--typography-body-small-line-height);
	}
	.c26-drawer__lnd {
		font-family: var(--typography-body-small-mobile-font-family);
		font-size: var(--typography-body-small-mobile-font-size);
		font-weight: var(--typography-body-small-mobile-font-weight);
		line-height: var(--typography-body-small-mobile-line-height);
	}
	/* Weights the design uses that the type scale does not define. */
	.c26-drawer__back,
	.c26-drawer__explore { font-weight: 500; }
	.c26-drawer__ln { font-weight: 400; }
	.c26-drawer__head { line-height: 1; }

	.c26-drawer__list { margin: 0; padding: 0 var(--spacing-xl); list-style: none; overflow-y: auto; }
	.c26-drawer__list li { margin: 0; }
	.c26-drawer__item {
		width: 100%;
		height: 48px;
		padding: var(--spacing-xl) 0;
		border: 0;
		border-bottom: 1px solid var(--border-default-quaternary);
		background: transparent;
		display: flex;
		align-items: center;
		justify-content: space-between;
		color: var(--text-default-default);
		cursor: pointer;
		text-align: left;
	}

	.c26-drawer__bar {
		height: 50px;
		flex-shrink: 0;
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: var(--spacing-l) var(--spacing-xl);
		border-top: 1px solid var(--border-default-quaternary);
		border-bottom: 1px solid var(--border-default-quaternary);
	}
	.c26-drawer__back,
	.c26-drawer__explore {
		display: flex;
		align-items: center;
		gap: var(--spacing-xs);
		padding: 0;
		border: 0;
		background: transparent;
		color: var(--text-default-default);
		cursor: pointer;
	}
	.c26-drawer__back .c26-ico,
	.c26-drawer__explore .c26-ico { width: 24px; height: 24px; }
	.c26-drawer__scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding-bottom: var(--spacing-l); }
	.c26-drawer__sep { height: 1px; margin: 0 var(--spacing-xl); background: var(--border-default-quaternary); }
	.c26-drawer__head { padding: var(--spacing-4xl) var(--spacing-xl) var(--spacing-xl); color: var(--text-default-secondary); }
	.c26-drawer__ln {
		display: flex;
		align-items: center;
		gap: var(--spacing-s);
		min-height: 48px;
		padding: var(--spacing-l) var(--spacing-xl);
		color: var(--text-default-default);
	}
	.c26-drawer__ln.has-desc { align-items: flex-start; }
	.c26-drawer__ln:active { background: var(--background-default-quaternary); }
	.c26-drawer__lnbody { display: flex; flex-direction: column; gap: var(--spacing-s); }
	.c26-drawer__lnd { color: var(--text-default-secondary); }

	/* Buttons are the theme's .button.nds-btn--md, sized by the design system as they are. */
	.c26-drawer__foot {
		flex-shrink: 0;
		display: flex;
		gap: var(--spacing-l);
		padding: var(--spacing-xl);
		border-top: 1px solid var(--border-default-quaternary);
		background: var(--background-default-binary);
	}
	.c26-drawer__foot .button { flex: 1 1 0; min-width: 0; white-space: nowrap; }

	/* app.css recolours a:hover / a:focus globally; restate where the design keeps the colour. */
	.c26-drawer__item:hover,
	.c26-drawer__ln:hover,
	.c26-drawer__ln:focus,
	.c26-drawer__back:hover,
	.c26-drawer__explore:hover,
	.c26-drawer__explore:focus { color: var(--text-default-default); }

	.c26-panel { display: none; }
}
