/* Fenix Privacy & Consent — stile banner (coerente col sito: salvia, Cormorant/Manrope). */
#fenix-pc-root {
	--fpc-color: #798d7b;
	--fpc-ink: #2b2b2b;
	--fpc-bg: rgba(255, 255, 255, 0.72);
	--fpc-radius: 16px;
}
#fenix-pc-root * { box-sizing: border-box; }

/* --- card di primo livello --- */
.fpc-card {
	position: fixed;
	left: 20px;
	bottom: 20px;
	z-index: 99990;
	width: 380px;
	max-width: calc(100vw - 40px);
	background: var(--fpc-bg);
	color: var(--fpc-ink);
	border: 1px solid rgba(255, 255, 255, 0.45);
	border-radius: var(--fpc-radius);
	box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.55);
	padding: 20px 22px;
	font-family: "Manrope", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
	font-size: 14px;
	line-height: 1.5;
	-webkit-backdrop-filter: blur(20px) saturate(150%);
	backdrop-filter: blur(20px) saturate(150%);
	animation: fpc-in 0.28s ease both;
}
@keyframes fpc-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.fpc-card h2 {
	font-family: "Cormorant Garamond", Georgia, serif;
	font-size: 22px;
	line-height: 1.15;
	margin: 0 0 8px;
	color: var(--fpc-ink);
	font-weight: 600;
}
.fpc-card p { margin: 0 0 12px; color: #3d3d3d; }

.fpc-links { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.fpc-links a { color: var(--fpc-color); text-decoration: underline; font-size: 13px; }
.fpc-links a:hover { text-decoration: none; }

.fpc-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.fpc-actions--modal { margin-top: 18px; }

/* --- bottoni: Accetta e Rifiuta hanno PARI evidenza (stessa dimensione e peso) --- */
.fpc-btn {
	flex: 1 1 auto;
	min-width: 120px;
	padding: 11px 16px;
	border-radius: 999px;
	border: 2px solid transparent;
	font: inherit;
	font-weight: 600;
	font-size: 14px;
	cursor: pointer;
	text-align: center;
	transition: filter 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.fpc-btn--primary { background: var(--fpc-color); border-color: var(--fpc-color); color: #fff; }
.fpc-btn--primary:hover { filter: brightness(1.07); }
.fpc-btn--reject { background: #2b2b2b; border-color: #2b2b2b; color: #fff; }
.fpc-btn--reject:hover { background: #444; border-color: #444; }
/* Accetta/Rifiuta nella modale: stesso peso visivo (outline), per la parità richiesta dal Garante. */
.fpc-btn--outline { background: transparent; border-color: var(--fpc-color); color: var(--fpc-ink); }
.fpc-btn--outline:hover { background: rgba(121, 141, 123, 0.12); }
.fpc-btn--ghost { flex: 0 1 auto; background: transparent; border-color: transparent; color: var(--fpc-color); text-decoration: underline; min-width: 0; }
.fpc-btn--ghost:hover { text-decoration: none; }
.fpc-btn:focus-visible, .fpc-x:focus-visible, .fpc-float:focus-visible { outline: 3px solid var(--fpc-color); outline-offset: 2px; }

.fpc-x {
	position: absolute; top: 10px; right: 12px;
	width: 30px; height: 30px;
	border: none; background: transparent;
	font-size: 22px; line-height: 1; color: #888; cursor: pointer; border-radius: 50%;
}
.fpc-x:hover { background: rgba(0, 0, 0, 0.06); color: #2b2b2b; }

/* --- modale preferenze --- */
.fpc-overlay {
	position: fixed; inset: 0; z-index: 99995;
	background: rgba(20, 22, 20, 0.55);
	display: flex; align-items: center; justify-content: center;
	padding: 20px; animation: fpc-fade 0.2s ease both;
}
@keyframes fpc-fade { from { opacity: 0; } to { opacity: 1; } }
.fpc-modal {
	width: 520px; max-width: 100%; max-height: 86vh; overflow: auto;
	background: #fff; color: var(--fpc-ink); border-radius: var(--fpc-radius);
	padding: 26px 28px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
	font-family: "Manrope", system-ui, sans-serif; font-size: 14px; line-height: 1.5;
}
.fpc-modal h2 { font-family: "Cormorant Garamond", Georgia, serif; font-size: 26px; margin: 0 0 14px; font-weight: 600; }

.fpc-row { display: flex; align-items: flex-start; gap: 16px; padding: 14px 0; border-top: 1px solid #ececec; }
.fpc-row:first-of-type { border-top: none; }
.fpc-row-txt strong { display: block; font-size: 15px; margin-bottom: 2px; }
.fpc-row-txt span { color: #555; font-size: 13px; }

/* switch */
.fpc-switch { position: relative; flex: 0 0 auto; width: 46px; height: 26px; }
.fpc-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.fpc-slider { position: absolute; inset: 0; background: #ccc; border-radius: 999px; transition: 0.2s; }
.fpc-slider::before { content: ""; position: absolute; height: 20px; width: 20px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: 0.2s; }
.fpc-switch input:checked + .fpc-slider { background: var(--fpc-color); }
.fpc-switch input:checked + .fpc-slider::before { transform: translateX(20px); }
.fpc-switch input:disabled + .fpc-slider { opacity: 0.6; }

/* --- pulsante flottante (revoca) --- */
.fpc-float {
	position: fixed; left: 18px; bottom: 18px; z-index: 99980;
	display: inline-flex; align-items: center; gap: 8px;
	padding: 9px 14px; border-radius: 999px;
	background: var(--fpc-bg); color: var(--fpc-ink);
	border: 1px solid rgba(255, 255, 255, 0.45); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.5);
	-webkit-backdrop-filter: blur(14px) saturate(150%); backdrop-filter: blur(14px) saturate(150%);
	font-family: "Manrope", system-ui, sans-serif; font-size: 13px; font-weight: 600; cursor: pointer;
}
.fpc-float:hover { border-color: var(--fpc-color); }
.fpc-float[hidden] { display: none; }
.fpc-float-ico { font-size: 15px; line-height: 1; }

@media (max-width: 520px) {
	.fpc-card { left: 12px; right: 12px; bottom: 12px; width: auto; }
	.fpc-btn { flex: 1 1 100%; }
	.fpc-float-txt { display: none; }
	.fpc-float { padding: 11px; }
}
@media (prefers-reduced-motion: reduce) {
	.fpc-card, .fpc-overlay { animation: none; }
}

/* ---------- Pagine Privacy / Cookie Policy (autonome) ---------- */
/* Reset del chrome Divi: niente header/footer/sidebar/titolo Divi duplicato; contenuto full-width. */
body.fenix-policy-page #main-header,
body.fenix-policy-page #top-header,
body.fenix-policy-page #main-footer,
body.fenix-policy-page #sidebar,
body.fenix-policy-page .et_pb_widget_area,
body.fenix-policy-page .main_title,
body.fenix-policy-page #et-secondary-nav { display: none !important; }
body.fenix-policy-page #page-container { padding-top: 0 !important; }
body.fenix-policy-page #main-content,
body.fenix-policy-page #content-area,
body.fenix-policy-page .container,
body.fenix-policy-page #left-area,
body.fenix-policy-page .entry-content,
body.fenix-policy-page article.page,
body.fenix-policy-page .et_pb_post {
	width: 100% !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
	float: none !important;
}

.fenix-policy-shell {
	background: #fff;
	color: #2f2f2f;
	font-family: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.fenix-policy-shell *, .fenix-policy * { box-sizing: border-box; }

.fenix-policy-header { border-bottom: 1px solid #eee; }
.fenix-policy-bar {
	max-width: 820px; margin: 0 auto;
	padding: 22px clamp(18px, 5vw, 24px);
	display: flex; align-items: center; justify-content: space-between;
}
.fenix-policy-logo { display: inline-flex; align-items: center; line-height: 1; }
.fenix-policy-logo img { height: 44px; width: auto; max-width: 200px; display: block; }
.fenix-policy-back { font-size: 14px; color: #6c8470; text-decoration: none; }
.fenix-policy-back:hover { text-decoration: underline; }

.fenix-policy {
	width: 100%;
	max-width: 820px;
	margin: 0 auto;
	padding: clamp(36px, 5vw, 60px) clamp(18px, 5vw, 24px) 70px;
	font-size: 16px;
	line-height: 1.75;
}
.fenix-policy-title { font-family: "Cormorant Garamond", Georgia, serif; font-size: clamp(34px, 5vw, 52px); font-weight: 600; line-height: 1.1; margin: 0 0 0.7em; color: #2b2b2b; }
.fenix-policy h2 { font-family: "Cormorant Garamond", Georgia, serif; font-size: 28px; font-weight: 600; margin: 2em 0 0.5em; color: #2b2b2b; }
.fenix-policy h3 { font-size: 18px; font-weight: 600; margin: 1.6em 0 0.4em; color: #333; }
.fenix-policy p { margin: 0 0 1em; }
.fenix-policy ul { margin: 0 0 1.2em; padding-left: 1.3em; }
.fenix-policy li { margin-bottom: 0.4em; }
.fenix-policy a { color: #6c8470; text-decoration: underline; }
.fenix-policy a:hover { text-decoration: none; }
.fenix-policy strong { color: #2b2b2b; }
.fenix-policy table { width: 100%; border-collapse: collapse; margin: 1em 0 1.6em; font-size: 14px; }
.fenix-policy th, .fenix-policy td { border: 1px solid #e4e4e4; padding: 10px 12px; text-align: left; vertical-align: top; }
.fenix-policy th { background: #f3f6f3; font-weight: 600; }
.fenix-policy code { background: #f1f1f1; padding: 1px 6px; border-radius: 4px; font-size: 0.9em; }

.fenix-policy-footer {
	border-top: 1px solid #eee;
	padding: 26px clamp(18px, 5vw, 48px);
	display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; justify-content: space-between;
	font-size: 13px; color: #888;
}
.fenix-policy-footer .fpf-nav a { color: #6c8470; text-decoration: none; margin-left: 20px; }
.fenix-policy-footer .fpf-nav a:first-child { margin-left: 0; }
.fenix-policy-footer .fpf-nav a:hover { text-decoration: underline; }

@media (max-width: 640px) {
	.fenix-policy-footer { flex-direction: column; align-items: flex-start; }
	.fenix-policy-footer .fpf-nav a { margin: 0 16px 0 0; }
	.fenix-policy table, .fenix-policy thead, .fenix-policy tbody, .fenix-policy tr, .fenix-policy th, .fenix-policy td { display: block; }
	.fenix-policy thead { display: none; }
	.fenix-policy td { border: none; border-bottom: 1px solid #ececec; padding: 6px 0; }
	.fenix-policy tr { border: 1px solid #e4e4e4; border-radius: 8px; padding: 8px 12px; margin-bottom: 10px; }
}

/* Link legali nel footer del sito (Privacy · Cookie · Preferenze cookie) */
.footer-legal-link { color: inherit; text-decoration: none; transition: color 0.2s ease; }
.footer-legal-link:hover { color: rgba(255, 255, 255, 0.65); text-decoration: underline; text-underline-offset: 2px; }
