/**
 * Jannah Widgets — Feature Table (jhr-feature-table)
 *
 * Grid: 3 tracks per visual column → [icon] [label] [separator + value].
 * Items span their 3 tracks and use subgrid, so labels in the same visual
 * column share a width and the separators line up.
 * Item positions, striping and which cells get a divider are generated per
 * breakpoint by the widget (scoped <style> block in render()).
 */

.jhr-ft {
	/* Defaults = reference design; Elementor controls override these. */
	--jhr-ft-bg: #F6F6F6;
	--jhr-ft-bg-alt: #F3F2F2;
	--jhr-ft-bg-alt-on: var(--jhr-ft-bg);
	--jhr-ft-row-line-w: 1px;
	--jhr-ft-row-line-s: solid;
	--jhr-ft-row-line-c: #CCCCCC;
	--jhr-ft-col-line-w: 1px;
	--jhr-ft-col-line-s: solid;
	--jhr-ft-col-line-c: #CCCCCC;
	--jhr-ft-icon-c: #FFCC00;
	--jhr-ft-icon-size: 18px;
	--jhr-ft-icon-gap: 10px;
	--jhr-ft-label-c: #4D4D4D;
	--jhr-ft-label-gap: 14px;
	--jhr-ft-sep-gap: 6px;
	--jhr-ft-value-c: #4D4D4D;

	display: grid;
	grid-auto-rows: auto;
	gap: 0;
	margin: 0;
	padding: 0;
	list-style: none;
	background-color: var(--jhr-ft-bg);
	overflow: hidden;
	box-sizing: border-box;
}

.jhr-ft > .jhr-ft__item {
	grid-column: span 3;
	display: grid;
	grid-template-columns: subgrid;
	align-items: center;
	margin: 0;
	padding: 9px 20px 9px 12px;
	list-style: none;
	background-color: var(--jhr-ft-bg);
	border: 0 solid transparent;
	border-top-style: var(--jhr-ft-row-line-s);
	border-top-color: var(--jhr-ft-row-line-c);
	border-left-style: var(--jhr-ft-col-line-s);
	border-left-color: var(--jhr-ft-col-line-c);
	box-sizing: border-box;
	min-width: 0;
	transition: background-color .2s ease;
}

.jhr-ft > .jhr-ft__item::before,
.jhr-ft > .jhr-ft__item::marker {
	content: none;
	display: none;
}

/* Icon ------------------------------------------------------------------ */

.jhr-ft__icon {
	grid-column: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-right: var(--jhr-ft-icon-gap);
	color: var(--jhr-ft-icon-c);
	font-size: var(--jhr-ft-icon-size);
	line-height: 1;
}

.jhr-ft__icon:empty {
	width: var(--jhr-ft-icon-size); /* keeps alignment when one item has no icon */
}

.jhr-ft__icon i {
	font-size: inherit;
	color: inherit;
	line-height: 1;
}

.jhr-ft__icon svg {
	width: var(--jhr-ft-icon-size);
	height: var(--jhr-ft-icon-size);
	fill: var(--jhr-ft-icon-c);
	display: block;
}

.jhr-ft__icon img {
	width: var(--jhr-ft-icon-size);
	height: auto;
	max-width: none;
	display: block;
	border: 0;
	border-radius: 0;
	box-shadow: none;
}

/* Label / separator / value -------------------------------------------- */

.jhr-ft__label {
	grid-column: 2;
	padding-right: var(--jhr-ft-label-gap);
	color: var(--jhr-ft-label-c);
	font-family: "Titillium Web", sans-serif;
	font-size: 18px;
	line-height: 1.5;
	min-width: 0;
}

.jhr-ft__value {
	grid-column: 3;
	display: flex;
	align-items: baseline;
	min-width: 0;
	color: var(--jhr-ft-value-c);
	font-family: "Titillium Web", sans-serif;
	font-size: 18px;
	line-height: 1.5;
}

.jhr-ft__sep {
	flex: 0 0 auto;
	margin-right: var(--jhr-ft-sep-gap);
	color: var(--jhr-ft-sep-c, var(--jhr-ft-value-c));
}

.jhr-ft__text {
	min-width: 0;
	overflow-wrap: anywhere;
}

/* Icon + Label only layout: 2 tracks per column, no value cell. */
.jhr-ft--list > .jhr-ft__item {
	grid-column: span 2;
}

.jhr-ft--list .jhr-ft__label {
	padding-right: 0;
}

/* Icon on top, label below: plain cards, no background, no borders.
   Background/border/padding/alignment come from Style → Items. */
.jhr-ft.jhr-ft--stacked {
	--jhr-ft-icon-size: 54px;
	--jhr-ft-icon-gap: 12px;
	column-gap: 30px;
	row-gap: 30px;
	background: none;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	overflow: visible;
}

.jhr-ft--stacked > .jhr-ft__item {
	grid-column: span 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-start;
	text-align: center;
	padding: 0;
	background: none;
	border: 0 solid transparent;
}

.jhr-ft--stacked .jhr-ft__icon {
	margin-right: 0;
	margin-bottom: var(--jhr-ft-icon-gap);
}

.jhr-ft--stacked .jhr-ft__icon:empty {
	height: var(--jhr-ft-icon-size); /* keeps labels level when one item has no icon */
}

.jhr-ft--stacked .jhr-ft__label {
	padding-right: 0;
}

/* No icons: collapse the icon track spacing. */
.jhr-ft--no-icons .jhr-ft__icon {
	display: none;
}

/* Editor placeholder. */
.jhr-ft-empty {
	padding: 20px;
	border: 1px dashed #c7c7c7;
	text-align: center;
	color: #777;
	font-size: 13px;
}

/* Browsers without subgrid (very old): keep each row tidy with a fixed label width. */
@supports not (grid-template-columns: subgrid) {
	.jhr-ft > .jhr-ft__item {
		display: flex;
	}
	.jhr-ft__label {
		flex: 0 0 var(--jhr-ft-label-w, 45%);
	}
	.jhr-ft__value,
	.jhr-ft--list .jhr-ft__label {
		flex: 1 1 auto;
	}
}
