/* =========================================================================
 * QuoVadis Core v2.2 — Componenti commerciali / premium
 * Caricato globalmente. Additivo: non ridefinisce i componenti base esistenti,
 * aggiunge solo i nuovi (tier badge, card attività, sezione attività, widget).
 * ========================================================================= */

/* --- Tier badge canonico ------------------------------------------------ */
.qv-tier-badge {
	display: inline-flex;
	align-items: center;
	gap: var(--qv-sp-1, 4px);
	padding: 3px 10px;
	border-radius: var(--qv-r-full, 9999px);
	font-size: var(--qv-fs-xs, 0.75rem);
	font-weight: var(--qv-fw-bold, 700);
	letter-spacing: var(--qv-tracking-wide, 0.06em);
	text-transform: uppercase;
	line-height: 1.4;
	white-space: nowrap;
	box-shadow: var(--qv-shadow-sm, 0 1px 2px rgba(0,0,0,0.06));
}
.qv-tier-badge--consigliata { background: var(--qv-terracotta-bg); color: var(--qv-terracotta-dark); border: 1px solid var(--qv-terracotta-border); }
.qv-tier-badge--friend      { background: var(--qv-green-50, #f0fdf4);  color: var(--qv-green-800, #166534);  border: 1px solid rgba(22,163,74,0.20); }
.qv-tier-badge--partner     { background: var(--qv-blue-50, #eff6ff);   color: var(--qv-blue-800, #003e83);   border: 1px solid rgba(0,103,215,0.20); }
.qv-tier-badge--ambassador  { background: var(--qv-tier-ambassador-bg); color: var(--qv-tier-ambassador);     border: 1px solid rgba(184,134,11,0.28); }

/* Posizionamento del badge in overlay sulla media della card */
.qv-card--attivita { position: relative; }
.qv-card--attivita .qv-tier-badge {
	position: absolute;
	top: var(--qv-sp-3, 12px);
	right: var(--qv-sp-3, 12px);
	z-index: 3;
}
.qv-card--attivita .qv-card__media { position: relative; }

/* Trattamento card per tier (bordo/glow discreto) */
.qv-card[data-qv-tier="ambassador"] { border-color: rgba(184,134,11,0.40); }
.qv-card[data-qv-tier="partner"]    { border-color: rgba(0,103,215,0.28); }
.qv-card[data-qv-tier="ambassador"]:hover { box-shadow: 0 16px 40px rgba(184,134,11,0.18); }

/* Pill sconto socio */
.qv-card__pill--sconto {
	background: var(--qv-green-50, #f0fdf4);
	color: var(--qv-green-900, #14532d);
	font-weight: var(--qv-fw-semibold, 600);
}

/* --- Sezione "attività per i picks" / in evidenza ----------------------- */
.qv-afp__head { margin-bottom: var(--qv-sp-5, 24px); }
.qv-afp__title { margin: 0 0 var(--qv-sp-1, 4px); }
.qv-afp__sub { color: var(--qv-fg-muted, #525252); margin: 0; }
.qv-grid--single { max-width: 380px; }

/* --- Widget picks (contatore) ------------------------------------------- */
.qv-picks-widget {
	display: inline-flex;
	align-items: center;
	gap: var(--qv-sp-2, 8px);
	padding: var(--qv-sp-2, 8px) var(--qv-sp-4, 16px);
	border: 1px solid var(--qv-border, #e5e5e5);
	border-radius: var(--qv-r-full, 9999px);
	color: var(--qv-fg, #171717);
	text-decoration: none;
	font-weight: var(--qv-fw-semibold, 600);
	transition: background var(--qv-tr-fast, 120ms ease), border-color var(--qv-tr-fast, 120ms ease);
}
.qv-picks-widget:hover { background: var(--qv-neutral-100, #f5f5f5); border-color: var(--qv-border-strong, #d4d4d4); text-decoration: none; }
.qv-picks-widget[data-has-picks="true"] { border-color: var(--qv-green-600, #16a34a); color: var(--qv-green-700, #15803d); }

/* --- Badge contatore numerico ------------------------------------------- */
.qv-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 20px;
	height: 20px;
	padding: 0 6px;
	border-radius: var(--qv-r-full, 9999px);
	background: var(--qv-green-600, #16a34a);
	color: #fff;
	font-size: 12px;
	font-weight: var(--qv-fw-bold, 700);
	font-variant-numeric: tabular-nums;
	line-height: 1;
}
.qv-badge[data-count="0"] { opacity: 0.45; }

/* --- Toggle attività su Esplora ----------------------------------------- */
.qv-results__att-toggle {
	display: inline-flex;
	align-items: center;
	gap: var(--qv-sp-2, 8px);
	font-size: var(--qv-fs-sm, 0.875rem);
	color: var(--qv-fg-muted, #525252);
	cursor: pointer;
	user-select: none;
	margin-right: auto;
}
.qv-results__att-toggle input { accent-color: var(--qv-green-600, #16a34a); width: 16px; height: 16px; }

/* --- Marker mappa brandizzati (Leaflet divIcon) ------------------------- */
.qv-marker {
	width: 30px; height: 38px;
	background: var(--qv-green-600, #16a34a);
	border-radius: 50% 50% 50% 0;
	transform: rotate(-45deg);
	border: 3px solid #fff;
	box-shadow: var(--qv-shadow-md, 0 6px 16px rgba(0,0,0,0.10));
}
.qv-marker--attivita { background: var(--qv-blue-600, #0067D7); }
.qv-marker--ambassador { background: var(--qv-tier-ambassador); }

/* --- Blocco editoriale "consiglio del local" --------------------------- */
.qv-editorial-block {
	padding: var(--qv-sp-5, 24px);
	background: var(--qv-terracotta-bg);
	border-left: 4px solid var(--qv-terracotta);
	border-radius: var(--qv-r-md, 8px);
}
.qv-editorial-block__eyebrow {
	font-size: var(--qv-fs-xs, 0.75rem);
	font-weight: var(--qv-fw-bold, 700);
	text-transform: uppercase;
	letter-spacing: var(--qv-tracking-wide, 0.06em);
	color: var(--qv-terracotta-dark);
	margin: 0 0 var(--qv-sp-2, 8px);
}

/* --- Sezione attività in home ------------------------------------------- */
.qv-section--attivita { background: var(--qv-bg-alt, #fafafa); }

/* --- Header: azioni + picks counter ------------------------------------- */
.qv-header__actions { display: inline-flex; align-items: center; gap: var(--qv-sp-3, 12px); }
.qv-header__picks {
	display: inline-flex; align-items: center; gap: var(--qv-sp-2, 8px);
	padding: 7px 12px;
	border: 1px solid var(--qv-border, #e5e5e5);
	border-radius: var(--qv-r-full, 9999px);
	color: var(--qv-fg, #171717); text-decoration: none;
	font-size: var(--qv-fs-sm, 0.875rem); font-weight: var(--qv-fw-semibold, 600);
	transition: background 120ms ease, border-color 120ms ease;
}
.qv-header__picks:hover { background: var(--qv-neutral-100, #f5f5f5); border-color: var(--qv-border-strong, #d4d4d4); text-decoration: none; }
.qv-header__picks[data-has-picks="true"] { border-color: var(--qv-green-600, #16a34a); color: var(--qv-green-700, #15803d); }
@media (max-width: 640px) {
	.qv-header__picks-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
}

/* --- Mappa: pulsante "cerca in quest'area" + card evidenziata da marker --- */
.qv-results__map-wrap { position: relative; }
.qv-map__search-here {
	position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
	z-index: 500;
	background: #fff; color: var(--qv-fg, #171717);
	border: 1px solid var(--qv-border-strong, #d4d4d4);
	border-radius: var(--qv-r-full, 9999px);
	padding: 8px 16px; font-size: var(--qv-fs-sm, 0.875rem); font-weight: var(--qv-fw-semibold, 600);
	box-shadow: var(--qv-shadow-md, 0 6px 16px rgba(0,0,0,0.10)); cursor: pointer;
}
.qv-map__search-here:hover { background: var(--qv-neutral-50, #fafafa); }
.qv-card.is-highlighted {
	box-shadow: 0 0 0 3px var(--qv-green-400, #4ade80), var(--qv-shadow-lg, 0 12px 28px rgba(0,0,0,0.14));
	transition: box-shadow 200ms ease;
}
.qv-marker--active { filter: brightness(0.9); transform: rotate(-45deg) scale(1.2); }
