/**
 * Search panel, search box with suggestions, search results page, and the
 * sign-up popup.
 *
 * The search panel is one of the header's panels (dialog.ms-sheet, see
 * header.css for the shared panel rules). The sign-up popup keeps the
 * overlay, box, close button and fade of the Elementor Pro popup it replaced
 * (#2545).
 */

.ms-dialog {
	position: fixed;
	bottom: 0;
	left: 0;
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.8);
	-webkit-user-select: auto;
	user-select: auto;
}

.ms-dialog:focus {
	outline: none;
}

.ms-dialog[hidden] {
	display: none;
}

.ms-dialog__content {
	position: absolute;
	max-width: 100%;
	max-height: 100%;
	overflow: visible;
	background-color: #fff;
	border-radius: 0;
	box-shadow: 2px 8px 23px 3px rgba(0, 0, 0, 0.2);
}

.ms-dialog.is-opening .ms-dialog__content {
	animation: ms-fade-in 0.4s;
}

.ms-dialog.is-closing .ms-dialog__content {
	animation: ms-fade-in 0.4s reverse forwards;
}

@media (prefers-reduced-motion: reduce) {
	.ms-dialog.is-opening .ms-dialog__content,
	.ms-dialog.is-closing .ms-dialog__content {
		animation: none;
	}
}

@keyframes ms-fade-in {
	from {
		opacity: 0;
	}

	to {
		opacity: 1;
	}
}

.ms-dialog .ms-dialog__close {
	position: absolute;
	top: 20px;
	inset-inline-end: 20px;
	z-index: 9999;
	display: flex;
	margin-top: 0;
	font-size: 15px;
	line-height: 1;
	color: #000000;
	opacity: 1;
	cursor: pointer;
	transition: all 0.3s;
}

.ms-dialog__message {
	display: flex;
	max-width: 100vw;
	max-height: 100vh;
	overflow: auto;
	padding: 0;
	line-height: 1.5;
}

/* Search panel ------------------------------------------------------------ */

.ms-sheet--search .ms-sheet__panel {
	top: 0;
	right: 0;
	left: 0;
	max-height: 100%;
	overflow-y: auto;
	overscroll-behavior: contain;
	opacity: 0;
	transform: translateY(-12px);
}

.ms-search {
	width: 100%;
	max-width: 880px;
	margin: 0 auto;
	padding: 20px var(--hd-edge) 36px;
}

.ms-search__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	min-height: 56px;
	margin-bottom: 16px;
}

.ms-search__title {
	margin: 0;
	font-family: var(--hd-serif);
	font-size: 32px;
	font-weight: 600;
	line-height: 1.1;
	color: var(--hd-navy);
}

.ms-search__browse {
	margin-top: 28px;
}

.ms-search__browse[hidden] {
	display: none;
}

@media (max-width: 767px) {
	/* Phones: the whole screen, with the box at the top above the keyboard. */
	.ms-sheet--search .ms-sheet__panel {
		bottom: 0;
		box-shadow: none;
	}

	.ms-search {
		padding: 8px var(--hd-edge) calc(24px + env(safe-area-inset-bottom));
	}

	.ms-search__head {
		min-height: 64px;
		margin-bottom: 8px;
	}

	.ms-search__title {
		font-size: 24px;
	}
}

/* Search box (panel and results page) -------------------------------------- */

.ms-sf {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 8px;
	margin: 0;
}

.ms-sf__field {
	position: relative;
}

.ms-sf__icon {
	position: absolute;
	top: 50%;
	left: 16px;
	font-size: 16px;
	color: var(--hd-muted);
	pointer-events: none;
	transform: translateY(-50%);
}

.ms-kit .ms-sf__input[type="search"] {
	display: block;
	width: 100%;
	height: 56px;
	padding: 0 48px 0 44px;
	font-family: var(--hd-sans);
	font-size: 17px;
	font-weight: 400;
	line-height: 1.2;
	color: var(--hd-ink);
	background-color: #fff;
	border: 1px solid var(--hd-field);
	border-radius: 0;
	transition: border-color 0.15s ease-out;
	-webkit-appearance: none;
	appearance: none;
}

.ms-kit .ms-sf__input[type="search"]:focus {
	border-color: var(--hd-navy);
	outline: 2px solid var(--hd-navy);
	outline-offset: -2px;
}

.ms-sf__input::placeholder {
	color: #6b6b6b;
	opacity: 1;
}

.ms-sf__input::-webkit-search-cancel-button,
.ms-sf__input::-webkit-search-decoration {
	display: none;
	-webkit-appearance: none;
}

.ms-kit .ms-sf__clear {
	position: absolute;
	top: 50%;
	right: 6px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	font-size: 14px;
	color: var(--hd-muted);
	background: transparent;
	border: 0;
	border-radius: 0;
	transform: translateY(-50%);
}

.ms-kit .ms-sf__clear:hover,
.ms-kit .ms-sf__clear:focus {
	color: var(--hd-ink);
	background: transparent;
}

.ms-sf__clear[hidden] {
	display: none;
}

.ms-kit .ms-sf__submit {
	height: 56px;
	padding: 0 28px;
	font-family: var(--hd-sans);
	font-size: 16px;
	font-weight: 500;
	color: #fff;
	background-color: var(--hd-navy);
	border: 0;
	border-radius: 0;
	transition: background-color 0.15s ease-out;
}

.ms-kit .ms-sf__submit:hover,
.ms-kit .ms-sf__submit:focus {
	color: #fff;
	background-color: var(--hd-navy-dark);
}

.ms-sf.is-submitting .ms-sf__submit {
	opacity: 0.7;
}

.ms-sf__panel {
	grid-column: 1 / -1;
	margin-top: 8px;
}

.ms-sf__panel[hidden],
.ms-sf__list[hidden],
.ms-sf__loading[hidden],
.ms-sf__message[hidden] {
	display: none;
}

.ms-sf__message {
	margin: 0;
	padding: 14px 0;
	font-family: var(--hd-sans);
	font-size: 15px;
	line-height: 1.5;
	color: #333;
}

.ms-sf__list {
	display: flex;
	flex-direction: column;
	border-top: 1px solid var(--hd-line);
	transition: opacity 0.15s ease-out;
}

.ms-sf.is-busy .ms-sf__list {
	opacity: 0.5;
}

.ms-kit .ms-sf__option {
	display: flex;
	align-items: center;
	gap: 14px;
	min-height: 64px;
	padding: 8px 12px;
	color: var(--hd-ink);
	text-decoration: none;
	border-bottom: 1px solid #efefef;
}

.ms-kit .ms-sf__option:hover,
.ms-kit .ms-sf__option[aria-selected="true"] {
	color: var(--hd-ink);
	background-color: var(--hd-tint);
}

.ms-sf__option[aria-selected="true"] {
	box-shadow: inset 3px 0 0 var(--hd-navy);
}

.ms-sf__img {
	flex: none;
	width: 48px;
	height: 72px;
	object-fit: cover;
	background-color: var(--hd-surface);
}

.ms-sf__text {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.ms-sf__name {
	display: -webkit-box;
	overflow: hidden;
	font-family: var(--hd-sans);
	font-size: 15px;
	font-weight: 400;
	line-height: 1.35;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.ms-sf__name mark {
	font-weight: 600;
	color: inherit;
	background: transparent;
}

.ms-sf__price {
	font-family: var(--hd-sans);
	font-size: 14px;
	font-variant-numeric: tabular-nums;
	color: #333;
}

.ms-sf__price del {
	margin-right: 2px;
	color: #6b6b6b;
}

.ms-sf__stock {
	margin-left: 10px;
	font-size: 13px;
	color: var(--hd-muted);
}

.ms-kit .ms-sf__option--all {
	justify-content: space-between;
	min-height: 52px;
	font-family: var(--hd-sans);
	font-size: 15px;
	font-weight: 500;
	color: var(--hd-navy);
	border-bottom: 0;
}

.ms-kit .ms-sf__option--all:hover,
.ms-kit .ms-sf__option--all[aria-selected="true"] {
	color: var(--hd-navy-dark);
}

.ms-sf__arrow {
	font-size: 12px;
	transform: scaleX(-1);
}

@media (max-width: 767px) {
	.ms-kit .ms-sf__input[type="search"],
	.ms-kit .ms-sf__submit {
		height: 52px;
	}

	.ms-kit .ms-sf__submit {
		padding: 0 18px;
	}

	/* 16px or more stops iOS zooming into the box. */
	.ms-kit .ms-sf__input[type="search"] {
		font-size: 16px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ms-sf__list,
	.ms-kit .ms-sf__input[type="search"] {
		transition: none;
	}
}

/* Links into the shop (before typing, and when nothing matches) */

.ms-browse__title {
	margin: 0 0 12px;
	font-family: var(--hd-sans);
	font-size: 13px;
	font-weight: 500;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--hd-muted);
}

.ms-browse__list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ms-kit .ms-browse__link {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0 16px;
	font-family: var(--hd-sans);
	font-size: 15px;
	color: var(--hd-ink);
	text-decoration: none;
	background-color: #fff;
	border: 1px solid #cfcfcf;
	transition: border-color 0.15s ease-out, color 0.15s ease-out;
}

.ms-kit .ms-browse__link:hover {
	color: var(--hd-navy);
	border-color: var(--hd-navy);
}

/* Search results page ------------------------------------------------------ */

.ms-sr {
	max-width: 1400px;
	margin: 0 auto;
	padding: 40px 20px 64px;
}

.ms-sr__head {
	display: grid;
	gap: 20px;
	margin-bottom: 32px;
	padding-bottom: 28px;
	border-bottom: 1px solid var(--hd-line);
}

.ms-sr__title {
	margin: 0;
	font-family: var(--hd-serif);
	font-size: 40px;
	font-weight: 400;
	line-height: 1.1;
	color: var(--hd-ink);
	overflow-wrap: anywhere;
}

.ms-sr__words {
	color: var(--hd-navy);
}

.ms-sr__count {
	margin: 10px 0 0;
	font-family: var(--hd-sans);
	font-size: 15px;
	color: var(--hd-muted);
}

/* On the page the suggestions open over the results. */
.ms-sr__form .ms-sf__panel {
	position: absolute;
	top: calc(100% + 4px);
	right: 0;
	left: 0;
	z-index: 30;
	max-height: min(75vh, 640px);
	margin: 0;
	overflow-y: auto;
	background-color: #fff;
	border: 1px solid var(--hd-line);
	box-shadow: 0 16px 32px -16px rgba(16, 22, 38, 0.3);
}

.ms-sr__form .ms-sf__message {
	padding: 14px 16px;
}

.ms-sr__form .ms-sf__list {
	border-top: 0;
}

.ms-sr__empty {
	max-width: 760px;
	padding: 8px 0 24px;
}

.ms-sr__empty-title {
	margin: 0 0 8px;
	font-family: var(--hd-serif);
	font-size: 28px;
	line-height: 1.2;
	color: var(--hd-ink);
}

.ms-sr__empty-text {
	margin: 0 0 28px;
	font-family: var(--hd-sans);
	font-size: 16px;
	line-height: 1.5;
	color: var(--hd-muted);
}

@media (min-width: 1025px) {
	.ms-sr__head {
		grid-template-columns: minmax(0, 1fr) minmax(0, 560px);
		align-items: end;
		gap: 48px;
	}
}

@media (max-width: 767px) {
	.ms-sr {
		padding: 28px 16px 48px;
	}

	.ms-sr__head {
		margin-bottom: 24px;
		padding-bottom: 20px;
	}

	.ms-sr__title {
		font-size: 30px;
	}

	.ms-sr__empty-title {
		font-size: 24px;
	}
}

/* Sign-up popup --------------------------------------------------------- */

.ms-dialog--signup .ms-dialog__message {
	width: 826px;
}

.ms-signup {
	position: relative;
	display: flex;
	align-items: center;
	width: 100%;
	max-width: 1140px;
	min-height: 571px;
	margin: 0 auto;
}

.ms-signup__photo,
.ms-signup__body {
	position: relative;
	display: flex;
	flex-wrap: wrap;
	align-content: flex-start;
	width: 50%;
	min-height: 1px;
	padding: 10px;
}

.ms-signup__photo {
	align-self: stretch;
	background-position: center center;
	background-size: cover;
}

.ms-signup__spacer {
	width: 100%;
	height: 559px;
}

.ms-signup__body {
	width: calc(50% - 30px);
	margin: 0 15px;
	background-color: #FFFFFF;
}

.ms-signup__body > * {
	position: relative;
	width: 100%;
	text-align: center;
}

.ms-signup__title {
	margin: 0 0 20px;
	padding: 0;
	font-family: "Times New Roman", Sans-serif;
	font-size: 29px;
	font-weight: 400;
	line-height: 1.2em;
	color: #000000;
}

.ms-signup__text {
	z-index: 2;
	margin: 0 0 20px;
	font-family: "Roboto", Sans-serif;
	font-size: 16px;
	font-weight: 300;
	color: #000000;
}

.ms-signup__form {
	z-index: 1;
	margin-top: -59px;
}

@media (max-width: 767px) {
	.ms-dialog--signup .ms-dialog__message {
		width: 100%;
	}

	.ms-signup {
		flex-wrap: wrap;
		max-width: 767px;
		padding: 0 15px;
	}

	.ms-signup__photo,
	.ms-signup__body {
		width: 100%;
		margin: 0;
		padding: 0;
	}

	.ms-signup__spacer {
		height: 215px;
	}

	.ms-signup__title {
		font-size: 27px;
	}
}
