/**
 * STL Tabella Costi Widget
 */

.elementor-widget-stl-tabella-costi {
	min-width: 0;
	max-width: 100%;
	width: 100%;
}

.stl-tabella-costi {
	--stl-tc-accent: #c00080;
	--stl-tc-bg: #1a121f;
	--stl-tc-text: #ffffff;
	--stl-tc-text-muted: rgba(255, 255, 255, 0.75);
	--stl-tc-cell-bg: #ffffff;
	--stl-tc-cell-text: #000000;
	--stl-tc-tab-active-bg: #1a121f;
	--stl-tc-tab-inactive-bg: #c00080;
	--stl-tc-tab-active-text: #ffffff;
	--stl-tc-tab-inactive-text: #ffffff;
	--stl-tc-col-top-bg: #c00080;
	--stl-tc-col-top-text: #ffffff;
	--stl-tc-col-main-bg: #ffffff;
	--stl-tc-col-main-text: #000000;
	--stl-tc-row-label-bg: #c00080;
	--stl-tc-row-label-text: #ffffff;
	--stl-tc-tab-border-color: #c00080;
	--stl-tc-panel-border-color: #c00080;
	--stl-tc-table-border-color: rgba(0, 0, 0, 0.12);
	--stl-tc-table-inner-border-color: rgba(0, 0, 0, 0.12);
	--stl-tc-row-label-border-color: rgba(255, 255, 255, 0.15);
	--stl-tc-border-width: 2px;
	--stl-tc-price-cols: 2;
	color: var(--stl-tc-text);
}

.stl-tabella-costi__main-title {
	margin: 0 0 1.25rem;
	font-weight: 300;
	line-height: 1.3;
	color: var(--stl-tc-text);
}

.stl-tabella-costi__shell {
	display: flex;
	flex-direction: column;
}

.stl-tabella-costi__nav {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 4px;
	margin: 0;
	padding: 0;
}

.stl-tabella-costi__tab {
	appearance: none;
	border: var(--stl-tc-border-width) solid var(--stl-tc-tab-border-color);
	background: var(--stl-tc-tab-inactive-bg);
	color: var(--stl-tc-tab-inactive-text);
	padding: 0.85rem 1.35rem;
	font: inherit;
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	line-height: 1.2;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.stl-tabella-costi__tab:hover,
.stl-tabella-costi__tab:focus-visible {
	outline: none;
	filter: brightness(1.08);
}

.stl-tabella-costi__tab.is-active {
	background: var(--stl-tc-tab-active-bg);
	color: var(--stl-tc-tab-active-text);
	border-bottom-color: var(--stl-tc-tab-active-bg);
	margin-bottom: calc(-1 * var(--stl-tc-border-width));
	position: relative;
	z-index: 2;
}

.stl-tabella-costi__panels {
	position: relative;
	border: var(--stl-tc-border-width) solid var(--stl-tc-panel-border-color);
	background: var(--stl-tc-bg);
	overflow: hidden;
}

.stl-tabella-costi__panel {
	display: none;
	padding: 1.5rem;
}

.stl-tabella-costi__panel.is-active {
	display: block;
}

.stl-tabella-costi__panel-title {
	margin: 0 0 0.35rem;
	font-weight: 300;
	font-size: clamp(1.5rem, 2.4vw, 2rem);
	line-height: 1.2;
	color: var(--stl-tc-text);
}

.stl-tabella-costi__panel-subtitle {
	margin: 0 0 1.25rem;
	font-weight: 300;
	font-size: 0.95rem;
	line-height: 1.4;
	color: var(--stl-tc-text-muted);
}

.stl-tabella-costi__table {
	display: grid;
	grid-template-columns: minmax(9rem, 1.1fr) repeat(var(--stl-tc-price-cols), minmax(8rem, 1fr));
	border: 1px solid var(--stl-tc-table-border-color);
	background: var(--stl-tc-cell-bg);
	overflow: hidden;
}

.stl-tabella-costi__table-corner {
	background: var(--stl-tc-bg);
	min-height: 3.25rem;
}

.stl-tabella-costi__col-header {
	display: flex;
	flex-direction: column;
	background: var(--stl-tc-col-main-bg);
	border-left: 1px solid var(--stl-tc-table-inner-border-color);
	min-height: 3.25rem;
}

.stl-tabella-costi__col-top {
	background: var(--stl-tc-col-top-bg);
	color: var(--stl-tc-col-top-text);
	font-size: 0.58rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	text-align: center;
	padding: 0.35rem 0.5rem;
	line-height: 1.2;
	overflow: hidden;
}

.stl-tabella-costi__col-main {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0.75rem 0.85rem;
	color: var(--stl-tc-col-main-text);
	font-weight: 700;
	font-size: 0.95rem;
	text-align: center;
	border-top: 1px solid var(--stl-tc-table-inner-border-color);
	overflow: hidden;
}

.stl-tabella-costi__col-header:not(.has-top-label) .stl-tabella-costi__col-main {
	border-top: 0;
}

.stl-tabella-costi__row-label {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0.9rem 0.75rem;
	background: var(--stl-tc-row-label-bg);
	color: var(--stl-tc-row-label-text);
	font-weight: 700;
	font-size: 0.82rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	text-align: center;
	border-top: 1px solid var(--stl-tc-row-label-border-color);
	overflow: hidden;
}

.stl-tabella-costi__cell {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0.9rem 0.75rem;
	background: var(--stl-tc-cell-bg);
	color: var(--stl-tc-cell-text);
	font-weight: 600;
	font-size: 0.95rem;
	text-align: center;
	border-top: 1px solid var(--stl-tc-table-inner-border-color);
	border-left: 1px solid var(--stl-tc-table-inner-border-color);
	overflow: hidden;
}

.stl-tabella-costi__cell.is-colspan {
	grid-column: span var(--stl-tc-cell-span, 1);
}

.stl-tabella-costi__footer {
	margin-top: 1.5rem;
}

.stl-tabella-costi__footer-title {
	margin: 0 0 0.5rem;
	font-weight: 400;
	font-size: 0.95rem;
	color: var(--stl-tc-text);
}

.stl-tabella-costi__footer-items {
	margin: 0;
	font-weight: 300;
	font-size: 0.82rem;
	line-height: 1.5;
	color: var(--stl-tc-text-muted);
}

.stl-tabella-costi__footer-sep {
	opacity: 0.85;
}

@media (max-width: 767px) {
	.stl-tabella-costi__nav {
		overflow-x: auto;
		flex-wrap: nowrap;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: thin;
	}

	.stl-tabella-costi__tab {
		flex: 0 0 auto;
		white-space: nowrap;
	}

	.stl-tabella-costi__table {
		grid-template-columns: minmax(7rem, 1fr) repeat(var(--stl-tc-price-cols), minmax(6.5rem, 1fr));
		font-size: 0.85rem;
	}

	.stl-tabella-costi__panel {
		padding: 1rem;
	}
}
