/*
 * Site Utilities Header & Footer Builder — shared front-end rules.
 * Each layout adds its own rules scoped to #arnsmesu-hf-<id> (row heights, colors,
 * element sizes). Logical properties keep left-to-right and right-to-left
 * layouts the same.
 */

.arnsmesu-hf {
	position: relative;
	font-size: 15px;
	line-height: 1.4;
}

/*
 * Each layout is a stacking context above the page. The header sits one step above the footer:
 * on a short page its menus open over a footer that comes later in the page.
 */
.arnsmesu-hf--header {
	z-index: 50;
}

.arnsmesu-hf--footer {
	z-index: 49;
}

/* An open side panel or search layer sits in <body> (see "Side panel and search layer"), so it is listed with .arnsmesu-hf. */
.arnsmesu-hf *,
.arnsmesu-hf *::before,
.arnsmesu-hf *::after,
.arnsmesu-hf-panel *,
.arnsmesu-hf-panel *::before,
.arnsmesu-hf-panel *::after,
.arnsmesu-hf-searchlayer *,
.arnsmesu-hf-searchlayer *::before,
.arnsmesu-hf-searchlayer *::after {
	box-sizing: border-box;
}

.arnsmesu-hf a,
.arnsmesu-hf-panel a,
.arnsmesu-hf-searchlayer a {
	color: inherit;
	text-decoration: none;
}

.arnsmesu-hf a:hover,
.arnsmesu-hf a:focus-visible,
.arnsmesu-hf-panel a:hover,
.arnsmesu-hf-panel a:focus-visible {
	color: var(--arnsmesu-hf-hover, inherit);
}

/* Layout -------------------------------------------------------------- */

.arnsmesu-hf--aside {
	display: grid;
}

/*
 * The aside slant (--arnsmesu-hf-aside-skew from the layout) cuts the edge toward the
 * bar: the right edge on left-to-right pages, the left edge on right-to-left ones.
 */
.arnsmesu-hf__aside {
	--arnsmesu-hf-aside-clip: polygon(0 0, 100% 0, calc(100% - var(--arnsmesu-hf-aside-skew, 0px)) 100%, 0 100%);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 12px 24px;
}

[dir="rtl"] .arnsmesu-hf__aside {
	--arnsmesu-hf-aside-clip: polygon(0 0, 100% 0, 100% 100%, var(--arnsmesu-hf-aside-skew, 0px) 100%);
}

.arnsmesu-hf__rows {
	min-width: 0;
}

.arnsmesu-hf__inner {
	display: flex;
	align-items: center;
	padding-inline: var(--arnsmesu-hf-pad, 24px);
}

.arnsmesu-hf__inner.is-boxed {
	max-width: calc(var(--arnsmesu-hf-width, 1280px) + 2 * var(--arnsmesu-hf-pad, 24px));
	margin-inline: auto;
}

.arnsmesu-hf__col {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	align-self: stretch;
	min-width: 0;
}

.arnsmesu-hf__col.is-start {
	justify-content: flex-start;
}

.arnsmesu-hf__col.is-center {
	justify-content: center;
}

.arnsmesu-hf__col.is-end {
	justify-content: flex-end;
}

.arnsmesu-hf__col.is-between {
	justify-content: space-between;
}

.arnsmesu-hf__col.is-stack {
	flex-direction: column;
	flex-wrap: nowrap;
	align-items: flex-start;
	justify-content: flex-start;
}

.arnsmesu-hf__col.is-stack.is-center {
	align-items: center;
}

.arnsmesu-hf__col.is-stack.is-end {
	align-items: flex-end;
}

.arnsmesu-hf-e {
	display: flex;
	align-items: center;
	min-width: 0;
}

.arnsmesu-hf-icon {
	display: block;
	flex: none;
	width: 22px;
	height: 22px;
}

.arnsmesu-hf-empty {
	padding: 2px 8px;
	border: 1px dashed currentColor;
	border-radius: 4px;
	font-size: 12px;
	opacity: .7;
}

/* Sticky, transparent ------------------------------------------------- */

/*
 * A sticky or transparent header starts below the admin bar and below a sticky
 * ARN Announcement Bar, whose runtime puts its height on <html>
 * (--arnsmesu-announcement-room, VDX-F-052); without one the room is 0.
 */
.arnsmesu-hf--sticky {
	position: sticky;
	top: calc(var(--wp-admin--admin-bar--height, 0px) + var(--arnsmesu-announcement-room, 0px));
	transition: transform .25s ease, background-color .25s ease, color .25s ease, box-shadow .25s ease;
}

.arnsmesu-hf--sticky .arnsmesu-hf__inner {
	transition: min-height .25s ease;
}

.arnsmesu-hf--sticky.is-hidden {
	transform: translateY(-100%);
}

/* Links to a spot on the page (#reviews) land below a sticky header: arnsmesu-hf.js publishes its height, 0 while a smart header is hidden. */
html:has(.arnsmesu-hf--sticky) {
	scroll-padding-block-start: calc(var(--wp-admin--admin-bar--height, 0px) + var(--arnsmesu-announcement-room, 0px) + var(--arnsmesu-hf-sticky-height, 0px));
}

.arnsmesu-hf--transparent {
	position: absolute;
	inset-inline: 0;
	top: calc(var(--wp-admin--admin-bar--height, 0px) + var(--arnsmesu-announcement-room, 0px));
}

.arnsmesu-hf--transparent.arnsmesu-hf--sticky {
	position: fixed;
}

/*
 * Up to 600px the admin bar scrolls away with the page: a sticky header in the flow sticks at the
 * top of the window. A transparent one scrolls with the page and the admin bar until it sticks
 * (is-stuck, arnsmesu-hf.js, only once the bar has gone), then it is fixed at the top of the window.
 * A sticky ARN Announcement Bar stays fixed below the place of the admin bar, so with one the
 * header keeps the rules above and stays below the bar.
 */
@media (max-width: 600px) {
	html:not(.arnsmesu-announcement-room) .arnsmesu-hf--sticky:not(.arnsmesu-hf--transparent),
	html:not(.arnsmesu-announcement-room) .arnsmesu-hf--transparent.arnsmesu-hf--sticky.is-stuck {
		top: 0;
	}

	html:not(.arnsmesu-announcement-room) .admin-bar .arnsmesu-hf--transparent.arnsmesu-hf--sticky:not(.is-stuck) {
		position: absolute;
	}

	html:not(.arnsmesu-announcement-room):has(.arnsmesu-hf--sticky) {
		scroll-padding-block-start: var(--arnsmesu-hf-sticky-height, 0px);
	}
}

/* Logo, text ---------------------------------------------------------- */

.arnsmesu-hf-logo {
	display: inline-flex;
	align-items: center;
}

.arnsmesu-hf-logo__img {
	display: block;
	width: auto;
	max-width: none;
}

.arnsmesu-hf-logo__text {
	font-weight: 700;
	line-height: 1;
}

.arnsmesu-hf-text p,
.arnsmesu-hf-copyright {
	margin: 0;
}

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

.arnsmesu-hf-menu {
	position: relative;
}

.arnsmesu-hf-menu__list {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	margin: 0;
	padding: 0;
	list-style: none;
}

.arnsmesu-hf-menu__list li {
	position: relative;
	margin: 0;
}

.arnsmesu-hf-menu__list > li > a {
	display: inline-flex;
	align-items: center;
	padding-block: 8px;
}

.arnsmesu-hf-menu__list .menu-item-has-children > a::after {
	content: "";
	width: 6px;
	height: 6px;
	margin-inline-start: 7px;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	transform: translateY(-2px) rotate(45deg);
}

.arnsmesu-hf-menu__list .sub-menu {
	position: absolute;
	top: 100%;
	inset-inline-start: -16px;
	z-index: 10;
	min-width: 220px;
	margin: 0;
	padding: 8px 0;
	list-style: none;
	border-radius: 8px;
	background: #ffffff;
	box-shadow: 0 12px 32px rgba(15, 23, 42, .14);
	color: var(--vendix-color-text, #1f2937);
	text-transform: none;
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px);
	transition: opacity .18s ease, transform .18s ease, visibility .18s;
}

.arnsmesu-hf-menu__list .sub-menu .sub-menu {
	top: -8px;
	inset-inline-start: 100%;
}

/* A sub-menu that would reach past the window opens from the end edge of its item (arnsmesu-hf.js). */
.arnsmesu-hf-menu__list .sub-menu.arnsmesu-hf-sub--end {
	inset-inline-start: auto;
	inset-inline-end: -16px;
}

.arnsmesu-hf-menu__list .sub-menu .sub-menu.arnsmesu-hf-sub--end {
	inset-inline-end: 100%;
}

.arnsmesu-hf-menu__list .sub-menu a {
	display: block;
	padding: 8px 18px;
	font-size: .93em;
}

.arnsmesu-hf-menu__list li:hover > .sub-menu,
.arnsmesu-hf-menu__list li:focus-within > .sub-menu,
.arnsmesu-hf-menu__list li.is-open > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: none;
}

/* Escape closed it (arnsmesu-hf.js) while the focus stays on its link. */
.arnsmesu-hf-menu__list li.is-closed > .sub-menu {
	opacity: 0;
	visibility: hidden;
}

.arnsmesu-hf-menu__toggle,
.arnsmesu-hf-burger,
.arnsmesu-hf-iconbtn {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 6px;
	border: 0;
	background: transparent;
	color: inherit;
	font: inherit;
	cursor: pointer;
}

.arnsmesu-hf-menu__toggle {
	display: none;
}

.arnsmesu-hf-iconbtn.is-circle {
	width: 44px;
	height: 44px;
	justify-content: center;
	border-radius: 50%;
	background: rgba(127, 127, 127, .12);
}

.arnsmesu-hf-badge {
	position: absolute;
	top: -2px;
	inset-inline-end: -4px;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	border-radius: 9px;
	background: var(--vendix-color-primary, #e11d48);
	color: #ffffff;
	font-size: 11px;
	font-weight: 700;
	line-height: 18px;
	text-align: center;
}

.arnsmesu-hf-badge[hidden] {
	display: none;
}

/* Side panel and search layer ---------------------------------------- */

/*
 * arnsmesu-hf.js moves an open panel or search layer to the end of <body>.
 * Inside the header it would stay in the header's stacking context
 * (.arnsmesu-hf--header, z-index 50) and open under the admin bar and other fixed page
 * tools. Its font size and link rules therefore do not come from the header.
 */
.arnsmesu-hf-panel,
.arnsmesu-hf-searchlayer {
	position: fixed;
	inset: 0;
	z-index: 100000;
	background: rgba(15, 23, 42, .45);
	font-size: 15px;
	line-height: 1.4;
}

.arnsmesu-hf-panel[hidden],
.arnsmesu-hf-searchlayer[hidden] {
	display: none;
}

.arnsmesu-hf-panel__box {
	position: absolute;
	top: 0;
	bottom: 0;
	right: 0;
	width: min(360px, 88vw);
	overflow-y: auto;
	padding: 64px 24px 24px;
	background: #ffffff;
	color: var(--vendix-color-text, #1f2937);
	box-shadow: 0 0 40px rgba(15, 23, 42, .2);
}

/* The panel side is a screen side, so it stays the same on RTL sites. */
.arnsmesu-hf-panel.is-left .arnsmesu-hf-panel__box {
	right: auto;
	left: 0;
}

.arnsmesu-hf-panel__close {
	position: absolute;
	top: 14px;
	inset-inline-end: 14px;
	padding: 8px;
	border: 0;
	background: transparent;
	color: inherit;
	cursor: pointer;
}

.arnsmesu-hf-panel__list,
.arnsmesu-hf-panel__list .sub-menu {
	margin: 0;
	padding: 0;
	list-style: none;
}

.arnsmesu-hf-panel__list li {
	position: relative;
	border-bottom: 1px solid rgba(127, 127, 127, .18);
}

.arnsmesu-hf-panel__list a {
	display: block;
	padding-block: 12px;
	padding-inline: 0 40px;
	font-size: 16px;
}

.arnsmesu-hf-panel__list .sub-menu {
	display: none;
	padding-inline-start: 16px;
}

.arnsmesu-hf-panel__list li.is-open > .sub-menu {
	display: block;
}

.arnsmesu-hf-subtoggle {
	position: absolute;
	top: 6px;
	inset-inline-end: 0;
	width: 36px;
	height: 36px;
	border: 0;
	background: transparent;
	color: inherit;
	cursor: pointer;
}

.arnsmesu-hf-subtoggle .arnsmesu-hf-icon {
	margin: auto;
	transition: transform .2s ease;
}

li.is-open > .arnsmesu-hf-subtoggle .arnsmesu-hf-icon {
	transform: rotate(180deg);
}

/* The room for the close button is at the end of the line, where the button sits. */
.arnsmesu-hf-searchlayer__box {
	position: relative;
	max-width: 760px;
	margin: 12vh auto 0;
	padding-block: 28px;
	padding-inline: 28px 64px;
	border-radius: 12px;
	background: #ffffff;
	color: var(--vendix-color-text, #1f2937);
}

.arnsmesu-hf-searchlayer__box .arnsmesu-hf-search {
	width: 100%;
}

body.arnsmesu-hf-locked {
	overflow: hidden;
}

/* Search field -------------------------------------------------------- */

.arnsmesu-hf-search {
	display: flex;
	align-items: center;
	overflow: hidden;
	max-width: 100%;
	border: 1px solid var(--vendix-color-border, #d1d5db);
	border-radius: 6px;
	background: #ffffff;
}

.arnsmesu-hf-search input[type="search"] {
	flex: 1 1 auto;
	min-width: 0;
	padding: 10px 14px;
	border: 0;
	background: transparent;
	color: var(--vendix-color-text, #1f2937);
	font: inherit;
	outline: none;
}

.arnsmesu-hf-search button {
	display: inline-flex;
	padding: 8px 12px;
	border: 0;
	background: transparent;
	color: var(--vendix-color-text, #1f2937);
	cursor: pointer;
}

/* Button -------------------------------------------------------------- */

.arnsmesu-hf-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 10px 22px;
	border: 1.5px solid transparent;
	font-weight: 600;
	line-height: 1.2;
	white-space: nowrap;
	transition: filter .2s ease, opacity .2s ease;
}

.arnsmesu-hf a.arnsmesu-hf-btn:hover {
	color: inherit;
	filter: brightness(1.08);
}

.arnsmesu-hf-btn.is-link {
	padding-inline: 0;
	border: 0;
}

/* Contact, location, language, social -------------------------------- */

.arnsmesu-hf-contact {
	display: flex;
	align-items: center;
	gap: 12px;
}

.arnsmesu-hf-contact__icon.is-circle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border: 1.5px solid currentColor;
	border-radius: 50%;
}

.arnsmesu-hf-contact__text {
	display: flex;
	flex-direction: column;
}

.arnsmesu-hf-contact__title {
	font-weight: 600;
}

.arnsmesu-hf-contact__value {
	opacity: .85;
}

/* Phone numbers keep their left-to-right order on right-to-left pages. */
.arnsmesu-hf bdi[dir="ltr"] {
	direction: ltr;
	unicode-bidi: isolate;
}

.arnsmesu-hf-location {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
}

.arnsmesu-hf-location .arnsmesu-hf-icon {
	width: 16px;
	height: 16px;
}

.arnsmesu-hf-location .is-upper {
	text-transform: uppercase;
	letter-spacing: .02em;
}

.arnsmesu-hf-lang {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-size: 13px;
	font-weight: 600;
}

.arnsmesu-hf-lang.is-pill {
	gap: 0;
	overflow: hidden;
	border-radius: 6px;
	background: rgba(127, 127, 127, .25);
}

.arnsmesu-hf-lang.is-pill a {
	padding: 3px 10px;
}

/*
 * "Labels" other than codes (VDX-D-03): a flag, the native name and the code that takes the
 * name's place on phones (Devices below). Right-to-left pages reverse the order of the
 * languages and of the flag and the name by themselves; a flag is never mirrored.
 */
.arnsmesu-hf-lang__item {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	white-space: nowrap;
}

.arnsmesu-hf-lang__flag {
	flex: none;
	width: 18px;
	height: 12px;
	border-radius: 1px;
	box-shadow: 0 0 0 1px rgba(0, 0, 0, .15);
	object-fit: cover;
}

.arnsmesu-hf-lang__code {
	display: none;
}

.arnsmesu-hf-social {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 14px;
}

.arnsmesu-hf-social a {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.arnsmesu-hf-social.is-circle a {
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: rgba(127, 127, 127, .16);
}

.arnsmesu-hf-social.is-pill a {
	padding: 8px 16px;
	border: 1px solid rgba(127, 127, 127, .3);
	border-radius: 999px;
}

/* Link list ----------------------------------------------------------- */

.arnsmesu-hf-links__title {
	margin: 0 0 14px;
	font-weight: 600;
}

.arnsmesu-hf-links__list {
	display: flex;
	flex-direction: column;
	margin: 0;
	padding: 0;
	list-style: none;
}

.arnsmesu-hf-links.is-inline .arnsmesu-hf-links__list {
	flex-direction: row;
	flex-wrap: wrap;
}

.arnsmesu-hf-links__list a {
	opacity: .85;
}

.arnsmesu-hf-links__list a:hover {
	opacity: 1;
}

.arnsmesu-hf-image {
	display: block;
	max-width: 100%;
	height: auto;
}

.arnsmesu-hf-divider,
.arnsmesu-hf-spacer {
	display: block;
	flex: none;
}

/* Builder preview note (only inside the builder's preview frame) ------- */

.arnsmesu-hf-preview-note {
	position: fixed;
	inset-inline: 16px;
	bottom: 16px;
	z-index: 100001;
	padding: 14px 18px;
	border-radius: 10px;
	background: #1d2327;
	color: #ffffff;
	font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	box-shadow: 0 8px 30px rgba(0, 0, 0, .25);
}

/* Admin bar ----------------------------------------------------------- */

/*
 * The menu of the "Utilities" item (ARNSMESU_HF_Front::admin_bar()) opens from the end edge of
 * the item, as WordPress opens the menus at the end of the bar: the item comes after WordPress'
 * own items, so its menu stays in the window also where the bar is full (Vendix 118-PHP74-03).
 * Up to 782px WordPress shows only its own items.
 */
#wpadminbar #wp-admin-bar-arnsmesu-hf > .ab-sub-wrapper {
	inset-inline-end: 0;
}

/* Devices ------------------------------------------------------------- */

@media (min-width: 1025px) {
	.arnsmesu-hf .arnsmesu-hf-hide-desktop {
		display: none;
	}
}

@media (min-width: 768px) and (max-width: 1024px) {
	.arnsmesu-hf .arnsmesu-hf-hide-tablet {
		display: none;
	}
}

@media (max-width: 767px) {
	.arnsmesu-hf .arnsmesu-hf-hide-mobile {
		display: none;
	}

	.arnsmesu-hf--footer .arnsmesu-hf__inner {
		flex-direction: column;
		align-items: stretch;
	}

	/* The language switch keeps one line: its names give way to the codes, flags stay. */
	.arnsmesu-hf-lang__name {
		display: none;
	}

	.arnsmesu-hf-lang__code {
		display: inline;
	}
}

@media (prefers-reduced-motion: reduce) {
	.arnsmesu-hf--sticky,
	.arnsmesu-hf--sticky .arnsmesu-hf__inner,
	.arnsmesu-hf-menu__list .sub-menu {
		transition: none;
	}
}
