/* ===================================================
   🎛️ PREFERENZE — Rubriche & Interessi (checkbox grid)
   =================================================== */

/* Contenitori: rubriche + interessi */
#vs-rubriche,
#vs-pref-shop-terms,
#vs-pref-product-terms,
#vs-pref-brand-terms{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
  margin-top: 10px;
}

/* Mobile */
@media (max-width: 720px){
  #vs-rubriche,
  #vs-pref-shop-terms,
  #vs-pref-product-terms,
  #vs-pref-brand-terms{
    grid-template-columns: 1fr;
  }
}

/* Singola riga checkbox */
.vs-term-row{
  display:flex;
  align-items:center;
  gap:10px;

  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background:#fff;

  font-weight:800;
  color:#0f172a;
  cursor:pointer;
}

.vs-term-row:hover{
  background:#f8fafc;
  border-color:#cbd5e1;
}

.vs-term-row input{
  width:16px;
  height:16px;
  cursor:pointer;
}

/* stato attivo */
.vs-term-row input:checked + span{
  color:#0ea5e9;
}

/* helper testo */
.vs-muted{
  color:#64748b;
  font-weight:700;
  padding:6px 0;
}
/* ==========================================================
   ✅ Accordion Interessi (mobile) — aperto su desktop via JS
   ========================================================== */

.vs-acc-wrap{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-top: 8px;
}

.vs-acc{
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background:#fff;
  overflow:hidden;
}

.vs-acc__sum{
  list-style:none;
  cursor:pointer;
  user-select:none;
  padding: 12px 14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  font-weight: 900;
  color:#0f172a;
  background:#f8fafc;
  border-bottom: 1px solid #eef2f7;
}

.vs-acc__sum::-webkit-details-marker{ display:none; }

.vs-acc__chev{
  transition: transform .12s ease;
  opacity:.8;
}

.vs-acc[open] .vs-acc__chev{
  transform: rotate(180deg);
}

.vs-acc__body{
  padding: 12px 14px;
}

/* Desktop: summary “più sobrio”, ma resta cliccabile */
@media (min-width: 721px){
  .vs-acc__sum{
    background:#fff;
    border-bottom: 1px solid #eef2f7;
  }
}
/* ==========================================================================
   ✅ PREFERENZE.CSS — Vetrineshop
   Scopo: Tabs + Panel + Toggle + Rubriche + Interessi (accordion) + checkbox grid
   Data: 2026-01-13
   ========================================================================== */

:root{
  --vs-border:#e5e7eb;
  --vs-ink:#0f172a;
  --vs-muted:#64748b;
  --vs-soft:#f8fafc;
  --vs-accent:#0ea5e9;
  --vs-accent-soft:#e0f2fe;
  --vs-radius:16px;
}

/* Headings (niente inline) */
.vs-pref-h2{
  margin:0 0 10px 0;
  font-size: 1.1rem;
  font-weight: 950;
  color: var(--vs-ink);
}
.vs-pref-sub{
  margin:0 0 12px 0;
  color: var(--vs-muted);
  font-weight: 650;
}

/* Tabs */
.vs-pref-tabs{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin: 10px 0 18px;
}

.vs-pref-tab{
  display:inline-flex;
  align-items:center;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--vs-border);
  text-decoration:none;
  font-weight: 900;
  color:#334155;
  background:#fff;
  transition: background .12s ease, border-color .12s ease, transform .12s ease;
}

.vs-pref-tab:hover{
  background: var(--vs-soft);
  border-color:#cbd5e1;
  transform: translateY(-1px);
}

.vs-pref-tab.is-active{
  background: var(--vs-accent-soft);
  color: var(--vs-accent);
  border-color:#bae6fd;
}

/* Panel */
.vs-pref-panel{
  border: 1px solid var(--vs-border);
  border-radius: var(--vs-radius);
  background:#fff;
  padding: 18px;
}

/* Pane (gestione visibilità via JS) */
.vs-pref-pane{ display:none; }
.vs-pref-pane.is-active{ display:block; }

/* “Cosa vuoi vedere” grid */
.vs-pref-grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 14px;
  margin-top: 10px;
}

@media(max-width: 720px){
  .vs-pref-grid{ grid-template-columns: 1fr; }
}

/* Switch card */
.vs-switch{
  display:flex;
  align-items:center;
  gap:10px;
  border:1px solid #eef2f7;
  background: var(--vs-soft);
  padding: 12px 14px;
  border-radius: 14px;
  font-weight: 400;
  color: var(--vs-ink);
  cursor:pointer;
  user-select:none;
}

.vs-switch input{
  width:18px;
  height:18px;
  flex:0 0 auto;
}

.vs-switch input:checked + span{
  color: var(--vs-accent);
}

/* Rubriche / termini: griglia 2 col */
#vs-rubriche,
#vs-pref-shop-terms,
#vs-pref-product-terms,
#vs-pref-brand-terms{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
  margin-top: 10px;
}
@media(max-width: 720px){
  #vs-rubriche,
  #vs-pref-shop-terms,
  #vs-pref-product-terms,
  #vs-pref-brand-terms{
    grid-template-columns: 1fr;
  }
}

/* Checkbox row “card” (dal JS) */
.vs-term-row{
  display:flex;
  align-items:center;
  gap:10px;
  padding: 12px 14px;
  border: 1px solid var(--vs-border);
  border-radius: 14px;
  background:#fff;
  font-weight: 400;
  color: var(--vs-ink);
  cursor:pointer;
  user-select:none;
  transition: background .12s ease, border-color .12s ease, transform .08s ease;
}
.vs-term-row:hover{
  background: var(--vs-soft);
  border-color:#cbd5e1;
  transform: translateY(-1px);
}
.vs-term-row input{
  width:18px;
  height:18px;
  flex:0 0 auto;
  accent-color: #1f1714;
}
.vs-term-row input:checked + span{
  color: var(--vs-ink);
}

/* Actions */
.vs-pref-actions{
  margin-top: 16px;
  display:flex;
  justify-content:flex-end;
}
.vs-btn{
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--vs-border);
  background:#fff;
  font-weight: 950;
  cursor:pointer;
}
.vs-btn:hover{ background: var(--vs-soft); }

/* Accordion Interessi */
.vs-acc-wrap{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-top: 10px;
}

.vs-acc{
  border: 1px solid var(--vs-border);
  border-radius: 14px;
  background:#fff;
  overflow:hidden;
}

.vs-acc__sum{
  list-style:none;
  cursor:pointer;
  user-select:none;
  padding: 12px 14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  font-weight: 800;
  color: var(--vs-ink);
  background: var(--vs-soft);
  border-bottom: 1px solid #eef2f7;
}
.vs-acc__sum::-webkit-details-marker{ display:none; }

.vs-acc__chev{
  transition: transform .12s ease;
  opacity:.8;
}
.vs-acc[open] .vs-acc__chev{ transform: rotate(180deg); }

.vs-acc__body{
  padding: 12px 14px;
}
/* Dashboard mix */
.vs-dashboard-mix{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 14px;
}

.vs-mix-card{
  display:block;
  cursor:pointer;
  margin:0;
}

.vs-mix-card input{
  position:absolute;
  opacity:0;
  pointer-events:none;
}

.vs-mix-card__body{
  display:flex;
  flex-direction:column;
  gap:16px;
  min-height: 208px;
  padding: 24px 22px 22px;
  border:1px solid var(--vs-border);
  border-radius: 24px;
  background:#fff;
  transition:
    border-color .18s ease,
    box-shadow .18s ease,
    transform .18s ease,
    background .18s ease;
}

.vs-mix-card__dash{
  display:block;
  width: 54px;
  height: 4px;
  border-radius: 999px;
  background:#c9c3be;
}

.vs-mix-card__title-row{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}

.vs-mix-card__body strong{
  display:block;
  font-size: 1.05rem;
  line-height: 1.2;
  font-weight: 800;
  color: var(--vs-ink);
}

.vs-mix-card__badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--vs-soft);
  color: #6e625b;
  font-size: .78rem;
  font-weight: 700;
  white-space: nowrap;
}

.vs-mix-card__body small{
  display:block;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--vs-muted);
}

.vs-mix-card:hover .vs-mix-card__body{
  transform: translateY(-2px);
  border-color:#dcccc0;
  box-shadow:0 14px 28px rgba(0,0,0,.05);
}

.vs-mix-card.is-active .vs-mix-card__body,
.vs-mix-card input:checked + .vs-mix-card__body{
  border-color: var(--vs-ink);
  background:#fffdfa;
  box-shadow:0 18px 34px rgba(31,23,20,.08);
}

.vs-mix-card.is-active .vs-mix-card__dash,
.vs-mix-card input:checked + .vs-mix-card__body .vs-mix-card__dash{
  background: var(--vs-ink);
}

.vs-mix-card.is-active .vs-mix-card__badge,
.vs-mix-card input:checked + .vs-mix-card__body .vs-mix-card__badge{
  background: var(--vs-ink);
  color:#fff;
}

@media (max-width: 900px){
  .vs-dashboard-mix{
    grid-template-columns: 1fr;
  }

  .vs-mix-card__body{
    min-height: auto;
  }
}
.vs-switch input{
  accent-color: #1f1714;
}

.vs-switch input:checked + span{
  color: var(--vs-ink);
}
/* Colori soft ma visibili per le modalità dashboard */

.vs-mix-card input[value="balanced"] + .vs-mix-card__body .vs-mix-card__dash{
  background: rgba(110,150,210,.65);
}

.vs-mix-card input[value="shops_first"] + .vs-mix-card__body .vs-mix-card__dash{
  background: rgba(120,185,150,.65);
}

.vs-mix-card input[value="products_first"] + .vs-mix-card__body .vs-mix-card__dash{
  background: rgba(205,155,125,.65);
}

.vs-mix-card input[value="magazine_first"] + .vs-mix-card__body .vs-mix-card__dash{
  background: rgba(170,145,215,.65);
}

.vs-pref-choice-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:14px;
}

.vs-pref-choice-card{
  position:relative;
  display:flex;
  align-items:center;
  gap:10px;
  min-height:56px;
  padding:14px 16px;
  border:1px solid #e5ddd6;
  border-radius:18px;
  background:#fff;
  cursor:pointer;
  transition:.18s ease;
}

.vs-pref-choice-card:hover{
  border-color:#cfc2b8;
  background:#fffaf7;
}

.vs-pref-choice-card.is-active{
  border-color:#1f1714;
  background:#f8f4f0;
  box-shadow:0 0 0 1px #1f1714 inset;
}

.vs-pref-choice-card input{
  accent-color:#1f1714;
  flex:0 0 auto;
}

.vs-pref-choice-card span{
  font-weight:600;
  color:#1f1714;
}

@media (max-width:680px){
  .vs-pref-choice-grid{
    grid-template-columns:1fr;
  }
}