/* Feature Matrix Table for Elementor
 * All colors/sizes are controlled via Elementor Style controls (inline selectors).
 * This file only defines structure/layout + sensible fallbacks.
 */

.efm-table-wrap {
	width: 100%;
	box-sizing: border-box;
}

.efm-table-wrap * {
	box-sizing: border-box;
}

.efm-table-caption {
	font-size: 1.5em;
	font-weight: 700;
	margin-bottom: 16px;
}

.efm-table-scroll {
	overflow-x: auto;
	/* Buffer so the table's own drop shadow (Style > Table > Shadow) has
	 * room to render without being clipped by this scrollable box. */
	padding: 14px;
	margin: -14px;
}

.efm-table {
	--efm-col-count: 3;
	--efm-stack-gap: 20px;
	display: grid;
	grid-template-columns: minmax(160px, 1.3fr) repeat(var(--efm-col-count), minmax(140px, 1fr));
	width: 100%;
	background: #fff;
	border: 1px solid #e4e6e9;
	overflow: visible;
}

.efm-thead,
.efm-tbody,
.efm-row {
	display: contents;
}

/* ---------- Header ---------- */

.efm-th {
	background: #f7f8fa;
	padding: 24px 16px;
	text-align: center;
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
}

.efm-th:not(.efm-col-highlighted) {
	border-bottom: 1px solid #e4e6e9;
}

.efm-sticky-header .efm-th {
	position: sticky;
	top: 0;
	z-index: 3;
}

.efm-th-corner {
	background: transparent;
	border-bottom: 1px solid transparent;
}

.efm-badge {
	display: inline-block;
	font-size: 0.75em;
	font-weight: 600;
	padding: 4px 12px;
	border-radius: 999px;
	background: #6d5efc;
	color: #fff;
	margin-bottom: 10px;
}

.efm-col-icon {
	margin-bottom: 10px;
}

.efm-col-icon img {
	max-width: 40px;
	max-height: 40px;
	margin: 0 auto;
}

.efm-col-title {
	font-size: 1.15em;
	font-weight: 700;
	margin-bottom: 4px;
}

.efm-col-subtitle {
	font-size: 0.95em;
	color: #6b7280;
	margin-bottom: 14px;
}

.efm-cta {
	display: inline-block;
	text-decoration: none;
	font-weight: 600;
	padding: 10px 22px;
	border: 1px solid transparent;
	border-radius: 6px;
	background: #1a1a1a;
	color: #fff;
	transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.efm-cta:hover,
.efm-cta:focus {
	background: #333;
	color: #fff;
}

/* ---------- Rows ---------- */

.efm-row-label {
	padding: 16px;
	font-weight: 500;
	border-bottom: 1px solid #e4e6e9;
	display: flex;
	align-items: center;
	gap: 6px;
	position: relative;
}

.efm-sticky-col .efm-row-label,
.efm-sticky-col .efm-th:first-child {
	position: sticky;
	left: 0;
	z-index: 2;
}

.efm-cell {
	padding: 16px;
	text-align: center;
	display: flex;
	align-items: center;
	justify-content: center;
}

.efm-cell:not(.efm-col-highlighted) {
	border-bottom: 1px solid #e4e6e9;
}

.efm-striped .efm-row:nth-child(even) .efm-row-label,
.efm-striped .efm-row:nth-child(even) .efm-cell:not(.efm-col-highlighted) {
	background-color: #fafafa;
}

.efm-row-group-header {
	background: #f0f1f3;
}

.efm-row-group-header .efm-row-label {
	font-weight: 700;
	background: #f0f1f3;
}

/* The table's own outer border already closes off the bottom edge, so the
 * last row doesn't also draw its own bottom divider — otherwise the two
 * lines sit right on top of each other and the edge looks twice as thick
 * as every other side. */
.efm-tbody .efm-row:last-child > .efm-cell,
.efm-tbody .efm-row:last-child > .efm-row-label {
	border-bottom: none;
}

/* ---------- Corner title (top-left cell) ---------- */

.efm-corner-title {
	font-size: 1.15em;
	font-weight: 700;
}

/* ---------- Column borders (opt-in via "Show Column Borders") ----------
 * Only :not(:last-child) cells get a right border, and nothing ever gets
 * a left border — so each internal seam is drawn by exactly one cell,
 * never two, which is what avoids the doubled-thickness look. The
 * outermost left/right edges are left to the table's own outer border. */

.efm-col-borders .efm-th:not(:last-child):not(.efm-col-highlighted),
.efm-col-borders .efm-row-label,
.efm-col-borders .efm-cell:not(:last-child):not(.efm-col-highlighted) {
	border-right: 1px solid #e4e6e9;
}

/* ---------- Highlighted column ---------- */

/* Left/right run down every cell, giving a continuous boxed look. Every
 * cell (including the header) also draws its own bottom edge as its
 * divider from the row below — the same technique every other column in
 * the table already uses for its dividers. (An earlier version used
 * border-top on the cell below instead, to dodge doubling with the
 * table's own outer border — but mixing top-based dividers in one
 * column with bottom-based dividers everywhere else is exactly the kind
 * of thing that produces a stray 1px rounding difference between them.)
 * The last row is the one exception: it doesn't draw its own bottom
 * edge, since the table's outer border already closes it off there. */
.efm-col-highlighted {
	background-color: #f4f2ff;
	border-left: 2px solid #6d5efc;
	border-right: 2px solid #6d5efc;
	border-bottom: 2px solid #6d5efc;
}

.efm-tbody .efm-row:last-child > .efm-cell.efm-col-highlighted {
	border-bottom: none;
}

/* ---------- Value icons ---------- */

.efm-value-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
}

.efm-value-icon svg {
	width: 100%;
	height: 100%;
}

.efm-value-check {
	color: #22c55e;
}

.efm-value-x {
	color: #d1d5db;
}

.efm-value-dash {
	color: #d1d5db;
	font-size: 1.1em;
}

.efm-value-custom-icon {
	color: #6d5efc;
}

.efm-value-text {
	font-weight: 500;
}

/* ---------- Tooltip ---------- */

.efm-tooltip-icon {
	position: relative;
	display: inline-flex;
	color: #9ca3af;
	cursor: help;
}

.efm-tooltip-text {
	position: absolute;
	bottom: 100%;
	left: 50%;
	transform: translateX(-50%) translateY(-8px);
	background: #1a1a1a;
	color: #fff;
	font-size: 0.8em;
	font-weight: 400;
	padding: 6px 10px;
	border-radius: 4px;
	white-space: nowrap;
	max-width: 220px;
	white-space: normal;
	width: max-content;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.15s ease;
	pointer-events: none;
	z-index: 5;
}

.efm-tooltip-icon:hover .efm-tooltip-text,
.efm-tooltip-icon:focus .efm-tooltip-text {
	opacity: 1;
	visibility: visible;
}

/* ---------- Expandable content row ---------- */

.efm-row-label-text {
	flex: 0 1 auto;
}

.efm-row-expand-toggle {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	padding: 0;
	border: none;
	border-radius: 4px;
	background-color: transparent;
	order: -1;
	color: #6b7280;
	cursor: pointer;
	outline: none;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.efm-expand-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 12px;
	height: 12px;
	font-size: 12px;
}

/* Closed icon shows by default; open icon shows once .is-open is toggled
 * on (by JS). Only one of the two is ever visible at a time. */
.efm-row-expand-toggle .efm-expand-icon-open {
	display: none;
}

.efm-row-expand-toggle.is-open .efm-expand-icon-closed {
	display: none;
}

.efm-row-expand-toggle.is-open .efm-expand-icon-open {
	display: inline-flex;
}

.efm-row-expand-toggle:hover,
.efm-row-expand-toggle:focus-visible {
	background-color: #f0f0f0;
	color: #1a1a1a;
}

/* "Icon Position" setting (Content > Settings): toggle sits before the
 * feature name by default (order: -1, set above); this pushes it after
 * the name (and after the tooltip icon, if present) instead. */
.efm-expand-icon-after .efm-row-expand-toggle {
	order: 2;
}

/* The 0fr/1fr grid trick: animating grid-template-rows lets a
 * height:auto content block expand/collapse smoothly without
 * JavaScript measuring pixel heights. .efm-row-expand-inner's
 * overflow:hidden is what actually clips it while collapsed. */
.efm-row-expand-content {
	display: grid;
	grid-template-rows: 0fr;
	transition: grid-template-rows 0.25s ease;
	background: #fbfbfd;
	border-bottom: 1px solid #e4e6e9;
}

.efm-tbody .efm-row:last-child > .efm-row-expand-content {
	border-bottom: none;
}

.efm-row-expand-content.is-open {
	grid-template-rows: 1fr;
}

.efm-row-expand-inner {
	overflow: hidden;
	min-height: 0;
}

.efm-row-expand-inner > * {
	padding: 20px 24px;
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ---------- Scroll shadows (added by JS when table overflows) ---------- */

.efm-table-wrap {
	position: relative;
}

.efm-table-scroll.efm-scrolled-start {
	box-shadow: inset 8px 0 8px -8px rgba(0, 0, 0, 0.15);
}

.efm-table-scroll.efm-scrolled-end {
	box-shadow: inset -8px 0 8px -8px rgba(0, 0, 0, 0.15);
}

.efm-table-scroll.efm-scrolled-start.efm-scrolled-end {
	box-shadow: inset 8px 0 8px -8px rgba(0, 0, 0, 0.15), inset -8px 0 8px -8px rgba(0, 0, 0, 0.15);
}

/* ============================================================
 * RESPONSIVE STACKED LAYOUT
 * Each plan's header stays intact; feature rows list every
 * column's value with its label injected via data-label.
 * ==========================================================*/

@media (max-width: 1024px) {
	.efm-table.efm-stack-tablet {
		display: block;
		border: none;
		background: transparent;
	}

	.efm-stack-tablet .efm-thead,
	.efm-stack-tablet .efm-tbody,
	.efm-stack-tablet .efm-row {
		display: block;
	}

	.efm-stack-tablet .efm-th-corner {
		display: none;
	}

	.efm-stack-tablet .efm-th {
		display: block;
		margin-bottom: var(--efm-stack-gap);
		border: 1px solid #e4e6e9;
		border-radius: 8px;
		position: static !important;
	}

	.efm-stack-tablet .efm-tbody {
		border: 1px solid #e4e6e9;
		border-radius: 8px;
		overflow: hidden;
		margin-top: var(--efm-stack-gap);
	}

	.efm-stack-tablet .efm-row-label {
		position: static !important;
		background: #f7f8fa !important;
		font-weight: 700;
	}

	.efm-stack-tablet .efm-cell {
		display: flex;
		justify-content: space-between;
		align-items: center;
		text-align: right;
		border-bottom: 1px solid #eee;
	}

	.efm-stack-tablet .efm-cell:before {
		content: attr(data-label);
		font-weight: 600;
		font-size: 0.85em;
		color: #6b7280;
		text-align: left;
		margin-right: 12px;
	}

	.efm-col-borders.efm-stack-tablet .efm-th,
	.efm-col-borders.efm-stack-tablet .efm-cell,
	.efm-col-borders.efm-stack-tablet .efm-row-label {
		border-right: none !important;
	}
}

@media (max-width: 767px) {
	.efm-table.efm-stack-mobile {
		display: block;
		border: none;
		background: transparent;
	}

	.efm-stack-mobile .efm-thead,
	.efm-stack-mobile .efm-tbody,
	.efm-stack-mobile .efm-row {
		display: block;
	}

	.efm-stack-mobile .efm-th-corner {
		display: none;
	}

	.efm-stack-mobile .efm-th {
		display: block;
		margin-bottom: var(--efm-stack-gap);
		border: 1px solid #e4e6e9;
		border-radius: 8px;
		position: static !important;
	}

	.efm-stack-mobile .efm-tbody {
		border: 1px solid #e4e6e9;
		border-radius: 8px;
		overflow: hidden;
		margin-top: var(--efm-stack-gap);
	}

	.efm-stack-mobile .efm-row-label {
		position: static !important;
		background: #f7f8fa !important;
		font-weight: 700;
	}

	.efm-stack-mobile .efm-cell {
		display: flex;
		justify-content: space-between;
		align-items: center;
		text-align: right;
		border-bottom: 1px solid #eee;
	}

	.efm-stack-mobile .efm-cell:before {
		content: attr(data-label);
		font-weight: 600;
		font-size: 0.85em;
		color: #6b7280;
		text-align: left;
		margin-right: 12px;
	}

	.efm-col-borders.efm-stack-mobile .efm-th,
	.efm-col-borders.efm-stack-mobile .efm-cell,
	.efm-col-borders.efm-stack-mobile .efm-row-label {
		border-right: none !important;
	}
}
