html.domotex-has-open-drawer {
	overflow: hidden;
	overscroll-behavior: none;
}

dialog.domotex-drawer {
	position: fixed;
	inset: 0 0 0 auto;
	width: min(100vw, 520px);
	max-width: 100vw;
	height: 100vh;
	max-height: 100dvh;
	margin: 0;
	border: 0;
	border-radius: 0;
	padding: 0;
	background: var(--domotex-color-white);
	color: var(--domotex-color-charcoal);
	box-shadow: -16px 0 40px var(--domotex-color-shadow);
	overflow: auto;
	overscroll-behavior: contain;
}

dialog.domotex-drawer:not([open]) {
	display: none;
}

dialog.domotex-drawer[open] {
	animation: domotex-drawer-in 190ms cubic-bezier(0.2, 0.75, 0.25, 1) both;
}

dialog.domotex-drawer::backdrop {
	background: var(--domotex-color-drawer-backdrop);
	backdrop-filter: blur(1px);
}

.domotex-drawer__header {
	position: sticky;
	z-index: 2;
	top: 0;
	display: flex;
	min-height: 68px;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	border-bottom: 1px solid var(--domotex-color-warm-border);
	padding: 0.75rem 1.25rem;
	background: var(--domotex-color-white);
}

.domotex-drawer__header h2 {
	margin: 0;
	font-size: 1rem;
	font-weight: 700;
}

.domotex-drawer__brand {
	color: inherit;
	font-size: 1.1rem;
	font-weight: 750;
	letter-spacing: -0.035em;
	text-decoration: none;
}

.domotex-drawer__eyebrow {
	color: var(--domotex-color-muted);
	font-size: 0.75rem;
	font-weight: 650;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.domotex-search-drawer .domotex-search-form {
	display: block;
	padding: 1.75rem 1.5rem;
}

.domotex-search-drawer .domotex-search-form > label,
.domotex-rug-finder__step label {
	font-size: 0.875rem;
	font-weight: 650;
}

.domotex-search-drawer .domotex-search-form__field {
	display: flex;
	min-height: 54px;
	align-items: center;
	gap: 0.35rem;
	border: 1px solid var(--domotex-color-warm-border);
	border-radius: var(--domotex-radius-control, 6px);
	padding-inline: 0.75rem;
	background: var(--domotex-color-white);
}

.domotex-search-drawer .domotex-search-form__field:focus-within,
.domotex-search-results__form .domotex-search-form__field:focus-within {
	outline: 2px solid var(--domotex-color-charcoal);
	outline-offset: 2px;
}

.domotex-search-drawer .domotex-search-form__field .domotex-search-form__icon {
	display: grid;
	width: 24px;
	flex: 0 0 auto;
	place-items: center;
	color: var(--domotex-color-charcoal);
}

.domotex-search-drawer .domotex-search-form__field input[type="search"] {
	width: auto;
	flex: 1 1 auto;
	border: 0;
	border-radius: 0;
	padding-inline: 0.25rem;
	background: transparent;
	box-shadow: none;
	outline: 0;
}

.domotex-search-drawer .domotex-drawer__header .domotex-icon-button {
	color: var(--domotex-color-charcoal);
}

.domotex-rug-finder select {
	width: 100%;
	min-width: 0;
	min-height: 48px;
	border: 1px solid var(--domotex-color-input-border-strong);
	border-radius: var(--domotex-radius-control);
	padding: 0.7rem 0.8rem;
	background: var(--domotex-color-white);
	color: var(--domotex-color-charcoal);
	font: inherit;
}

.domotex-mobile-menu__screen {
	padding: 0;
}

.domotex-mobile-menu__screen[hidden],
.domotex-mobile-menu [hidden] {
	display: none !important;
}

.domotex-mobile-menu__customer-shortcuts {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0;
	margin-block: 1rem 1.25rem;
	border-top: 1px solid var(--domotex-color-warm-border);
}

.domotex-mobile-menu__customer-shortcuts a {
	display: grid;
	min-height: 64px;
	grid-template-columns: 40px minmax(0, 1fr) auto;
	align-items: center;
	gap: 0.8rem;
	border: 0;
	border-bottom: 1px solid var(--domotex-color-warm-border);
	border-radius: 0;
	padding: 0.4rem 0.25rem;
	background: transparent;
	color: var(--domotex-color-charcoal);
	font-size: 0.8rem;
	font-weight: 400;
	line-height: 1.25;
	text-align: left;
	text-decoration: none;
}

.domotex-mobile-menu__customer-shortcuts a > span:nth-child(2) {
	display: grid;
	gap: 0.1rem;
	align-content: center;
}

.domotex-mobile-menu__customer-shortcuts strong {
	font-size: 0.9rem;
	line-height: 1.2;
}

.domotex-mobile-menu__customer-shortcuts small {
	color: var(--domotex-color-muted);
	font-size: 0.74rem;
	font-weight: 400;
	line-height: 1.25;
}

.domotex-mobile-menu__customer-shortcuts .domotex-icon {
	width: 19px;
	height: 19px;
}

.domotex-mobile-menu__navigation > ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.domotex-mobile-menu__navigation > ul {
	border-top: 1px solid var(--domotex-color-warm-border);
}

.domotex-mobile-menu__navigation > ul > li {
	border-bottom: 1px solid var(--domotex-color-warm-border);
}

.domotex-mobile-menu__navigation > ul > li > a,
.domotex-mobile-menu__link {
	display: flex;
	width: 100%;
	min-height: 56px;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	border: 0;
	border-bottom: 1px solid var(--domotex-color-warm-border);
	padding: 0.75rem 0;
	background: transparent;
	color: var(--domotex-color-charcoal);
	font: inherit;
	font-size: 0.95rem;
	font-weight: 650;
	text-align: left;
	text-decoration: none;
}

.domotex-mobile-menu__navigation > ul > li:last-child > a {
	border-bottom: 0;
}

.domotex-mobile-menu__back {
	display: inline-flex;
	min-height: 44px;
	align-items: center;
	gap: 0.5rem;
	border: 0;
	padding: 0.5rem 0;
	background: transparent;
	color: var(--domotex-color-muted);
	cursor: pointer;
	font: inherit;
	font-size: 0.8rem;
	font-weight: 600;
}

.domotex-mobile-menu__back .domotex-icon {
	width: 17px;
	height: 17px;
}

.domotex-mobile-menu__screen h2:not(.screen-reader-text) {
	margin: 0.5rem 0 1.25rem;
	font-size: 1.5rem;
	line-height: 1.2;
}

dialog.domotex-rug-finder {
	display: flex;
	flex-direction: column;
	width: min(100vw, 540px);
	overflow: hidden;
}

/* WordPress shortcode formatting inserts empty paragraphs around this drawer. */
dialog.domotex-rug-finder > p {
	display: none;
}

.domotex-rug-finder__form {
	display: flex;
	min-height: 0;
	flex: 1 1 auto;
	flex-direction: column;
	padding: 1.75rem 1.5rem 1.5rem;
}

.domotex-rug-finder__scroll {
	min-height: 0;
	flex: 1 1 auto;
	overflow-y: auto;
}

.domotex-rug-finder__intro {
	margin-bottom: 1.5rem;
}

.domotex-rug-finder__step-count {
	margin: 0 0 0.45rem;
	color: var(--domotex-color-muted);
	font-size: 0.75rem;
	font-weight: 650;
}

.domotex-rug-finder__intro h2,
.domotex-rug-finder__intro h3 {
	margin: 0 0 0.5rem;
	font-size: clamp(1.6rem, 7vw, 2rem);
	line-height: 1.15;
}

.domotex-rug-finder__intro > p:last-child {
	margin: 0;
	color: var(--domotex-color-muted);
	font-size: 0.875rem;
}

.domotex-rug-finder__step {
	display: grid;
	gap: 0.65rem;
	margin: 0;
	border: 0;
	padding: 0;
}

.domotex-rug-finder__step[hidden] {
	display: none;
}

.domotex-rug-finder__actions {
	display: flex;
	gap: 0.75rem;
	margin-top: auto;
	padding-top: 2rem;
}

.domotex-rug-finder__actions .domotex-button {
	flex: 1;
}

@keyframes domotex-drawer-in {
	from { transform: translateX(1.5rem); opacity: 0.7; }
	to { transform: translateX(0); opacity: 1; }
}

@media (max-width: 600px) {
	dialog.domotex-drawer {
		width: 100vw;
	}

	dialog.domotex-search-drawer {
		inset: auto 0 0;
		width: 100vw;
		max-height: min(90dvh, 760px);
		border-radius: 18px 18px 0 0;
		box-shadow: 0 -14px 36px var(--domotex-color-shadow);
	}

	dialog.domotex-rug-finder {
		display: flex;
		inset: auto 0 0;
		width: 100vw;
		max-width: 100vw;
		height: 100dvh;
		max-height: 100dvh;
		flex-direction: column;
		border-radius: 18px 18px 0 0;
		padding: 0;
		background: var(--domotex-color-white);
		box-shadow: 0 -14px 36px var(--domotex-color-shadow);
		overflow: hidden;
	}

	dialog.domotex-search-drawer .domotex-drawer__header,
	dialog.domotex-rug-finder .domotex-drawer__header {
		min-height: 62px;
	}

	.domotex-search-drawer .domotex-search-form {
		padding: 1.25rem;
	}

	.domotex-search-drawer .domotex-search-form__field {
		grid-template-columns: none;
	}

	.domotex-rug-finder__form {
		min-height: min(68dvh, 560px);
		padding: 1.25rem 1.25rem max(1.25rem, env(safe-area-inset-bottom));
	}

	dialog.domotex-rug-finder .domotex-rug-finder__actions {
		flex: 0 0 auto;
		margin: 0;
		border-top: 1px solid var(--domotex-color-warm-border);
		padding: 0.65rem 1.35rem max(0.65rem, env(safe-area-inset-bottom));
		background: var(--domotex-color-white);
	}
}

@media (prefers-reduced-motion: reduce) {
	dialog.domotex-drawer[open] {
		animation: none;
	}
}
