/**
 * Liquid Metal Button — frontend styles
 *
 * Architecture:
 *  • .mfx-host is the visible button surface (background + border-radius)
 *  • .mfx-canvas (z=0) renders the plasma; a rounded-rect hole is punched
 *    in the centre so only the perimeter ring is visible
 *  • ::before (z=2) provides a subtle inner highlight
 *  • .mfx-glow-svg (z=3) carries the outer halo
 *  • ::after (z=4) provides a 1px inset border
 *  • .mfx-content (z=5) holds the inner content (text/icon), always on top
 *
 * These shared layering rules apply to both MetalFX Button and MetalFX Icon
 * widgets — they target `.mfx-host` directly, not the widget wrapper class.
 */

/* ============================================================
 * Shared host + layering — applies to all MetalFX widgets
 * ============================================================ */

.mfx-host {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	position: relative;
	isolation: isolate;
	overflow: visible;
	background: #272727;
	color: #f8f8f8;
	border-radius: 22px;
}

.mfx-host .mfx-canvas {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	display: block;
	z-index: 0;
	pointer-events: none;
	border-radius: inherit;
}

.mfx-host::before {
	content: '';
	position: absolute;
	inset: 0;
	border-radius: inherit;
	pointer-events: none;
	z-index: 2;
	box-shadow: inset 0 0 50px 0 rgba(255, 255, 255, 0.02);
}

.mfx-host::after {
	content: '';
	position: absolute;
	inset: 0;
	border-radius: inherit;
	pointer-events: none;
	z-index: 4;
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.mfx-host[data-kind='circle']::after {
	box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.1);
}

.mfx-host .mfx-glow-svg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	overflow: visible;
	z-index: 3;
	pointer-events: none;
	opacity: 0.7;
}

.mfx-host .mfx-content {
	position: relative;
	z-index: 5;
}

/* ============================================================
 * MetalFX Button — text button styling
 * ============================================================ */

.elementor-widget-lmb-metal-button .mfx-content {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 44px;
	padding: 0 26px;
	color: inherit;
	text-decoration: none;
	white-space: nowrap;
	font-size: 14px;
	font-weight: 500;
	letter-spacing: 0.01em;
	font-family: inherit;
}

.elementor-widget-lmb-metal-button .mfx-content:hover,
.elementor-widget-lmb-metal-button .mfx-content:focus,
.elementor-widget-lmb-metal-button .mfx-content:visited {
	color: inherit;
	text-decoration: none;
}

.elementor-widget-lmb-metal-button .lmb-icon {
	display: inline-flex;
	align-items: center;
}

.elementor-widget-lmb-metal-button .lmb-icon svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

/* Circle variant: square aspect, no padding */
.elementor-widget-lmb-metal-button .mfx-host[data-kind='circle'] .mfx-content {
	padding: 0;
	width: 44px;
}

/* ============================================================
 * MetalFX Icon — single icon inside a metal chip
 * ============================================================ */

.elementor-widget-lmb-metal-icon .mfx-host {
	width: 44px;
	height: 44px;
	color: #e8e8ee;
	--lmb-chip-size: 44px;
	--lmb-icon-percent: 50;
}

.elementor-widget-lmb-metal-icon .lmb-icon-link {
	/* Absolute fill so the canvas/SVG layers don't push it out of the chip.
	   Z-index 5 keeps it above the canvas (0), ::before (2), glow (3), ::after (4). */
	position: absolute;
	inset: 0;
	z-index: 5;
	display: flex;
	align-items: center;
	justify-content: center;
	color: inherit;
	text-decoration: none;
	font-family: inherit;
}

.elementor-widget-lmb-metal-icon .lmb-icon-link:hover,
.elementor-widget-lmb-metal-icon .lmb-icon-link:focus,
.elementor-widget-lmb-metal-icon .lmb-icon-link:visited {
	color: inherit;
	text-decoration: none;
}

.elementor-widget-lmb-metal-icon .lmb-icon-glyph {
	/* Icon size = chip size × icon percent ÷ 100.
	   Multiplying length by a unitless number is valid CSS calc(). */
	--icon-size: calc(var(--lmb-chip-size, 44px) * var(--lmb-icon-percent, 50) / 100);
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
	font-size: var(--icon-size);
	width: var(--icon-size);
	height: var(--icon-size);
	color: inherit;
}

.elementor-widget-lmb-metal-icon .lmb-icon-glyph i,
.elementor-widget-lmb-metal-icon .lmb-icon-glyph svg {
	display: block;
	width: 1em;
	height: 1em;
	font-size: inherit;
	color: inherit;
	fill: currentColor;
}
