/* Vivi Perugia Card Ristoranti: tutte le card della griglia hanno la stessa altezza. */
.vpc-card {
  --vpc-brand: var(--listeo-primary-color, #e72168);
  --vpc-ink: #222;
  --vpc-muted: #8a8a8a;
  --vpc-line: #e6e6e6;
  --vpc-open-bg: #eaf3de;
  --vpc-open-fg: #27500a;
  --vpc-open-bd: #3b6d11;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  gap: 8px;
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.35;
  color: var(--vpc-ink);
  text-align: left;
}
.vpc-ico { flex: 0 0 auto; width: 15px; height: 15px; }

/* --- Altezze uguali: griglia a righe identiche e contenuti a ingombro fisso --- */
.new-grid-layout-nl:has(.vpc-card) { grid-auto-rows: 1fr; align-items: stretch; }
.listing-card-container-nl:has(.vpc-card) { height: 100%; }
.listing-card-nl:has(.vpc-card) { height: 100%; display: flex; flex-direction: column; }
.listing-card-nl:has(.vpc-card) .listing-details-nl { flex: 1 1 auto; display: flex; flex-direction: column; }
.listing-card-nl:has(.vpc-card) .details-main-col-nl { flex: 1 1 auto; display: flex; flex-direction: column; min-width: 0; }
.listing-card-nl:has(.vpc-card) .listing-title-nl,
.listing-card-nl:has(.vpc-card) .listing-location-nl {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.listing-card-nl:has(.vpc-card) .listing-title-nl { display: block; }
.listing-card-nl:has(.vpc-card) .listing-location-nl { margin-bottom: 0; }
/* Servizi (icone) presenti solo su alcune schede: li nascondo nella card per non variare l'altezza. */
.listing-card-nl:has(.vpc-card) .listing-amenities-nl,
.listing-card-nl:has(.vpc-card) .listing-excerpt-nl { display: none; }
/* Badge "In evidenza" / "Sponsorizzato": spostati sulla foto (in basso a destra) invece di occupare una riga. */
@supports (container-type: inline-size) {
  .listing-card-nl:has(.vpc-card) { position: relative; container-type: inline-size; }
  .listing-card-nl:has(.vpc-card) .listing-badges-nl {
    position: absolute; z-index: 3; right: 12px; top: calc(100cqw - 40px);
    margin: 0; display: flex; gap: 6px;
  }
}
/* Voto e distanza ora stanno nel blocco nuovo: nascondo i duplicati di Listeo. */
.listing-card-nl:has(.vpc-card) .details-sidebar-col-nl,
.listing-card-nl:has(.vpc-card) .distance-nl { display: none; }

/* --- Righe --- */
.vpc-row { display: flex; align-items: center; gap: 6px; min-width: 0; white-space: nowrap; }
.vpc-row > span:last-child { overflow: hidden; text-overflow: ellipsis; }
.vpc-top { gap: 8px; }
.vpc-rating {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--vpc-open-bg); color: var(--vpc-open-fg);
  font-weight: 700; padding: 2px 8px; border-radius: 6px;
}
.vpc-count { color: var(--vpc-muted); }
.vpc-muted { color: var(--vpc-muted); }
.vpc-dist {
  margin-left: auto; display: inline-flex; align-items: center; gap: 4px;
  color: var(--vpc-brand); cursor: pointer; border-radius: 4px;
}
.vpc-dist.is-known { color: var(--vpc-ink); cursor: default; }
.vpc-dist.is-hidden { visibility: hidden; }
.vpc-price { color: #555; }
.vpc-price.is-empty { color: var(--vpc-muted); }

/* Recensione: sempre due righe di testo + firma, anche se assente */
.vpc-quote { margin: 0; padding: 0 0 0 10px; border-left: 2px solid var(--vpc-brand); }
.vpc-quote blockquote {
  margin: 0; padding: 0; border: 0; background: none;
  font-size: 14px; line-height: 1.4; font-style: italic; color: var(--vpc-ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 2.8em;
}
.vpc-quote blockquote::before, .vpc-quote blockquote::after { content: none; display: none; }
.vpc-quote figcaption {
  font-size: 12px; color: var(--vpc-muted); margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.vpc-quote.is-empty { border-left-color: var(--vpc-line); }
.vpc-quote.is-empty blockquote { color: var(--vpc-muted); font-style: normal; }

/* Giorni */
.vpc-days { display: flex; gap: 4px; }
.vpc-day {
  flex: 1 1 0; text-align: center; font-size: 12px; line-height: 1; padding: 5px 0;
  border-radius: 6px; color: var(--vpc-muted); border: 1px dashed #cfcfcf;
}
.vpc-day.is-open { background: var(--vpc-open-bg); color: var(--vpc-open-fg); border: 1px solid var(--vpc-open-bg); }
.vpc-day.is-today { border: 1.5px solid var(--vpc-open-bd); font-weight: 700; }
.vpc-day.is-today:not(.is-open) { border-color: #9a9a9a; }

/* Promozione */
.vpc-promo {
  display: flex; align-items: center; gap: 6px; align-self: flex-start; max-width: 100%;
  font-size: 13px; padding: 3px 10px; border-radius: 999px;
  color: var(--vpc-muted); border: 1px dashed #cfcfcf; white-space: nowrap;
}
.vpc-promo span { overflow: hidden; text-overflow: ellipsis; }
.vpc-promo.is-active { background: var(--vpc-open-bg); color: var(--vpc-open-fg); border: 1px solid var(--vpc-open-bg); font-weight: 600; }

/* Pulsanti, sempre in fondo alla card */
.vpc-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: auto; padding-top: 4px; }
.vpc-actions.has-wa { grid-template-columns: 1fr 1fr 42px; }
.vpc-actions.no-phone { grid-template-columns: 1fr; }
.vpc-actions.no-phone.has-wa { grid-template-columns: 1fr 42px; }
.vpc-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 40px; padding: 0 10px; border-radius: 8px; cursor: pointer;
  font-size: 14px; font-weight: 600; white-space: nowrap;
  border: 1px solid #d6d6d6; background: #fff; color: var(--vpc-ink);
  transition: background-color .15s, border-color .15s;
}
.vpc-btn:hover { border-color: #aaa; background: #fafafa; }
.vpc-btn--primary { background: var(--vpc-brand); border-color: var(--vpc-brand); color: #fff; }
.vpc-btn--primary:hover { background: var(--vpc-brand); filter: brightness(.93); border-color: var(--vpc-brand); }
.vpc-btn--icon { padding: 0; color: #2e7d32; }
.vpc-btn--icon .vpc-ico { width: 19px; height: 19px; }
.vpc-btn:focus-visible, .vpc-dist:focus-visible { outline: 2px solid var(--vpc-brand); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) { .vpc-btn { transition: none; } }
