/* "Uporedi" — checkbox-style toggle on each card, a floating tray, and a
   side-by-side comparison modal. */

.kh-card__compare-toggle {
	position: absolute;
	top: 14px;
	left: 14px;
	z-index: 1;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 11px;
	letter-spacing: 0.02em;
	color: rgba(10, 30, 61, 0.6);
	background: #fff;
	border: 1px solid rgba(10, 30, 61, 0.15);
	border-radius: 999px;
	padding: 5px 12px 5px 8px;
	cursor: pointer;
	transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.kh-card__compare-check {
	width: 12px;
	height: 12px;
	border-radius: 3px;
	border: 1px solid rgba(10, 30, 61, 0.3);
	background: #fff;
	flex-shrink: 0;
	position: relative;
}

.kh-card__compare-toggle.is-active {
	color: #fff;
	background: var(--kh-navy-900);
	border-color: var(--kh-navy-900);
}

.kh-card__compare-toggle.is-active .kh-card__compare-check {
	background: var(--kh-gold);
	border-color: var(--kh-gold);
}

.kh-card__compare-toggle.is-active .kh-card__compare-check::after {
	content: '';
	position: absolute;
	left: 3px;
	top: 0;
	width: 3px;
	height: 6px;
	border: solid var(--kh-navy-950);
	border-width: 0 1.5px 1.5px 0;
	transform: rotate(45deg);
}

.kh-card__compare-toggle:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

/* Floating tray — sits just above the sticky contact bar. */
.kh-compare-tray {
	position: fixed;
	left: 50%;
	bottom: 82px;
	transform: translate(-50%, 20px);
	z-index: 25;
	display: none;
	align-items: center;
	gap: 14px;
	padding: 12px 18px;
	background: rgba(10, 10, 10, 0.92);
	border: 1px solid rgba(212, 168, 86, 0.3);
	border-radius: 999px;
	box-shadow: 0 16px 32px -14px rgba(0, 0, 0, 0.5);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.25s ease, transform 0.25s ease;
}

body:not(.has-sticky-bar) .kh-compare-tray {
	bottom: 24px;
}

.kh-compare-tray.is-visible {
	display: flex;
	opacity: 1;
	transform: translate(-50%, 0);
	pointer-events: auto;
}

.kh-compare-tray__chips {
	display: flex;
	gap: 6px;
}

.kh-compare-tray__chip {
	font-size: 12px;
	color: #fff;
	background: rgba(255, 255, 255, 0.1);
	border-radius: 999px;
	padding: 4px 10px;
}

.kh-compare-tray__btn {
	font-size: 12px;
	letter-spacing: 0.02em;
	color: var(--kh-navy-950);
	background: var(--kh-gold);
	border: none;
	border-radius: 999px;
	padding: 8px 16px;
	cursor: pointer;
	white-space: nowrap;
	transition: background-color 0.2s ease, opacity 0.2s ease;
}

.kh-compare-tray__btn:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

.kh-compare-tray__btn:not(:disabled):hover {
	background: var(--kh-gold-light);
}

.kh-compare-tray__clear {
	font-size: 12px;
	color: rgba(255, 255, 255, 0.5);
	background: none;
	border: none;
	cursor: pointer;
	white-space: nowrap;
}

.kh-compare-tray__clear:hover {
	color: #fff;
}

@media (max-width: 600px) {
	.kh-compare-tray {
		left: 12px;
		right: 12px;
		transform: translateY(20px);
		flex-wrap: wrap;
		justify-content: center;
	}

	.kh-compare-tray.is-visible {
		transform: translateY(0);
	}
}

/* Comparison modal */
.kh-compare-modal {
	position: fixed;
	inset: 0;
	z-index: 60;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.25s ease;
}

.kh-compare-modal.is-open {
	opacity: 1;
	pointer-events: auto;
}

.kh-compare-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(4, 16, 42, 0.65);
}

.kh-compare-modal__card {
	position: relative;
	max-width: 720px;
	width: 100%;
	max-height: 82vh;
	overflow-y: auto;
	background: #fff;
	border-radius: 12px;
	padding: 32px 28px 28px;
	box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.4);
}

.kh-compare-modal__close {
	position: absolute;
	top: 16px;
	right: 18px;
	width: 30px;
	height: 30px;
	border: none;
	background: none;
	color: rgba(10, 30, 61, 0.5);
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
}

.kh-compare-modal__close:hover {
	color: var(--kh-navy-900);
}

.kh-compare-modal__title {
	margin: 0 0 20px;
	font-size: 20px;
	font-weight: 500;
	color: var(--kh-navy-900);
}

.kh-compare-modal__table-wrap {
	overflow-x: auto;
}

.kh-compare-table {
	width: 100%;
	border-collapse: collapse;
}

.kh-compare-table th,
.kh-compare-table td {
	text-align: left;
	padding: 10px 16px;
	font-size: 14px;
	border-bottom: 1px solid rgba(10, 30, 61, 0.08);
	white-space: nowrap;
}

.kh-compare-table th {
	font-weight: 400;
	color: rgba(10, 30, 61, 0.5);
	font-size: 12px;
	letter-spacing: 0.03em;
}

.kh-compare-table td {
	color: var(--kh-navy-900);
}

.kh-compare-table__remove {
	font-size: 12px;
	color: #a8392f;
	background: none;
	border: 1px solid rgba(200, 60, 50, 0.3);
	border-radius: 999px;
	padding: 5px 12px;
	cursor: pointer;
}

.kh-compare-table__remove:hover {
	background: rgba(200, 60, 50, 0.08);
}
