/* ==========================================================================
   ANCORE BLOCK - FRONTEND
   Layout: bordi verticali tra ogni elemento usando CSS borders
   ========================================================================== */

.s4w-ancore {
	border-top: 1px solid var(--stroke-soft-200);
	border-bottom: 1px solid var(--stroke-soft-200);
	position: sticky;
	top: var(--header-height, 70px);
	z-index: 800;
	background-color: var(--bg-white-0);
}

.s4w-ancore__wrapper {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 54px;
}

/* Links */
.s4w-ancore__links {
	display: flex;
	align-items: center;
	list-style: none;
	margin: 0;
	padding: 0;
	flex-grow: 1;
	height: 100%;
	/* Bordo sinistro iniziale */
	border-left: 1px solid var(--stroke-soft-200);
}

.s4w-ancore__link-item {
	display: flex;
	align-items: center;
	height: 100%;
	/* Bordo destro su ogni item */
	border-right: 1px solid var(--stroke-soft-200);
}

.s4w-ancore__link {
	display: flex;
	align-items: center;
	height: 100%;
	padding: 0 20px;
	color: var(--text-soft-400) !important;
	text-decoration: none;
	text-transform: uppercase;
	transition: color 0.2s ease;
	white-space: nowrap;
	font-family: var(--font-primary);
	font-weight: var(--weight-regular); /* Book */
}

.s4w-ancore__link:hover,
.s4w-ancore__link:focus {
	color: var(--text-main-900) !important;
	outline: none;
}

/* Bottoni */
.s4w-ancore__buttons {
	display: flex;
	align-items: center;
	gap: 8px;
	padding-left: 40px;
	height: 100%;
}

.s4w-ancore__button {
	display: flex;
	align-items: center;
	height: 100%;
}

.s4w-ancore__button .btn {
	display: inline-flex;
	align-items: center;
	height: auto;
}

.s4w-ancore__arrow {
	margin-left: 8px;
	flex-shrink: 0;
}

/* ==========================================================================
   RESPONSIVE - TABLET (<=1024px)
   ========================================================================== */
@media (max-width: 1024px) {
	.s4w-ancore__link {
		padding: 0 16px;
	}

	.s4w-ancore__buttons {
		padding-left: 24px;
	}
}

/* ==========================================================================
   RESPONSIVE - MOBILE (<=768px)
   ========================================================================== */
@media (max-width: 768px) {
	/* Container edge-to-edge come breadcrumbs */
	.s4w-ancore .s4w-container {
		padding-left: 0;
		padding-right: 0;
	}

	.s4w-ancore__wrapper {
		overflow-x: auto;
		overflow-y: hidden;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
		-ms-overflow-style: none;
		flex-wrap: nowrap;
		height: 36px !important;
	}

	.s4w-ancore__wrapper::-webkit-scrollbar {
		display: none;
	}

	.s4w-ancore__links {
		flex-shrink: 0;
		border-left: none !important;
	}

	.s4w-ancore__link-item {
		flex-shrink: 0;
	}

	/* Padding sinistro solo sul primo item, come breadcrumbs */
	.s4w-ancore__link-item:first-child .s4w-ancore__link {
		padding-left: 20px;
	}

	.s4w-ancore__link {
		padding: 0 12px;
		font-size: 12px;
		line-height: 16px;
	}

	.s4w-ancore__buttons {
		flex-shrink: 0;
		padding-left: 12px;
		padding-right: 12px;
	}

	.s4w-ancore__button {
		flex-shrink: 0;
	}
}
