/**
 * Header: barra in alto "Spedizione gratuita" + Account (prova).
 *
 * File a parte, caricato da functions.php con l'handle osm-header-topbar: per
 * tornare alla barra verde con i testi bianchi basta togliere quella riga di
 * wp_enqueue_style. Il template dell'header (BeBuilder, ID 85) non viene
 * toccato: l'id serve solo a superare gli stili generati dal builder.
 *
 * - fondo crema al posto del verde salvia, con un filo oliva sotto
 * - testi scuri e piu' piccoli, furgoncino oliva davanti al messaggio
 * - Account: verde al passaggio del mouse, staccato da un filo verticale
 * - spazi: il messaggio e Account non si toccano piu' quando il testo va a
 *   capo; sotto i 480px di Account resta solo l'icona
 */

#mfn-header-template .mcb-section-etjfyu8s {
	background-color: #F7F2E4;
	box-shadow: inset 0 -1px 0 rgba(114, 122, 53, .25);
}

/* il builder da' flex-grow: 1 a tutti e due i blocchi senza distanza tra loro:
   qui il messaggio prende lo spazio che resta e Account solo il suo */
#mfn-header-template .mcb-section-etjfyu8s > .section_wrapper {
	gap: 20px;
}

#mfn-header-template .mcb-section-etjfyu8s .mcb-header-wrap:first-child {
	flex: 1 1 auto;
	min-width: 0;
}

#mfn-header-template .mcb-section-etjfyu8s .mcb-header-wrap:last-child {
	flex: 0 0 auto;
	padding-left: 20px;
	box-shadow: inset 1px 0 0 rgba(114, 122, 53, .3);
}

#mfn-header-template .mcb-section-etjfyu8s .column_plain_text .desc {
	display: flex;
	align-items: center;
	gap: 12px;
	color: #1D231E;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.35;
	letter-spacing: .06em;
}

/* furgoncino: tratto sottile, stesso peso dell'icona Account */
#mfn-header-template .mcb-section-etjfyu8s .column_plain_text .desc::before {
	content: "";
	flex: 0 0 auto;
	width: 24px;
	height: 18px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 24' fill='none' stroke='%23727A35' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 5h17v12H2z'/%3E%3Cpath d='M19 9h6l5 5v3H19z'/%3E%3Ccircle cx='9' cy='19' r='2.4' fill='%23F7F2E4'/%3E%3Ccircle cx='24' cy='19' r='2.4' fill='%23F7F2E4'/%3E%3C/svg%3E") no-repeat center / contain;
}

#mfn-header-template .mcb-section-etjfyu8s .mfn-header-account-link .icon-wrapper {
	--mfn-header-icon-color: #727A35;
}

#mfn-header-template .mcb-section-etjfyu8s .mfn-header-account-link .icon-wrapper svg .path {
	stroke: #727A35;
}

#mfn-header-template .mcb-section-etjfyu8s .mfn-header-account-link .desc-wrapper {
	color: #1D231E;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .08em;
	transition: color .2s ease;
}

#mfn-header-template .mcb-section-etjfyu8s .mfn-header-account-link:hover .desc-wrapper {
	color: #537D5D;
}

#mfn-header-template .mcb-section-etjfyu8s .mfn-header-account-link:hover .icon-wrapper svg .path {
	stroke: #537D5D;
}

#mfn-header-template .mcb-section-etjfyu8s .mfn-header-account-link .icon-wrapper {
	margin-right: 6px;
}

/* Punti fedelta': pastiglia verde prima di Accedi / Registrati, messa qui da
   assets/js/header-topbar.js. Solo sopra i 1300px: sotto c'e' il burger, che
   ha gia' la voce. Alta quanto l'icona di Account, cosi' la barra non cresce. */
#mfn-header-template .mcb-section-etjfyu8s .osm-topbar-pill {
	display: none;
}

@media only screen and (min-width: 1301px) {
	/* position/z-index: senza, ci finisce sopra .mcb-wrap-background-overlay
	   (in assoluto su tutto il wrap) e il link non si clicca */
	#mfn-header-template .mcb-section-etjfyu8s .osm-topbar-pill {
		position: relative;
		z-index: 1;
		display: inline-flex;
		align-items: center;
		margin-right: 20px;
		padding: 4px 14px;
		border-radius: 999px;
		background: #537D5D;
		color: #fff;
		font-size: 12px;
		font-weight: 700;
		line-height: 1.4;
		letter-spacing: .08em;
		text-transform: uppercase;
		white-space: nowrap;
		text-decoration: none;
		transition: background-color .2s ease;
	}

	#mfn-header-template .mcb-section-etjfyu8s .osm-topbar-pill:hover,
	#mfn-header-template .mcb-section-etjfyu8s .osm-topbar-pill:focus-visible {
		background: #3B3B1A;
		color: #fff;
	}
}

@media only screen and (max-width: 767px) {
	#mfn-header-template .mcb-section-etjfyu8s {
		padding: 8px 16px;
	}

	#mfn-header-template .mcb-section-etjfyu8s > .section_wrapper {
		gap: 14px;
	}

	#mfn-header-template .mcb-section-etjfyu8s .mcb-header-wrap:last-child {
		padding-left: 14px;
	}

	#mfn-header-template .mcb-section-etjfyu8s .column_plain_text .desc {
		gap: 10px;
		font-size: 12px;
		letter-spacing: .04em;
	}

	#mfn-header-template .mcb-section-etjfyu8s .column_plain_text .desc::before {
		width: 20px;
		height: 15px;
	}
}

/* telefoni: la scritta Account resta per gli screen reader, a vista solo l'icona */
@media only screen and (max-width: 479px) {
	#mfn-header-template .mcb-section-etjfyu8s .mfn-header-account-link .desc-wrapper {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip-path: inset(50%);
		white-space: nowrap;
	}

	#mfn-header-template .mcb-section-etjfyu8s .mfn-header-account-link .icon-wrapper {
		margin-right: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	#mfn-header-template .mcb-section-etjfyu8s .mfn-header-account-link .desc-wrapper,
	#mfn-header-template .mcb-section-etjfyu8s .osm-topbar-pill {
		transition: none;
	}
}
