.xtool-fsm__trigger {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	padding: 0;
	border: none;
	background: none;
	cursor: pointer;
}

.xtool-fsm__burger {
	position: relative;
	display: block;
	width: 100%;
	height: 100%;
}

.xtool-fsm__burger .line {
	position: absolute;
	left: 0;
	right: 0;
	height: 2px;
	background-color: #1a1814;
	border-radius: 2px;
	transition: transform 0.3s ease, opacity 0.3s ease, top 0.3s ease;
}

.xtool-fsm__burger .line._1 {
	top: 35%;
}

.xtool-fsm__burger .line._2 {
	top: 65%;
}

.xtool-fsm__trigger[aria-expanded="true"] .line._1 {
	top: 50%;
	transform: translateY(-50%) rotate(45deg);
}

.xtool-fsm__trigger[aria-expanded="true"] .line._2 {
	top: 50%;
	transform: translateY(-50%) rotate(-45deg);
}

.xtool-fsm {
	display: none;
}

.xtool-fsm.is-open {
	display: block;
}

.xtool-fsm__blur {
	position: fixed;
	inset: 0;
	z-index: 99998;
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
	opacity: 0;
	transition: opacity 0.4s ease;
	/* Clickable on purpose (no pointer-events:none) — this is what "click
	   outside the panel to close" (Close On Overlay Click) actually
	   clicks. The panel itself sits above this in z-index and always
	   handles its own clicks first, so this is never reachable through
	   the panel — only through the visible backdrop area around it
	   (mainly relevant for the Box panel style, which doesn't cover the
	   full screen). Harmless while .xtool-fsm is display:none (closed). */
}

.xtool-fsm.is-visible .xtool-fsm__blur {
	opacity: 1;
}

.xtool-fsm__panel {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	flex-direction: column;
	justify-content: center;
	background-color: #fff;
	padding: 60px 8vw;
	overflow-y: auto;
	opacity: 0;
	transform: scale(0.98);
	transition: opacity 0.4s ease, transform 0.4s ease;
}

.xtool-fsm.is-visible .xtool-fsm__panel {
	opacity: 1;
	transform: scale(1);
}

/* Box style — a smaller panel anchored to one screen corner instead of a
   fullscreen overlay, growing in from that corner (transform-origin
   matches the anchor so the scale animation visually reads as "coming
   from the icon"). Position/size/offsets all come from Style-tab controls
   (see class-fullscreen-menu.php) via the CSS below — this stylesheet
   only sets the STRUCTURE (position:fixed + inset:auto so top/right/
   bottom/left can be set independently, flex-start instead of centered
   content, scrollable if content is taller than max-height). */
.xtool-fsm--box .xtool-fsm__panel {
	inset: auto;
	justify-content: flex-start;
	padding: 32px;
	transform: scale(0.85);
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.xtool-fsm--box.is-visible .xtool-fsm__panel {
	transform: scale(1);
}

.xtool-fsm--box .xtool-fsm__link {
	font-size: 22px;
}

.xtool-fsm--box .xtool-fsm__links {
	margin: 0;
}

.xtool-fsm--box .xtool-fsm__close {
	top: 16px;
	right: 16px;
}

.xtool-fsm--anchor-top-right .xtool-fsm__panel {
	transform-origin: top right;
}

.xtool-fsm--anchor-top-left .xtool-fsm__panel {
	transform-origin: top left;
}

.xtool-fsm--anchor-bottom-right .xtool-fsm__panel {
	transform-origin: bottom right;
}

.xtool-fsm--anchor-bottom-left .xtool-fsm__panel {
	transform-origin: bottom left;
}

.xtool-fsm__close {
	position: absolute;
	top: 32px;
	right: 8vw;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.2em;
	height: 2.2em;
	font-size: 22px;
	color: #1a1814;
	background: none;
	border: none;
	cursor: pointer;
}

.xtool-fsm__links {
	margin: auto 0;
}

.xtool-fsm__menu {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.xtool-fsm__link {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 14px;
	text-decoration: none;
	color: #1a1814;
	font-size: clamp(32px, 6vw, 64px);
	font-weight: 600;
	line-height: 1.1;
}

.xtool-fsm__link-texts {
	position: relative;
	display: block;
	overflow: hidden;
	height: 1.1em;
}

.xtool-fsm__link-text {
	display: block;
	transition: transform 0.4s cubic-bezier(0.65, 0, 0.35, 1);
}

.xtool-fsm__link-text:last-child {
	position: absolute;
	top: 0;
	left: 0;
	transform: translateY(100%);
}

.xtool-fsm__link:hover .xtool-fsm__link-text:first-child {
	transform: translateY(-100%);
}

.xtool-fsm__link:hover .xtool-fsm__link-text:last-child {
	transform: translateY(0);
}

/* Enable Text Swap on Hover, off — label just stays put; only Hover
   Color (see class-fullscreen-menu.php) does anything on hover. Each
   override restores that element's own RESTING transform value (not
   "none" for both) — the duplicate copy's resting state is already
   translateY(100%) (hidden below), and using "none" there instead would
   have snapped it back into normal position, overlapping the visible
   copy, on every hover. */
.xtool-fsm--no-hover-swap .xtool-fsm__link:hover .xtool-fsm__link-text:first-child {
	transform: none;
}

.xtool-fsm--no-hover-swap .xtool-fsm__link:hover .xtool-fsm__link-text:last-child {
	transform: translateY(100%);
}

.xtool-fsm__dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background-color: #1a1814;
	flex-shrink: 0;
	transform: scale(0);
	opacity: 0;
	transition: transform 0.3s ease, opacity 0.3s ease;
}

.xtool-fsm__menu .current-menu-item .xtool-fsm__dot {
	transform: scale(1);
	opacity: 1;
}

.xtool-fsm__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	margin-top: 40px;
}

.xtool-fsm__social {
	display: flex;
	align-items: center;
	gap: 14px;
}

.xtool-fsm__social-link {
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 18px;
	color: #1a1814;
	text-decoration: none;
	transition: color 0.2s ease;
}

.xtool-fsm__social-link svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

.xtool-fsm__contact {
	position: relative;
	display: inline-flex;
	align-items: flex-end;
	overflow: hidden;
	min-width: 160px;
	min-height: 64px;
	padding: 14px 18px;
	border-radius: 12px;
	background-color: #f2ede7;
	text-decoration: none;
}

.xtool-fsm__contact-img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	z-index: 0;
}

.xtool-fsm__contact-inner {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: center;
	gap: 8px;
}

.xtool-fsm__contact-text {
	font-size: 14px;
	font-weight: 600;
	color: #1a1814;
}

.xtool-fsm__contact-arrow {
	font-size: 12px;
	color: inherit;
}

.xtool-fsm__legal {
	display: flex;
	gap: 20px;
}

.xtool-fsm__legal-link {
	position: relative;
	display: inline-flex;
	flex-direction: column;
	font-size: 12px;
	color: #8a8680;
	text-decoration: none;
}

.xtool-fsm__legal-line {
	display: block;
	height: 1px;
	margin-top: 4px;
	background-color: #1a1814;
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.3s ease;
}

.xtool-fsm__legal-link:hover .xtool-fsm__legal-line {
	transform: scaleX(1);
}

@media (max-width: 767px) {
	.xtool-fsm__panel {
		padding: 50px 6vw;
	}
	.xtool-fsm__link {
		font-size: clamp(28px, 9vw, 44px);
	}
	.xtool-fsm__actions {
		flex-direction: column;
		align-items: flex-start;
	}
}

@media (prefers-reduced-motion: reduce) {
	.xtool-fsm__blur,
	.xtool-fsm__panel,
	.xtool-fsm__link-text,
	.xtool-fsm__dot,
	.xtool-fsm__burger .line,
	.xtool-fsm__legal-line {
		transition: none;
	}
}
