/**
 * Mobile header: three-icon bar, full-screen search, slide-in menu.
 *
 * Brand colours:
 *   #2c2d33  background (bar, search overlay, menu panel, sub-menus)
 *   #ffffff  all text and icons
 *   No hover colours.
 *
 * Dividers and fills use white at low opacity so they read on #2c2d33
 * without introducing another colour.
 *
 * Everything is scoped to <= 767px; the desktop header is untouched.
 */

/* The bar only exists on handheld widths. */
.rr-mh {
	display: none;
}

@media only screen and (max-width: 767px) {

	/* ---------------------------------------------------------------
	 * Stand down the Storefront header on mobile
	 * ------------------------------------------------------------ */

	.site-header .site-branding,
	.site-header .site-logo-anchor,
	.site-header .site-logo-link,
	.site-header .storefront-primary-navigation,
	.site-header .main-navigation,
	.site-header .menu-toggle,
	.site-header .site-header-cart,
	.site-header .secondary-navigation,
	.site-header .site-search,
	.regal-header-menu > .menu-search {
		display: none !important;
	}

	.site-header {
		padding: 0 !important;
		border: 0 !important;
	}

	/* Matches the bar's rendered height: 44px touch targets + 15px top and
	   bottom padding. Keep these in step. */
	body {
		padding-top: 74px;
	}

	/* ---------------------------------------------------------------
	 * Bar
	 * ------------------------------------------------------------ */

	.rr-mh {
		display: block;
	}

	.rr-mh__bar {
		position: fixed;
		top: 0;
		left: 0;
		right: 0;
		z-index: 9998;
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 15px 30px;
		padding-left: calc(30px + env(safe-area-inset-left, 0px));
		padding-right: calc(30px + env(safe-area-inset-right, 0px));
		background: #2c2d33;
		border-bottom: 1px solid rgba(255, 255, 255, 0.16);
		color: #ffffff;
		font-family: "Source Sans Pro", "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
	}

	.admin-bar .rr-mh__bar,
	.admin-bar .rr-mh__panel {
		top: 46px;
	}

	.rr-mh__brand {
		display: flex;
		align-items: center;
		min-width: 0;
	}

	.rr-mh__logo {
		display: block;
		max-width: 60vw;
		line-height: 0;
	}

	.rr-mh__logo img {
		display: block;
		width: auto;
		max-width: 100%;
		max-height: 38px;
	}

	.rr-mh__logo--text {
		overflow: hidden;
		color: #ffffff;
		font-size: 17px;
		font-weight: 600;
		line-height: 1.2;
		white-space: nowrap;
		text-overflow: ellipsis;
		text-decoration: none;
	}

	.rr-mh__actions {
		display: flex;
		align-items: center;
		gap: 2px;
		margin-left: auto;
		/* Cancel the bar's right padding so the last icon's glyph lines up
		   optically with the logo's left edge, not its button box. */
		margin-right: -12px;
	}

	.rr-mh__btn {
		position: relative;
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 44px;
		height: 44px;
		margin: 0;
		padding: 0;
		border: 0;
		border-radius: 50%;
		background: none;
		color: #ffffff;
		text-decoration: none;
		cursor: pointer;
		-webkit-appearance: none;
		appearance: none;
		-webkit-tap-highlight-color: transparent;
	}

	.rr-mh__btn:focus {
		outline: none;
	}

	/* Keyboard focus only - never shows on tap or hover. */
	.rr-mh__btn:focus-visible {
		outline: 2px solid #ffffff;
		outline-offset: -2px;
	}

	.rr-mh__icon {
		display: block;
		flex: none;
	}

	.rr-mh__cartcount {
		position: absolute;
		top: 5px;
		right: 5px;
		min-width: 16px;
		height: 16px;
		padding: 0 4px;
		border-radius: 8px;
		background: #ffffff;
		color: #2c2d33;
		font-size: 10px;
		font-weight: 600;
		line-height: 16px;
		text-align: center;
	}

	.rr-mh__cartcount.is-empty {
		display: none;
	}

	/* ---------------------------------------------------------------
	 * Panels (search overlay + slide-in menu)
	 * ------------------------------------------------------------ */

	.rr-mh__panel {
		position: fixed;
		top: 0;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 9999;
		display: flex;
		flex-direction: column;
		background: #2c2d33;
		color: #ffffff;
		font-family: "Source Sans Pro", "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
		visibility: hidden;
		opacity: 0;
		transition: opacity 0.22s cubic-bezier(0.4, 0, 0.2, 1), transform 0.28s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s linear 0.28s;
	}

	.rr-mh__panel--search {
		transform: translateY(-8px);
	}

	.rr-mh__panel--menu {
		transform: translateX(100%);
		opacity: 1;
	}

	.rr-mh__panel.is-open {
		visibility: visible;
		opacity: 1;
		transform: none;
		transition-delay: 0s;
	}

	body.rr-mh-locked {
		position: fixed;
		width: 100%;
		overflow: hidden;
	}

	.rr-mh__panelbody {
		flex: 1 1 auto;
		padding: 8px 30px 40px;
		padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px));
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
		overscroll-behavior: contain;
	}

	/* ---------------------------------------------------------------
	 * Search bar inside the overlay
	 * ------------------------------------------------------------ */

	.rr-mh__searchbar {
		display: flex;
		align-items: center;
		flex: none;
		gap: 6px;
		height: 74px;
		padding: 0 18px 0 30px;
		border-bottom: 1px solid rgba(255, 255, 255, 0.16);
	}

	.rr-mh__searchicon {
		display: flex;
		flex: none;
		color: #ffffff;
	}

	.rr-mh__input {
		flex: 1 1 auto;
		width: 100%;
		min-width: 0;
		height: 36px;
		margin: 0;
		padding: 0 4px;
		border: 0;
		background: none;
		box-shadow: none;
		color: #ffffff;
		font-family: inherit;
		/* 16px keeps iOS from zooming the viewport on focus. */
		font-size: 16px;
		line-height: 36px;
		-webkit-appearance: none;
		appearance: none;
	}

	.rr-mh__input::placeholder {
		color: rgba(255, 255, 255, 0.6);
		opacity: 1;
	}

	.rr-mh__input:focus {
		outline: none;
		box-shadow: none;
	}

	.rr-mh__input::-webkit-search-cancel-button,
	.rr-mh__input::-webkit-search-decoration {
		-webkit-appearance: none;
		appearance: none;
	}

	.rr-mh__clear {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		flex: none;
		width: 28px;
		height: 28px;
		padding: 0;
		border: 0;
		border-radius: 50%;
		background: rgba(255, 255, 255, 0.15);
		color: #ffffff;
		cursor: pointer;
		-webkit-appearance: none;
		appearance: none;
	}

	.rr-mh__clear .rr-mh__icon {
		width: 14px;
		height: 14px;
	}

	.rr-mh__clear[hidden] {
		display: none;
	}

	.rr-mh__cancel {
		flex: none;
		padding: 0 6px;
		border: 0;
		background: none;
		color: #ffffff;
		font-family: inherit;
		font-size: 15px;
		line-height: 1;
		cursor: pointer;
		-webkit-appearance: none;
		appearance: none;
	}

	/* ---------------------------------------------------------------
	 * Suggestions
	 * ------------------------------------------------------------ */

	.rr-mh__quicklinks[hidden] {
		display: none;
	}

	.rr-mh__sectiontitle {
		margin: 16px 0 6px;
		padding: 0;
		color: rgba(255, 255, 255, 0.7);
		font-size: 12px;
		font-weight: 600;
		letter-spacing: 0.04em;
		text-transform: uppercase;
	}

	.rr-mh__quicklist,
	.rr-mh__list {
		margin: 0;
		padding: 0;
		list-style: none;
	}

	.rr-mh__quicklist a,
	.rr-mh__row {
		display: flex;
		align-items: center;
		gap: 12px;
		padding: 11px 8px;
		margin: 0 -8px;
		border-radius: 4px;
		color: #ffffff;
		font-size: 16px;
		line-height: 1.3;
		text-decoration: none;
	}

	/* Arrow-key highlight only. Not a hover state. */
	.rr-mh__row.is-active {
		background: rgba(255, 255, 255, 0.1);
	}

	.rr-mh__thumb {
		flex: none;
		width: 44px;
		height: 44px;
		border-radius: 4px;
		background: rgba(255, 255, 255, 0.1) no-repeat center / cover;
	}

	.rr-mh__rowtext {
		min-width: 0;
	}

	.rr-mh__rowtitle {
		display: -webkit-box;
		overflow: hidden;
		-webkit-line-clamp: 2;
		-webkit-box-orient: vertical;
	}

	.rr-mh__rowmeta {
		display: block;
		margin-top: 2px;
		color: rgba(255, 255, 255, 0.7);
		font-size: 13px;
	}

	.rr-mh__rowmeta del {
		opacity: 0.6;
	}

	.rr-mh__rowmeta ins {
		text-decoration: none;
	}

	.rr-mh__seeall {
		font-weight: 600;
		color: #ffffff;
	}

	.rr-mh__empty,
	.rr-mh__status {
		padding: 20px 0;
		color: rgba(255, 255, 255, 0.7);
		font-size: 15px;
	}

	/* ---------------------------------------------------------------
	 * Menu panel
	 * ------------------------------------------------------------ */

	.rr-mh__panelhead {
		display: flex;
		align-items: center;
		justify-content: flex-end;
		flex: none;
		height: 74px;
		padding: 0 18px;
		border-bottom: 1px solid rgba(255, 255, 255, 0.16);
	}

	.rr-mh__menu,
	.rr-mh__menu .sub-menu {
		margin: 0;
		padding: 0;
		list-style: none;
	}

	.rr-mh__menu li {
		margin: 0;
		border-bottom: 1px solid rgba(255, 255, 255, 0.16);
	}

	.rr-mh__menu .sub-menu li:last-child {
		border-bottom: 0;
	}

	.rr-mh__menu a {
		display: block;
		padding: 14px 0;
		color: #ffffff;
		font-size: 17px;
		line-height: 1.3;
		text-decoration: none;
	}

	/* A flex row keeps the disclosure button aligned with its own label at
	   any nesting depth, without absolute positioning. */
	.rr-mh__menurow {
		display: flex;
		align-items: stretch;
		gap: 8px;
	}

	.rr-mh__menurow > a {
		flex: 1 1 auto;
		min-width: 0;
	}

	.rr-mh__submenu-toggle {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		flex: none;
		width: 44px;
		margin-right: -10px;
		padding: 0;
		border: 0;
		background: none;
		color: #ffffff;
		cursor: pointer;
		-webkit-appearance: none;
		appearance: none;
	}

	.rr-mh__submenu-toggle svg {
		transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
	}

	.rr-mh__submenu-toggle[aria-expanded="true"] svg {
		transform: rotate(180deg);
	}

	/* Sub-menus carry the same background and text colour as the top level. */
	.rr-mh__menu .sub-menu {
		display: none;
		padding: 0 0 8px 14px;
		background: #2c2d33;
	}

	.rr-mh__menu .sub-menu.is-open {
		display: block;
	}

	.rr-mh__menu .sub-menu a {
		padding: 11px 0;
		color: #ffffff;
		font-size: 15px;
	}
}

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

	.rr-mh__panel,
	.rr-mh__submenu-toggle svg {
		transition: none !important;
	}
}
