/* Empire Luxe — tools. Loaded only on pages that contain a tool shortcode. */

.ehlx-tool,
.ehlx-hub {
	--t-wine: #742D3E;
	--t-plum: #7B3E57;
	--t-rose: #D7A8AA;
	--t-blush: #F8CFD0;
	--t-ink: #292126;
	--t-muted: #7E6A72;
	--t-ease: cubic-bezier(.2, .75, .2, 1);
	--t-spring: cubic-bezier(.34, 1.4, .64, 1);
	font-family: "DM Sans", system-ui, sans-serif;
	color: var(--t-ink);
}

/* ---------- Tool shell ---------- */
.ehlx-tool {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	margin: 28px 0 36px;
	padding: clamp(22px, 4vw, 44px);
	border-radius: 30px;
	background:
		radial-gradient(90% 70% at 0% 0%, rgba(248,207,208,.65), transparent 60%),
		radial-gradient(80% 70% at 100% 100%, rgba(123,62,87,.16), transparent 60%),
		rgba(255,253,251,.72);
	-webkit-backdrop-filter: saturate(170%) blur(18px);
	backdrop-filter: saturate(170%) blur(18px);
	border: 1px solid rgba(255,255,255,.85);
	box-shadow: 0 1px 0 rgba(255,255,255,.9) inset, 0 40px 80px -40px rgba(116,45,62,.5);
}
.ehlx-tool-orb {
	position: absolute;
	z-index: -1;
	width: 340px; height: 340px;
	right: -120px; top: -140px;
	border-radius: 50%;
	background: radial-gradient(circle at 35% 35%, rgba(255,255,255,.9), rgba(215,168,170,.55) 40%, rgba(116,45,62,.25) 75%, transparent 76%);
	filter: blur(2px);
	animation: t-float 12s ease-in-out infinite alternate;
	pointer-events: none;
}
@keyframes t-float { to { transform: translate(-40px, 40px) scale(1.08); } }

.ehlx-tool-head { max-width: 620px; margin-bottom: 26px; }
.ehlx-tool .ehlx-eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 10.5px; font-weight: 700; letter-spacing: .26em; text-transform: uppercase; color: var(--t-wine); }
.ehlx-tool-title {
	margin: 12px 0 10px !important;
	font: 600 clamp(28px, 4.2vw, 42px)/1.08 "Playfair Display", Georgia, serif !important;
	letter-spacing: -.02em;
	color: var(--t-ink);
}
.ehlx-tool-title::after { display: none !important; }
.ehlx-tool-title em, .ehlx-res-title em { color: var(--t-wine); font-style: italic; }
.ehlx-tool-intro { margin: 0 !important; color: var(--t-muted); font-size: 16px; line-height: 1.6; }

/* ---------- Questions ---------- */
.ehlx-q { margin: 0 0 22px; padding: 0; border: 0; min-width: 0; }
.ehlx-q-label { display: flex; align-items: baseline; gap: 12px; margin-bottom: 12px; padding: 0; font: 600 19px/1.3 "Playfair Display", Georgia, serif; color: var(--t-ink); }
.ehlx-q-num { font: 700 11px/1 "DM Sans", sans-serif; letter-spacing: .14em; color: var(--t-rose); }
.ehlx-chips, .ehlx-unit { display: flex; flex-wrap: wrap; gap: 10px; }
.ehlx-unit { margin-bottom: 16px; }
.ehlx-chip { position: relative; cursor: pointer; }
.ehlx-chip input { position: absolute; opacity: 0; pointer-events: none; }
.ehlx-chip span {
	display: inline-flex;
	align-items: center;
	min-height: 46px;
	padding: 11px 18px;
	border-radius: 999px;
	background: rgba(255,255,255,.72);
	border: 1px solid rgba(116,45,62,.14);
	box-shadow: 0 1px 0 rgba(255,255,255,.9) inset, 0 6px 16px -12px rgba(116,45,62,.4);
	font-size: 14.5px;
	font-weight: 500;
	line-height: 1.25;
	transition: transform .35s var(--t-spring), background .3s var(--t-ease), color .3s var(--t-ease), border-color .3s, box-shadow .3s;
}
.ehlx-chip:hover span { transform: translateY(-2px); border-color: rgba(116,45,62,.35); }
.ehlx-chip input:focus-visible + span { outline: 2px solid var(--t-wine); outline-offset: 3px; }
.ehlx-chip input:checked + span {
	background: linear-gradient(135deg, var(--t-plum), var(--t-wine));
	border-color: transparent;
	color: #fff;
	box-shadow: 0 14px 26px -14px rgba(116,45,62,.85);
	transform: translateY(-1px) scale(1.02);
}
.ehlx-q.is-missing .ehlx-chips { animation: t-shake .5s var(--t-ease); }
.ehlx-q.is-missing .ehlx-q-label { color: var(--t-wine); }
@keyframes t-shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* ---------- Numeric fields ---------- */
.ehlx-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.ehlx-field { position: relative; display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--t-muted); }
.ehlx-field input {
	width: 100%;
	height: 58px;
	padding: 0 52px 0 20px !important;
	border-radius: 18px !important;
	border: 1px solid rgba(116,45,62,.16) !important;
	background: rgba(255,255,255,.85) !important;
	font: 600 22px/1 "Playfair Display", Georgia, serif !important;
	color: var(--t-ink) !important;
	letter-spacing: 0;
	text-transform: none;
}
.ehlx-field input:focus { outline: none; border-color: var(--t-wine) !important; box-shadow: 0 0 0 4px rgba(215,168,170,.35); }
.ehlx-unit-label { position: absolute; right: 18px; bottom: 19px; font-style: normal; font-size: 13px; color: var(--t-muted); text-transform: none; letter-spacing: 0; }
.ehlx-milestones { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.ehlx-milestones button {
	padding: 8px 14px;
	border-radius: 999px;
	border: 1px dashed rgba(116,45,62,.3);
	background: transparent;
	color: var(--t-wine);
	font: 600 12.5px/1 "DM Sans", sans-serif;
	cursor: pointer;
	transition: background .25s, color .25s, border-color .25s;
}
.ehlx-milestones button:hover, .ehlx-milestones button.is-on { background: var(--t-wine); border-color: var(--t-wine); color: #fff; }

/* ---------- Actions ---------- */
.ehlx-tool-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; margin-top: 8px; }
.ehlx-tool .ehlx-btn {
	position: relative;
	overflow: hidden;
	min-height: 54px;
	padding: 0 30px;
	border: 0;
	border-radius: 999px;
	background: linear-gradient(135deg, var(--t-plum), var(--t-wine));
	color: #fff;
	font: 700 12.5px/1 "DM Sans", sans-serif;
	letter-spacing: .16em;
	text-transform: uppercase;
	cursor: pointer;
	box-shadow: 0 18px 34px -16px rgba(116,45,62,.85);
	transition: transform .45s var(--t-spring), box-shadow .35s var(--t-ease);
}
.ehlx-tool .ehlx-btn::after {
	content: "";
	position: absolute; inset: 0;
	background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%);
	transform: translateX(-120%);
	transition: transform .9s var(--t-ease);
}
.ehlx-tool .ehlx-btn:hover { transform: translateY(-2px); box-shadow: 0 24px 40px -16px rgba(116,45,62,.9); }
.ehlx-tool .ehlx-btn:hover::after { transform: translateX(120%); }
.ehlx-link-btn { border: 0; background: none; padding: 6px 2px; color: var(--t-muted); font: 600 13px/1 "DM Sans", sans-serif; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }
.ehlx-link-btn:hover { color: var(--t-wine); }

/* ---------- Result ---------- */
.ehlx-result { margin-top: 30px; }
.ehlx-result.is-in { animation: t-rise .8s var(--t-ease) both; }
@keyframes t-rise { from { opacity: 0; transform: translateY(18px) scale(.98); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }

.ehlx-res-card {
	display: grid;
	grid-template-columns: 150px minmax(0, 1fr);
	gap: 28px;
	align-items: start;
	padding: clamp(20px, 3.5vw, 34px);
	border-radius: 26px;
	background: rgba(255,255,255,.86);
	border: 1px solid rgba(255,255,255,.95);
	box-shadow: 0 1px 0 #fff inset, 0 30px 60px -34px rgba(116,45,62,.55);
}
.ehlx-res-card--col { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 640px) { .ehlx-res-card { grid-template-columns: minmax(0, 1fr); } }
.ehlx-res-title { margin: 10px 0 10px !important; font: 600 clamp(26px, 3.6vw, 36px)/1.1 "Playfair Display", Georgia, serif !important; }
.ehlx-res-title::after { display: none !important; }
.ehlx-res-main .ehlx-p { margin: 0 0 14px; line-height: 1.65; }
.ehlx-res-sub { margin: 18px 0 10px !important; font: 700 11px/1 "DM Sans", sans-serif !important; letter-spacing: .2em; text-transform: uppercase; color: var(--t-plum); }
.ehlx-res-sub::after { display: none !important; }
.ehlx-res-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 18px; margin: 0 0 14px !important; padding: 0 !important; list-style: none !important; }
@media (max-width: 520px) { .ehlx-res-list { grid-template-columns: minmax(0, 1fr); } }
.ehlx-res-list li { position: relative; margin: 0 !important; padding-left: 22px; line-height: 1.45; }
.ehlx-res-list li::before { content: "✦"; position: absolute; left: 0; top: 0; color: var(--t-rose); font-size: 12px; }
.ehlx-res-note { font-size: 14.5px; color: var(--t-muted); }
.ehlx-res-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.ehlx-tool .ehlx-res-link {
	display: inline-flex; align-items: center; gap: 8px;
	padding: 11px 18px;
	border-radius: 999px;
	background: rgba(215,168,170,.24) !important;
	background-image: none !important;
	color: var(--t-wine) !important;
	text-decoration: none !important;
	font-size: 13.5px;
	font-weight: 700;
	transition: background .3s, color .3s, transform .4s var(--t-spring);
}
.ehlx-tool .ehlx-res-link:hover { background: var(--t-wine) !important; color: #fff !important; transform: translateY(-2px); }
.ehlx-res-link span { transition: transform .35s var(--t-ease); }
.ehlx-res-link:hover span { transform: translateX(4px); }

/* Face-shape silhouettes (pure CSS) */
.ehlx-res-badge {
	width: 150px; height: 190px;
	margin: 0 auto;
	background: linear-gradient(160deg, var(--t-blush), var(--t-rose) 55%, var(--t-plum));
	box-shadow: 0 1px 0 rgba(255,255,255,.7) inset, 0 26px 40px -22px rgba(116,45,62,.7);
	animation: t-breathe 4s ease-in-out infinite;
}
@keyframes t-breathe { 50% { transform: scale(1.03); } }
.ehlx-shape--oval    { border-radius: 50% / 46% 46% 54% 54%; }
.ehlx-shape--round   { height: 160px; width: 150px; border-radius: 50%; }
.ehlx-shape--square  { height: 165px; border-radius: 28px 28px 36px 36px; }
.ehlx-shape--heart   { border-radius: 70px 70px 0 0; clip-path: polygon(0 0, 100% 0, 100% 48%, 50% 100%, 0 48%); }
.ehlx-shape--oblong  { width: 125px; height: 200px; border-radius: 60px; }
.ehlx-shape--diamond { clip-path: polygon(50% 0, 100% 45%, 50% 100%, 0 45%); border-radius: 0; }

/* Swatches */
.ehlx-swatches { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin: 4px 0 18px; }
@media (max-width: 640px) { .ehlx-swatches { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.ehlx-swatch { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; animation: t-rise .7s var(--t-ease) both; animation-delay: calc(var(--i) * 80ms + .15s); }
.ehlx-swatch-chip {
	width: 100%;
	aspect-ratio: 3 / 4;
	border-radius: 999px 999px 18px 18px;
	background:
		linear-gradient(115deg, rgba(255,255,255,.45) 0%, transparent 32%, transparent 62%, rgba(255,255,255,.18) 75%, transparent 85%),
		repeating-linear-gradient(100deg, rgba(0,0,0,.06) 0 2px, transparent 2px 7px),
		var(--sw);
	box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 18px 28px -18px rgba(41,33,38,.7);
	transition: transform .5s var(--t-spring);
}
.ehlx-swatch:hover .ehlx-swatch-chip { transform: translateY(-4px) rotate(-2deg); }
.ehlx-swatch-name { font-size: 12.5px; font-weight: 600; line-height: 1.25; }

/* Growth track */
.ehlx-track { position: relative; height: 12px; margin: 26px 4px 76px; border-radius: 99px; background: rgba(116,45,62,.08); box-shadow: inset 0 1px 3px rgba(116,45,62,.12); }
.ehlx-track-fill {
	position: absolute; top: 0; bottom: 0;
	left: var(--cur); width: calc(var(--goal) - var(--cur));
	border-radius: 99px;
	background: linear-gradient(90deg, var(--t-rose), var(--t-plum), var(--t-wine));
	transform-origin: 0 50%;
	animation: t-grow 1.4s var(--t-ease) .2s both;
}
.ehlx-track-fill::before { content: ""; position: absolute; left: -6px; top: 50%; width: 12px; height: 12px; margin-top: -6px; border-radius: 50%; background: #fff; border: 2px solid var(--t-rose); }
@keyframes t-grow { from { transform: scaleX(0); } }
.ehlx-track ol { margin: 0 !important; padding: 0 !important; list-style: none !important; }
.ehlx-track li { position: absolute; top: 22px; left: var(--p); transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 2px; margin: 0 !important; font-size: 11.5px; white-space: nowrap; }
.ehlx-track li::before { content: ""; position: absolute; top: -17px; width: 2px; height: 12px; border-radius: 2px; background: var(--t-wine); }
.ehlx-track li:nth-child(even) { top: 46px; }
.ehlx-track li strong { color: var(--t-wine); font-size: 11.5px; }
.ehlx-track li span { color: var(--t-muted); }
.ehlx-res-list--tips { margin-top: 4px !important; }

/* ---------- Hub ---------- */
.ehlx-hub { margin: 28px 0 36px; }
.ehlx-hub-head { margin-bottom: 18px; }
.ehlx-hub .ehlx-eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 10.5px; font-weight: 700; letter-spacing: .26em; text-transform: uppercase; color: var(--t-wine); }
.ehlx-hub-title { margin: 10px 0 0 !important; font: 600 clamp(26px, 3.4vw, 36px)/1.1 "Playfair Display", Georgia, serif !important; }
.ehlx-hub-title::after { display: none !important; }
.ehlx-hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.ehlx-hub-card {
	position: relative;
	display: flex; flex-direction: column; gap: 8px;
	min-height: 210px;
	padding: 24px 22px 20px;
	border-radius: 24px;
	background: linear-gradient(160deg, rgba(255,255,255,.85), rgba(248,207,208,.28));
	-webkit-backdrop-filter: saturate(170%) blur(16px);
	backdrop-filter: saturate(170%) blur(16px);
	border: 1px solid rgba(255,255,255,.9);
	box-shadow: 0 1px 0 #fff inset, 0 22px 44px -28px rgba(116,45,62,.55);
	color: var(--t-ink) !important;
	text-decoration: none !important;
	background-image: linear-gradient(160deg, rgba(255,255,255,.85), rgba(248,207,208,.28)) !important;
	transition: transform .55s var(--t-ease), box-shadow .55s var(--t-ease);
}
.ehlx-hub-card:hover { transform: translateY(-6px); box-shadow: 0 1px 0 #fff inset, 0 34px 60px -30px rgba(116,45,62,.7); }
.ehlx-hub-icon {
	display: grid; place-items: center;
	width: 48px; height: 48px;
	margin-bottom: 8px;
	border-radius: 16px;
	background: linear-gradient(135deg, var(--t-plum), var(--t-wine));
	color: #fff;
	font-size: 22px;
	box-shadow: 0 12px 22px -12px rgba(116,45,62,.9);
	transition: transform .6s var(--t-spring);
}
.ehlx-hub-card:hover .ehlx-hub-icon { transform: rotate(-8deg) scale(1.08); }
.ehlx-hub-name { font: 600 19px/1.2 "Playfair Display", Georgia, serif; }
.ehlx-hub-desc { color: var(--t-muted); font-size: 14px; line-height: 1.5; }
.ehlx-hub-go { margin-top: auto; padding-top: 8px; color: var(--t-wine); font-size: 11.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }

@media (prefers-reduced-motion: reduce) {
	.ehlx-tool *, .ehlx-hub * { animation: none !important; transition: none !important; }
}

/* Neutralise GeneratePress's global button hover grey */
body .ehlx-tool .ehlx-btn:is(:hover, :focus, :active) { background: linear-gradient(135deg, var(--t-plum), var(--t-wine)) !important; color: #fff !important; }
body .ehlx-link-btn:is(:hover, :focus, :active) { background: none !important; color: var(--t-wine) !important; }
body .ehlx-milestones button:is(:focus, :active) { background: transparent !important; color: var(--t-wine) !important; }
body .ehlx-milestones button:hover,
body .ehlx-milestones button.is-on { background: var(--t-wine) !important; border-color: var(--t-wine) !important; color: #fff !important; }
