/**
 * Comparison Table — Figma 186:48312 (1600px).
 */

.anm-comparison-table {
	--anm-cmp-ref-w: 1600;
	--anm-cmp-heading-gradient: linear-gradient(-4.55deg, #dfdee8 27.93%, #aaa9ad 125.18%, #878787 226.65%);
	--anm-cmp-border: #1a1a1a;
	--anm-cmp-blue: #8fd9fb;
	--anm-cmp-row-h: 8.4375rem;
	--anm-cmp-head-h: 6.0625rem;

	box-sizing: border-box;
	width: 100%;
	max-width: calc(var(--anm-cmp-ref-w) * 1px);
	margin-left: auto;
	margin-right: auto;
	padding-block: clamp(3rem, 6vw, 5rem);
	padding-inline: var(--anm-section-gutter);
	color: #fff;
}

.anm-comparison-table__inner {
	display: flex;
	flex-direction: column;
	gap: 4.5rem;
	width: 100%;
}

/* --- Nagłówek --- */
.anm-comparison-table__header {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 2rem;
}

.anm-comparison-table__header-main {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
	max-width: 40.625rem;
}

.anm-comparison-table__label {
	margin: 0;
	font-family: "IBM Plex Sans", sans-serif;
	font-size: 1.125rem;
	font-weight: 400;
	line-height: 1.4;
	letter-spacing: -0.02em;
	color: #a7a7a7;
}

.anm-comparison-table__heading {
	margin: 0;
	font-family: "Playfair Display", Georgia, serif;
	font-size: clamp(2.25rem, 4vw, 4rem);
	font-weight: 400;
	line-height: 1.1;
	letter-spacing: -0.03em;
	background: var(--anm-cmp-heading-gradient);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	color: transparent;
}

.anm-comparison-table__header-side {
	flex: 0 1 40.4375rem;
}

.anm-comparison-table__intro {
	margin: 0;
	font-family: "IBM Plex Sans", sans-serif;
	font-size: clamp(1rem, 1.25vw, 1.25rem);
	font-weight: 400;
	line-height: 1.4;
	color: #fff;
	text-align: justify;
}

/* --- Tabela --- */
.anm-comparison-table__grid {
	display: grid;
	grid-template-columns: minmax(0, 33.3125rem) minmax(0, 1fr) minmax(0, 1fr);
	width: 100%;
}

.anm-comparison-table__row {
	display: contents;
}

.anm-comparison-table__cell {
	display: flex;
	align-items: center;
	min-height: var(--anm-cmp-row-h);
	padding: 2rem 1.5rem;
	border-left: 1px solid var(--anm-cmp-border);
	box-sizing: border-box;
	font-family: "IBM Plex Sans", sans-serif;
	font-size: clamp(1rem, 1.25vw, 1.25rem);
	font-weight: 400;
	line-height: 1.4;
	color: #fff;
	text-align: justify;
}

.anm-comparison-table__row--head .anm-comparison-table__cell {
	min-height: var(--anm-cmp-head-h);
}

.anm-comparison-table__cell--corner {
	position: relative;
	overflow: hidden;
	background-color: #0d0d0d;
	background-image: repeating-linear-gradient(
		-45deg,
		#1a1a1a 0,
		#1a1a1a 1px,
		transparent 1px,
		transparent 14px
	);
	border-top: 1px solid var(--anm-cmp-border);
}

.anm-comparison-table__cell--head {
	font-size: 1.5rem;
	font-weight: 500;
	line-height: 1.4;
	border-top: 1px solid var(--anm-cmp-border);
}

.anm-comparison-table__cell--head.anm-comparison-table__cell--featured {
	background: var(--anm-cmp-blue);
	color: rgba(4, 79, 113, 0.8);
}

.anm-comparison-table__cell--head.anm-comparison-table__cell--compare {
	background: #030303;
	color: rgba(255, 255, 255, 0.8);
	border-right: 1px solid var(--anm-cmp-border);
}

.anm-comparison-table__cell--label {
	font-size: 1.5rem;
	font-weight: 500;
	line-height: 1.4;
	color: rgba(255, 255, 255, 0.8);
}

.anm-comparison-table__row--even .anm-comparison-table__cell--label {
	background: #080808;
}

.anm-comparison-table__row--odd .anm-comparison-table__cell--label {
	background: transparent;
}

.anm-comparison-table__row--even .anm-comparison-table__cell--featured {
	background: rgba(143, 217, 251, 0.2);
}

.anm-comparison-table__row--odd .anm-comparison-table__cell--featured {
	background: rgba(143, 217, 251, 0.1);
}

.anm-comparison-table__row--even .anm-comparison-table__cell--compare {
	background: #080808;
}

.anm-comparison-table__row--odd .anm-comparison-table__cell--compare {
	background: transparent;
}

.anm-comparison-table__grid > .anm-comparison-table__row:last-child .anm-comparison-table__cell {
	border-bottom: 1px solid var(--anm-cmp-border);
}

.anm-comparison-table__grid > .anm-comparison-table__row .anm-comparison-table__cell--compare {
	border-right: 1px solid var(--anm-cmp-border);
}

.anm-comparison-table__empty {
	margin: 0;
	font-family: "IBM Plex Sans", sans-serif;
	font-size: 1rem;
	color: rgba(255, 255, 255, 0.6);
}

.anm-comparison-table__grid-wrap {
	width: 100%;
}

@media (max-width: 1199px) {
	.anm-comparison-table__header {
		flex-direction: column;
		align-items: flex-start;
	}

	.anm-comparison-table__header-main {
		flex: 1 1 auto;
		width: 100%;
		max-width: none;
		height: auto;
	}

	.anm-comparison-table__header-side {
		flex: 1 1 auto;
		width: 100%;
		max-width: none;
		height: auto;
	}
}

/* Tablet — poziomy scroll zamiast rozbijania kolumn */
@media (max-width: 1199px) and (min-width: 768px) {
	.anm-comparison-table__grid-wrap {
		margin-inline: calc(var(--anm-section-gutter) * -1);
		padding-inline: var(--anm-section-gutter);
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: thin;
		scrollbar-color: rgba(143, 217, 251, 0.45) transparent;
	}

	.anm-comparison-table__grid {
		min-width: 42rem;
	}

	.anm-comparison-table__cell {
		padding: 1.25rem 1rem;
	}
}

/* Mobile — karty z kryterium + dwie kolumny obok siebie */
@media (max-width: 767px) {
	.anm-comparison-table {
		--anm-cmp-row-h: auto;
		--anm-cmp-head-h: auto;
	}

	.anm-comparison-table__inner {
		gap: 2.5rem;
	}

	.anm-comparison-table__intro {
		text-align: left;
	}

	.anm-comparison-table__grid {
		display: flex;
		flex-direction: column;
		gap: 0.75rem;
	}

	.anm-comparison-table__row {
		display: grid;
		grid-template-columns: 1fr 1fr;
		border: 1px solid var(--anm-cmp-border);
		overflow: hidden;
	}

	.anm-comparison-table__row--head {
		position: sticky;
		top: 0;
		z-index: 2;
		gap: 0;
		border: none;
		background: #0d0d0d;
	}

	.anm-comparison-table__cell--corner {
		display: none;
	}

	.anm-comparison-table__row--head .anm-comparison-table__cell {
		min-height: auto;
		padding: 0.75rem 0.875rem;
		font-size: 0.8125rem;
		line-height: 1.3;
		text-align: center;
		border: 1px solid var(--anm-cmp-border);
	}

	.anm-comparison-table__row--head .anm-comparison-table__cell--featured {
		border-top-left-radius: 4px;
		border-bottom-left-radius: 4px;
		border-right: none;
	}

	.anm-comparison-table__row--head .anm-comparison-table__cell--compare {
		border-top-right-radius: 4px;
		border-bottom-right-radius: 4px;
	}

	.anm-comparison-table__row:not(.anm-comparison-table__row--head) {
		grid-template-areas:
			"label label"
			"featured compare";
	}

	.anm-comparison-table__row:not(.anm-comparison-table__row--head) .anm-comparison-table__cell {
		min-height: auto;
		padding: 1rem 0.875rem;
		font-size: 0.9375rem;
		line-height: 1.45;
		text-align: left;
		border: none;
	}

	.anm-comparison-table__row:not(.anm-comparison-table__row--head) .anm-comparison-table__cell--label {
		grid-area: label;
		padding: 0.875rem 1rem;
		font-size: 1.0625rem;
		line-height: 1.35;
		border-bottom: 1px solid var(--anm-cmp-border);
	}

	.anm-comparison-table__row:not(.anm-comparison-table__row--head) .anm-comparison-table__cell--featured {
		grid-area: featured;
		border-right: 1px solid var(--anm-cmp-border);
	}

	.anm-comparison-table__row:not(.anm-comparison-table__row--head) .anm-comparison-table__cell--compare {
		grid-area: compare;
	}

	.anm-comparison-table__grid > .anm-comparison-table__row:last-child .anm-comparison-table__cell {
		border-bottom: none;
	}

	.anm-comparison-table__grid > .anm-comparison-table__row .anm-comparison-table__cell--compare {
		border-right: none;
	}
}

/* Bardzo wąskie ekrany — wartości pod sobą z etykietami kolumn */
@media (max-width: 479px) {
	.anm-comparison-table__row--head {
		display: none;
	}

	.anm-comparison-table__row:not(.anm-comparison-table__row--head) {
		grid-template-columns: 1fr;
		grid-template-areas:
			"label"
			"featured"
			"compare";
	}

	.anm-comparison-table__row:not(.anm-comparison-table__row--head) .anm-comparison-table__cell--featured,
	.anm-comparison-table__row:not(.anm-comparison-table__row--head) .anm-comparison-table__cell--compare {
		border-right: none;
		border-bottom: 1px solid var(--anm-cmp-border);
	}

	.anm-comparison-table__row:not(.anm-comparison-table__row--head) .anm-comparison-table__cell--compare {
		border-bottom: none;
	}

	.anm-comparison-table__cell--featured[data-col-label]::before,
	.anm-comparison-table__cell--compare[data-col-label]::before {
		content: attr(data-col-label);
		display: block;
		margin-bottom: 0.375rem;
		font-size: 0.6875rem;
		font-weight: 600;
		line-height: 1.3;
		letter-spacing: 0.04em;
		text-transform: uppercase;
		color: rgba(255, 255, 255, 0.55);
	}

	.anm-comparison-table__row:not(.anm-comparison-table__row--head) .anm-comparison-table__cell--featured::before {
		color: rgba(4, 79, 113, 0.95);
	}
}
