/* =========================================================
   MODALITÀ FERIE / CHIUSURA AZIENDALE
   Riusa i token --rck-* del checkout, ma con fallback: questi
   componenti compaiono anche fuori dal checkout (barra sitewide,
   scheda prodotto, carrello), dove checkout.css non è caricato.
   ========================================================= */

.npc-ferie-banner,
.npc-ferie-bar,
.npc-ferie-modal,
.npc-ferie-ack {
	font-family: 'Inter', system-ui, -apple-system, sans-serif;
	box-sizing: border-box;
}
.npc-ferie-banner *,
.npc-ferie-modal *,
.npc-ferie-ack * { box-sizing: border-box; }

/* ---------------------------------------------------------
   BANNER (checkout, carrello, prodotto, shop, thank-you)
   --------------------------------------------------------- */
.npc-ferie-banner {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	margin: 0 0 22px;
	padding: 16px 18px;
	/* I colori arrivano dallo stile scelto nel pannello (estive / invernali / custom),
	   stampati come variabili in <head>. I fallback = stile estivo. */
	background: var(--npcf-bg, #FEF8EE);
	border: 1px solid var(--npcf-border, #F0B849);
	border-left: 4px solid var(--npcf-border, #F0B849);
	border-radius: var(--rck-r-md, 10px);
	color: var(--npcf-text, #5A4A30);
	line-height: 1.6;
}
/* Preavviso (ferie non ancora iniziate): tono più tenue. */
.npc-ferie-banner--soft {
	background: var(--rck-info-bg, #f3f5f6);
	border-color: #d3dbe0;
	border-left-color: #8fa3b0;
	color: #44525c;
}

.npc-ferie-banner__icon {
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	margin-top: 1px;
	color: var(--npcf-icon, #C98A15);
}
.npc-ferie-banner--soft .npc-ferie-banner__icon { color: #6d8494; }

.npc-ferie-banner__content { min-width: 0; }

.npc-ferie-banner__title {
	display: block;
	margin: 0 0 4px;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--npcf-title, #8A5A00);
}
.npc-ferie-banner--soft .npc-ferie-banner__title { color: #3d5768; }

.npc-ferie-banner__text { font-size: 13.5px; }
.npc-ferie-banner__text p { margin: 0 0 8px; }
.npc-ferie-banner__text p:last-child { margin-bottom: 0; }

/* Variante a riga singola (prodotto, shop, mini-cart). */
.npc-ferie-banner--compact {
	padding: 11px 13px;
	margin-bottom: 14px;
	align-items: center;
}
.npc-ferie-banner--compact .npc-ferie-banner__title { display: none; }
.npc-ferie-banner--compact .npc-ferie-banner__text { font-size: 12.5px; line-height: 1.5; }

/* ---------------------------------------------------------
   BARRA SITEWIDE
   --------------------------------------------------------- */
.npc-ferie-bar {
	position: relative;
	z-index: 999;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 14px;
	padding: 10px 44px 10px 18px;
	background: var(--npcf-bar-bg, #1C1C1C);
	color: var(--npcf-bar-fg, #fff);
	font-size: 13px;
	line-height: 1.45;
	text-align: center;
}
.npc-ferie-bar[hidden] { display: none; }
.npc-ferie-bar__text { font-weight: 500; }
.npc-ferie-bar__close {
	position: absolute;
	right: 12px;
	top: 50%;
	transform: translateY(-50%);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	padding: 0;
	background: transparent;
	border: 0;
	border-radius: 4px;
	color: rgba(255, 255, 255, 0.6);
	cursor: pointer;
	transition: color 0.15s, background 0.15s;
}
.npc-ferie-bar__close:hover {
	color: #fff;
	background: rgba(255, 255, 255, 0.12);
}

@media (max-width: 640px) {
	.npc-ferie-bar { font-size: 12px; padding: 9px 40px 9px 14px; text-align: left; }
}

/* ---------------------------------------------------------
   POPUP DI PRESA VISIONE (bloccante)
   --------------------------------------------------------- */
.npc-ferie-modal {
	position: fixed;
	inset: 0;
	z-index: 999999;          /* sopra header sticky, drawer WoodMart, cookie bar */
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}
.npc-ferie-modal[hidden] { display: none; }

.npc-ferie-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 25, 18, 0.72);
	/* Nessun cursor:pointer: il backdrop NON chiude. La presa visione è obbligatoria. */
}

.npc-ferie-modal__card {
	position: relative;
	width: 100%;
	max-width: 520px;
	max-height: calc(100vh - 40px);
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	padding: 30px 30px 26px;
	background: var(--rck-bg, #fff);
	border-radius: var(--rck-r-lg, 14px);
	box-shadow: 0 24px 70px rgba(0, 0, 0, 0.3);
	text-align: center;
	animation: npc-ferie-in 0.24s cubic-bezier(.4, 0, .2, 1);
}
@keyframes npc-ferie-in {
	from { opacity: 0; transform: translateY(14px) scale(0.96); }
	to   { opacity: 1; transform: translateY(0) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
	.npc-ferie-modal__card { animation: none; }
}

.npc-ferie-modal__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 60px;
	height: 60px;
	margin-bottom: 14px;
	background: var(--npcf-soft, #FEF3E2);
	border-radius: 50%;
	color: var(--npcf-icon, #C98A15);
}

.npc-ferie-modal__title {
	margin: 0 0 12px;
	font-size: 21px;
	font-weight: 800;
	line-height: 1.25;
	letter-spacing: -0.01em;
	color: var(--npcf-title, #0C5143);
}

.npc-ferie-modal__body {
	margin: 0 0 18px;
	font-size: 14px;
	line-height: 1.6;
	color: var(--rck-fg-soft, #323232);
	text-align: left;
}
.npc-ferie-modal__body p { margin: 0 0 10px; }
.npc-ferie-modal__body p:last-child { margin-bottom: 0; }

/* Le quattro informazioni chiave, a colpo d'occhio. */
.npc-ferie-modal__facts {
	margin: 0 0 18px;
	padding: 14px 16px;
	list-style: none;
	background: var(--rck-soft, #F3F9F1);
	border-radius: var(--rck-r-sm, 8px);
	text-align: left;
}
.npc-ferie-modal__facts li {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 14px;
	padding: 7px 0;
	border-bottom: 1px solid rgba(0, 0, 0, 0.06);
	font-size: 13px;
}
.npc-ferie-modal__facts li:last-child { border-bottom: 0; }
.npc-ferie-modal__fact-k {
	flex-shrink: 0;
	font-size: 10.5px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--rck-muted, #6b7c6b);
}
.npc-ferie-modal__fact-v {
	text-align: right;
	font-weight: 600;
	color: var(--rck-fg, #1c1c1c);
}

.npc-ferie-modal__phone {
	margin: 0 0 18px;
	font-size: 13px;
	color: var(--rck-muted, #6b7c6b);
}
.npc-ferie-modal__phone a {
	font-weight: 700;
	color: var(--rck-acc-dk, #2F7D20);
	text-decoration: none;
}

/* Bottone: !important perché i temi (WoodMart in testa) sovrascrivono i button. */
.npc-ferie-modal__btn,
button.npc-ferie-modal__btn {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 100% !important;
	max-width: none !important;
	min-height: 0 !important;
	padding: 15px 28px !important;
	background: var(--rck-acc, #3FA62C) !important;
	background-image: none !important;
	border: 0 !important;
	border-radius: var(--rck-r-pill, 37px) !important;
	color: #fff !important;
	font-family: inherit !important;
	font-size: 14px !important;
	font-weight: 700 !important;
	letter-spacing: 0.04em !important;
	line-height: 1 !important;
	text-transform: uppercase !important;
	text-shadow: none !important;
	cursor: pointer;
	box-shadow: 0 2px 8px rgba(63, 166, 44, 0.25) !important;
	transition: background 0.2s, box-shadow 0.2s, transform 0.15s !important;
}
.npc-ferie-modal__btn:hover,
button.npc-ferie-modal__btn:hover {
	background: var(--rck-acc-hover, #000) !important;
	color: #fff !important;
	transform: translateY(-1px);
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25) !important;
}

@media (max-width: 560px) {
	.npc-ferie-modal { padding: 12px; align-items: flex-end; }
	.npc-ferie-modal__card {
		padding: 26px 20px 22px;
		max-height: calc(100vh - 24px);
		border-radius: var(--rck-r-lg, 14px);
	}
	.npc-ferie-modal__title { font-size: 19px; }
	.npc-ferie-modal__facts li { flex-direction: column; align-items: flex-start; gap: 2px; }
	.npc-ferie-modal__fact-v { text-align: left; }
}

/* Blocca lo scroll di fondo mentre il popup è aperto. */
body.npc-ferie-locked { overflow: hidden !important; }

/* ---------------------------------------------------------
   SPUNTA OBBLIGATORIA (sopra il pulsante "Ordina")
   --------------------------------------------------------- */
.npc-ferie-ack {
	margin: 0 0 16px;
	padding: 14px 16px;
	background: var(--npcf-bg, #FEF8EE);
	border: 1px solid var(--npcf-border, #F0B849);
	border-radius: var(--rck-r-sm, 8px);
}
.npc-ferie-ack__label {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin: 0;
	cursor: pointer;
	font-size: 12.5px;
	line-height: 1.55;
	color: var(--npcf-text, #5A4A30);
}
.npc-ferie-ack__input {
	flex-shrink: 0;
	width: 18px !important;
	height: 18px !important;
	margin: 1px 0 0 !important;
	accent-color: var(--rck-acc, #3FA62C);
	cursor: pointer;
}
.npc-ferie-ack__text { min-width: 0; }

/* Stato di errore: la spunta manca e il cliente ha premuto "Ordina". */
.npc-ferie-ack.npc-ferie-ack--error {
	border-color: #C0392B;
	background: #FDECEA;
	animation: npc-ferie-shake 0.3s;
}
.npc-ferie-ack.npc-ferie-ack--error .npc-ferie-ack__label { color: #8f2a1e; }
@keyframes npc-ferie-shake {
	0%, 100% { transform: translateX(0); }
	25%      { transform: translateX(-5px); }
	75%      { transform: translateX(5px); }
}
@media (prefers-reduced-motion: reduce) {
	.npc-ferie-ack.npc-ferie-ack--error { animation: none; }
}

/* ---------------------------------------------------------
   BADGE "DISPONIBILE DAL …" nel riepilogo del checkout
   Sostituisce il badge dei tempi di evasione durante la chiusura:
   niente "⚡ Subito" né "3–5 gg", solo la data certa di ripresa.
   --------------------------------------------------------- */
.rc-checkout__item-ship.rc-checkout__item-ship--ferie {
	background: var(--npcf-bg, #FEF8EE) !important;
	border-color: var(--npcf-border, #F0B849) !important;
	color: var(--npcf-title, #8A5A00) !important;
}
.rc-checkout__item-ship.rc-checkout__item-ship--ferie svg {
	color: var(--npcf-icon, #C98A15) !important;
	stroke: currentColor;
}
