/* Polaris Product Compare - stili frontend. */

/* ---------- Barra / drawer fissa ---------- */
.ppc-bar {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 99990;
	background: #ffffff;
	border-top: 2px solid #2271b1;
	box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.15);
}

.ppc-bar__inner {
	display: flex;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
	max-width: 1200px;
	margin: 0 auto;
	padding: 10px 16px;
}

.ppc-bar__title {
	font-weight: 700;
}

.ppc-bar__slots {
	display: flex;
	gap: 10px;
	list-style: none;
	margin: 0;
	padding: 0;
	flex: 1 1 260px;
	overflow-x: auto;
}

.ppc-slot {
	position: relative;
	display: flex;
	align-items: center;
	gap: 6px;
	border: 1px solid #ddd;
	border-radius: 6px;
	padding: 4px 26px 4px 4px;
	background: #f6f7f7;
	white-space: nowrap;
}

.ppc-slot__img {
	width: 32px;
	height: 32px;
	object-fit: cover;
	border-radius: 4px;
}

.ppc-slot__name {
	font-size: 0.85rem;
	text-decoration: none;
}

.ppc-slot__x {
	position: absolute;
	top: 2px;
	right: 2px;
	border: 0;
	background: transparent;
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
	padding: 2px 6px;
}

.ppc-bar__actions {
	display: flex;
	gap: 8px;
}

.ppc-btn {
	display: inline-block;
	padding: 8px 14px;
	border-radius: 6px;
	text-decoration: none;
	cursor: pointer;
	border: 1px solid #2271b1;
	background: #2271b1;
	color: #fff;
}

.ppc-btn--clear {
	background: #fff;
	color: #2271b1;
}

/* ---------- Avviso (toast) ---------- */
.ppc-toast {
	position: fixed;
	left: 50%;
	bottom: 84px;
	transform: translateX(-50%);
	z-index: 99991;
	background: #1e1e1e;
	color: #fff;
	padding: 10px 16px;
	border-radius: 6px;
	max-width: 90vw;
	text-align: center;
}

/* ---------- Spunta nelle liste ---------- */
.ppc-loop {
	margin-top: 8px;
}

.ppc-check {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 0.9rem;
	cursor: pointer;
}

/* ---------- Stato vuoto ---------- */
.ppc-empty {
	border: 1px dashed #ccc;
	padding: 24px;
	border-radius: 8px;
	text-align: center;
}

/* ---------- Tabella con scroll + colonne sticky ---------- */
.ppc-scrollwrap {
	position: relative;
	overflow: auto;
	max-height: 75vh;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
}

.ppc-scrollhint {
	display: none;
	margin: 0;
	padding: 6px 12px;
	font-size: 0.8rem;
	color: #666;
	background: #f6f7f7;
}

.ppc-table {
	border-collapse: separate;
	border-spacing: 0;
	width: 100%;
	min-width: 640px;
}

.ppc-table th,
.ppc-table td {
	padding: 12px;
	text-align: left;
	vertical-align: top;
	border-bottom: 1px solid #eee;
	background: #fff;
}

/* Colonna etichette (prima) sticky a sinistra con ombra indicatore. */
.ppc-table th[scope="row"],
.ppc-table .ppc-th-corner {
	position: sticky;
	left: 0;
	z-index: 2;
	min-width: 140px;
	background: #f6f7f7;
	box-shadow: 2px 0 4px rgba(0, 0, 0, 0.08);
}

/* Intestazione prodotti sticky in cima. */
.ppc-table thead th {
	position: sticky;
	top: 0;
	z-index: 3;
	background: #fff;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

/* Angolo in alto a sinistra: sticky su entrambi gli assi. */
.ppc-table .ppc-th-corner {
	z-index: 4;
}

.ppc-th-product {
	min-width: 180px;
}

.ppc-prod {
	display: flex;
	flex-direction: column;
	gap: 6px;
	text-decoration: none;
	color: inherit;
}

.ppc-prod__img {
	max-width: 120px;
	height: auto;
}

.ppc-prod__name {
	font-weight: 700;
}

.ppc-price .amount,
.ppc-price {
	font-weight: 600;
}

/* Mobile: mostra l'indicatore di scroll. */
@media (max-width: 782px) {
	.ppc-scrollhint {
		display: block;
	}
	.ppc-bar__inner {
		gap: 8px;
	}
}

/* Utilita' screen reader (fallback se il tema non la fornisce). */
.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}
