/**
 * Front-end styles for the Elementor tool page layout.
 */

.omniemu-tool-elementor {
	--omniemu-tool-line: var(--line, #e2e8f0);
}

.omniemu-tool-elementor .omniemu-tool-hero h1 {
	margin: 0 0 14px;
	font-size: clamp(2.05rem, 4.6vw, 3.3rem);
	line-height: 1.08;
	letter-spacing: -0.02em;
}

.omniemu-tool-elementor .omniemu-tool-hero .eyebrow {
	margin: 0 0 8px;
}

.omniemu-tool-elementor .omniemu-tool-hero .tool-lede,
.omniemu-tool-elementor .omniemu-tool-hero .tool-lede p {
	max-width: 68ch;
	margin: 0 0 18px;
	color: var(--muted, #475569);
	font-size: clamp(0.98rem, 1.5vw, 1.07rem);
	line-height: 1.65;
}

.omniemu-tool-elementor .omniemu-tool-hero .tool-badges {
	margin-top: 0;
}

.omniemu-tool-elementor .tool-stage {
	margin: 0 0 28px;
}

.omniemu-tool-elementor .tool-content {
	max-width: none;
	margin-top: 30px;
	padding-top: 24px;
	border-top: 1px solid var(--omniemu-tool-line);
}

/*
 * The generated hero and related sections use a light tint in Elementor.
 * In dark mode that tint fights the theme's light text, so use the theme
 * background and ink instead. Light mode keeps the Elementor colors.
 */

@media (prefers-color-scheme: dark) {
	.omniemu-tool-elementor .omniemu-tool-hero,
	.omniemu-tool-elementor .omniemu-tool-related-section {
		background-color: var(--paper, #101614) !important;
	}

	.omniemu-tool-elementor .omniemu-tool-hero h1,
	.omniemu-tool-elementor .omniemu-tool-related-section h2 {
		color: var(--ink, #e6efec) !important;
	}
}

.omniemu-tool-elementor .tool-aside {
	position: sticky;
	top: 96px;
	display: grid;
	gap: 14px;
}

.omniemu-tool-elementor .omniemu-tool-related-section h2 {
	margin-top: 0;
}

.omniemu-tool-elementor .omniemu-tool-related-section .tool-grid {
	margin-top: 20px;
}

.omniemu-tool-elementor .omniemu-tool-app-placeholder {
	display: grid;
	place-items: center;
	min-height: 220px;
	padding: 24px;
	border: 2px dashed #94a3b8;
	border-radius: 16px;
	background: #f8fafc;
	text-align: center;
}

.omniemu-tool-elementor .omniemu-tool-app-placeholder strong {
	display: block;
	margin-bottom: 6px;
	color: #0f172a;
	font-size: 1rem;
}

.omniemu-tool-elementor .omniemu-tool-app-placeholder p {
	margin: 0;
	color: #475569;
	font-size: 0.9rem;
}

/*
 * Guide sections. The long-form theory is collapsed by default so the tool
 * and the related tools stay close together, while every section heading and
 * every question stays visible.
 */

.omniemu-tool-elementor .tool-guide {
	display: grid;
	gap: 10px;
}

.omniemu-tool-elementor .tool-guide__hint {
	margin: 0 0 2px;
	color: var(--muted, #475569);
	font-size: 0.92rem;
	line-height: 1.55;
}

.omniemu-tool-elementor .tool-guide__item {
	padding: 0;
	border: 1px solid var(--line, #e2e8f0);
	border-radius: var(--radius, 14px);
	background: var(--surface, #ffffff);
	box-shadow: var(--shadow-soft, 0 1px 2px rgba(15, 23, 42, 0.04));
	overflow: hidden;
}

.omniemu-tool-elementor .tool-guide__item > summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 14px 18px;
	background: var(--surface, #ffffff);
	cursor: pointer;
	list-style: none;
	transition: background-color 120ms ease;
}

.omniemu-tool-elementor .tool-guide__item > summary::-webkit-details-marker {
	display: none;
}

.omniemu-tool-elementor .tool-guide__item > summary::marker {
	content: "";
}

.omniemu-tool-elementor .tool-guide__item > summary:hover {
	background: var(--accent-soft, #f0fdfa);
}

.omniemu-tool-elementor .tool-guide__item > summary:focus-visible {
	outline: 3px solid var(--accent, #0f766e);
	outline-offset: -3px;
}

.omniemu-tool-elementor .tool-guide__item > summary h2,
.omniemu-tool-elementor .tool-guide__item > summary h3 {
	margin: 0;
	color: var(--ink, #0f172a);
	font-size: 1.02rem;
	line-height: 1.35;
	letter-spacing: -0.01em;
}

.omniemu-tool-elementor .tool-guide__item > summary h3 {
	font-size: 0.98rem;
}

.omniemu-tool-elementor .tool-guide__toggle {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	flex: 0 0 auto;
	color: var(--accent-strong, #115e59);
	font-size: 0.82rem;
	font-weight: 800;
	white-space: nowrap;
}

.omniemu-tool-elementor .tool-guide__toggle::after {
	content: "\25BE";
	font-size: 0.9em;
	line-height: 1;
	transition: transform 120ms ease;
}

.omniemu-tool-elementor .tool-guide__item[open] .tool-guide__toggle::after {
	transform: rotate(180deg);
}

.omniemu-tool-elementor .tool-guide__less {
	display: none;
}

.omniemu-tool-elementor .tool-guide__item[open] .tool-guide__more {
	display: none;
}

.omniemu-tool-elementor .tool-guide__item[open] .tool-guide__less {
	display: inline;
}

.omniemu-tool-elementor .tool-guide__body {
	padding: 0 18px 18px;
	color: var(--ink, #334155);
}

.omniemu-tool-elementor .tool-guide__body > *:first-child {
	margin-top: 0;
}

.omniemu-tool-elementor .tool-guide__body > *:last-child {
	margin-bottom: 0;
}

.omniemu-tool-elementor .tool-guide__faq {
	display: grid;
	gap: 10px;
	margin-top: 8px;
}

.omniemu-tool-elementor .tool-guide__faq > h2 {
	margin: 16px 0 0;
	color: var(--ink, #0f172a);
	font-size: 1.12rem;
}

.omniemu-tool-elementor .tool-guide__faq-intro {
	color: var(--muted, #475569);
	font-size: 0.92rem;
}

.omniemu-tool-elementor .tool-guide__faq-item {
	background: var(--paper, #f8fafc);
}

.omniemu-tool-elementor .tool-guide__faq-item > summary {
	background: transparent;
}

.omniemu-tool-elementor .tool-guide__faq-item > summary:hover {
	background: var(--accent-soft, #f0fdfa);
}

/*
 * Download actions are marked by assets/js/tool-elementor.js. The tool apps
 * create them after processing, so a small script is more reliable than
 * guessing from the button markup. Keep the primary action of a tool as-is.
 */

.omniemu-tool-elementor .omniemu-download-action:not(.aiot-btn--primary) {
	border-color: var(--accent, #0f766e);
	background: var(--accent-soft, #f0fdfa);
	color: var(--accent-strong, #115e59);
	font-weight: 800;
}

.omniemu-tool-elementor .omniemu-download-action:not(.aiot-btn--primary)::before {
	content: "\2193";
	font-size: 1.05em;
	line-height: 1;
}

.omniemu-tool-elementor .omniemu-download-action:not(.aiot-btn--primary):hover:not(:disabled) {
	border-color: var(--accent-strong, #115e59);
	background: var(--accent, #0f766e);
	color: var(--accent-ink, #ffffff);
}

@media (min-width: 720px) {
	.omniemu-tool-elementor .tool-guide {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.omniemu-tool-elementor .tool-guide__hint,
	.omniemu-tool-elementor .tool-guide__item[open],
	.omniemu-tool-elementor .tool-guide__faq {
		grid-column: 1 / -1;
	}

	.omniemu-tool-elementor .tool-guide__faq {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.omniemu-tool-elementor .tool-guide__faq > h2,
	.omniemu-tool-elementor .tool-guide__faq > .tool-guide__faq-intro,
	.omniemu-tool-elementor .tool-guide__faq-item[open] {
		grid-column: 1 / -1;
	}
}

@media (max-width: 600px) {
	.omniemu-tool-elementor .tool-guide__item > summary {
		align-items: flex-start;
		flex-direction: column;
		gap: 8px;
	}

	.omniemu-tool-elementor .tool-guide__toggle {
		align-self: flex-end;
	}
}

@media (max-width: 980px) {
	.omniemu-tool-elementor .tool-aside {
		position: static;
	}
}
