/* =========================================================
   CVIP — Simracing Base Comparator (BASI DD)
   ========================================================= */

/* ---------- GRID: 3/2/1 colonne ---------- */
.cvipcmp-list{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:18px;
}
@media (max-width:1024px){ .cvipcmp-list{ grid-template-columns:repeat(2,1fr); } }
@media (max-width:640px){  .cvipcmp-list{ grid-template-columns:1fr; } }

.cvipcmp-wrapper{
  position:relative;
}

.cvipcmp-toolbar{
  display:flex;
  justify-content:flex-end;
  margin-bottom:18px;
}

.cvipcmp-platform-filter{
  display:flex;
  align-items:center;
  gap:8px;
}

.cvipcmp-empty{ padding:16px; text-align:center; }

/* ---------- CARD ---------- */
.cvipcmp-card{
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  min-height:340px;
  background:#fff;
  border:1px solid #e5e7eb;
  border-radius:14px;
  padding:12px;
  transition:transform .15s, box-shadow .15s;
}
.cvipcmp-card:hover{
  transform:translateY(-2px);
  box-shadow:0 8px 18px rgba(0,0,0,.08);
}

.cvipcmp-imgwrap{
  position:relative;
  overflow:hidden;
  border-radius:10px;
  flex-grow:1;
  background:#ffffff !important;
  display:flex;
  align-items:center;
  justify-content:center;
}
.cvipcmp-imgwrap img{
  width:100%;
  height:200px;
  object-fit:contain;
  border-radius:10px;
}

/* pulsante + / − */
.cvipcmp-select{
  position:absolute;
  right:10px; bottom:10px;
  width:48px; height:48px;
  border-radius:5px;
  border:none;
  display:flex; align-items:center; justify-content:center;
  font-weight:800; font-size:26px; line-height:1; color:#fff;
  background:rgba(17,17,17,.9);
  box-shadow:0 6px 14px rgba(0,0,0,.25);
  cursor:pointer;
  transition:transform .15s;
  z-index:10;
}
.cvipcmp-select:hover{ transform:scale(1.05); }
.cvipcmp-card.is-selected .cvipcmp-select{ background:#dc2626; }

.cvipcmp-title{
  font-weight:800;
  margin-top:10px;
  text-align:center;
  color:#111;
}

/* piccolo feedback limite selezioni */
.cvipcmp-bounce{ animation:cvip-bounce .25s ease; }
@keyframes cvip-bounce{
  0%{transform:scale(1)}
  50%{transform:scale(.98)}
  100%{transform:scale(1)}
}

/* =========================================================
   FAB (Confronta / Annulla)
   ========================================================= */
.cvipcmp-fab{
  position:fixed !important;
  left:50% !important;
  bottom:30px !important;
  transform:translateX(-50%) !important;
  display:none !important;
  gap:16px !important;
  z-index:2147483646 !important;
  pointer-events:auto !important;
}
.cvipcmp-fab.visible{
  display:flex !important;
  justify-content:center !important;
}

/* base bottoni */
.cvipcmp-fab button,
.cvipcmp-fab .cvipcmp-fab-compare,
.cvipcmp-fab .cvipcmp-fab-cancel{
  all:unset !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  min-width:130px !important;
  height:46px !important;
  padding:0 20px !important;
  border-radius:12px !important;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif !important;
  font-weight:800 !important;
  font-size:15px !important;
  line-height:1 !important;
  color:#fff !important;
  border:none !important;
  box-shadow:0 8px 24px rgba(0,0,0,.15) !important;
  cursor:pointer !important;
  transform:translateZ(0) !important;
  transition:transform .12s ease !important;
}

/* Confronta */
.cvipcmp-fab .cvipcmp-fab-compare{
  background:#22c55e !important;
}
.cvipcmp-fab .cvipcmp-fab-compare:hover{ transform:scale(1.05) !important; }
.cvipcmp-fab .cvipcmp-fab-compare:active{ transform:scale(0.96) !important; }
.cvipcmp-fab .cvipcmp-fab-compare[disabled]{
  opacity:.55 !important; cursor:not-allowed !important; transform:none !important;
}

/* Annulla (X) */
.cvipcmp-fab .cvipcmp-fab-cancel{
  all: unset !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  width:46px !important;
  height:46px !important;
  background:#ef4444 !important;
  color:#fff !important;
  font-weight:900 !important;
  font-size:22px !important;
  border-radius:12px !important;
  cursor:pointer !important;
  box-shadow:0 8px 24px rgba(0,0,0,.15) !important;
  transform:translateZ(0) !important;
  transition:transform .12s ease !important;
  line-height:1 !important;
}
.cvipcmp-fab .cvipcmp-fab-cancel:hover{ transform:scale(1.08) !important; }
.cvipcmp-fab .cvipcmp-fab-cancel:active{ transform:scale(0.95) !important; }

/* =========================================================
   MODAL FULLSCREEN
   ========================================================= */
.cvipcmp-modal{
  position:fixed !important;
  inset:0 !important;
  background:rgba(0,0,0,.6);
  display:none;
  z-index:2147483647 !important;
}
.cvipcmp-modal.open{
  display:flex;
  align-items:center;
  justify-content:center;
}

.cvipcmp-modal-content{
  position:relative;
  width:min(1100px,92vw);
  max-height:90vh;
  background:#fff;
  border-radius:14px;
  overflow:hidden;
  box-shadow:0 24px 80px rgba(0,0,0,.35);
  display:flex;
  flex-direction:column;
}

/* Corpo modal: spazio extra in alto per share + watermark */
.cvipcmp-modal-body{
  padding:48px 12px 12px;
  overflow:auto;
}

/* Tabelle */
.cvipcmp-comparetable.fullscreen table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
}
.cvipcmp-comparetable.fullscreen th,
.cvipcmp-comparetable.fullscreen td{
  border-bottom:1px solid #e5e7eb;
  padding:10px;
  text-align:left;
  background:#fff;
}
.cvipcmp-comparetable.fullscreen thead th{
  position:sticky;
  top:0;
  background:#f8fafc;
  z-index:2;
}
.cvipcmp-comparetable.fullscreen tbody th{
  position:sticky;
  left:0;
  background:#f8fafc;
  z-index:1;
}
.cvipcmp-affiliate-disclaimer{
  margin-top:12px;
  padding:10px 12px;
  font-size:13px;
  line-height:1.45;
  color:#475569;
  text-align:center;
  background:#f8fafc;
  border:1px solid #e5e7eb;
  border-radius:10px;
}

/* =========================================================
   RIGA IMMAGINE STICKY (desktop + mobile)
   ========================================================= */

/* header tabella */
.cvipcmp-comparetable.fullscreen thead th{
  position: sticky;
  top: 0;
  z-index: 4;
}

/* riga IMMAGINE (prima riga del tbody) */
.cvipcmp-comparetable.fullscreen tbody tr:first-child th,
.cvipcmp-comparetable.fullscreen tbody tr:first-child td{
  position: sticky;
  top: 44px; /* altezza header "Caratteristica" */
  z-index: 3;
  background: #fff;
}

/* =========================================================
   CELLE CONFRONTO / HIGHLIGHT
   ========================================================= */
.cvipcmp-cell{
  position:relative;
  display:flex;
  align-items:center;
  gap:8px;
}

.cvipcmp-cell-drive{
  display:flex;
  align-items:center;
  gap:6px;
}

.cvipcmp-drive-icon{
  font-size:11px;
  line-height:1;
  padding:2px 6px;
  border-radius:999px;
  background:#ecfdf5;
  color:#16a34a;
  box-shadow:0 0 0 1px rgba(22,163,74,.25);
  white-space:nowrap;
}

/* su mobile: badge sotto */
@media (max-width: 640px){
  .cvipcmp-cell{
    flex-direction:column;
    align-items:flex-start;
    gap:4px;
  }
  .cvipcmp-best-label{
    font-size:10px;
    padding:2px 6px;
  }
}

.cvipcmp-best{
  padding:4px 8px;
  border-radius:10px;
  background:rgba(34,197,94,.06);
  box-shadow:0 0 0 1px rgba(34,197,94,.15);
  animation:cvipcmp-pulse 1.4s ease-out 2;
}

.cvipcmp-best-label{
  font-size:11px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.04em;
  padding:2px 8px;
  border-radius:999px;
  background:#22c55e;
  color:#fff;
  white-space:nowrap;
}

/* =========================================================
   BOTTONI SHARE + CLOSE + WATERMARK
   ========================================================= */

/* Share + close: base comune */
.cvipcmp-share-btn,
.cvipcmp-modal-close{
  width:42px;
  height:36px;
  border:none;
  background:#111827;
  color:#fff;
  border-radius:10px;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  box-shadow:0 3px 8px rgba(0,0,0,.22);
  transition:transform .12s ease, background .12s ease;
  padding:0;
}

/* hover */
.cvipcmp-share-btn:hover,
.cvipcmp-modal-close:hover{
  transform:scale(1.06);
}

/* X chiusura (in alto a destra) */
.cvipcmp-modal-close{
  position:absolute;
  top:8px;
  right:8px;
  z-index:10000000;
  font-size:18px;
  font-weight:800;
}

/* share bar (in alto a sinistra) */
.cvipcmp-sharebar{
  position:absolute;
  top:8px;
  left:8px;
  display:flex;
  align-items:center;
  gap:8px;
  margin:0;
  padding:0;
  z-index:10000000;
}

/* icona 3 palline */
.cvipcmp-share-icon{
  width:18px;
  height:18px;
  fill:#fff;
}

/* stato "copiato" */
.cvipcmp-share-btn.copied{
  background:#16a34a;
}

.cvipcmp-share-msg{
  font-size:12px;
  color:#16a34a;
}

/* Pulse iniziale (2 volte) */
.cvipcmp-share-btn.pulse{
  animation:cvipcmp-pulse-share 0.9s ease-out 2;
}

@keyframes cvipcmp-pulse-share{
  0%   { transform:scale(1); }
  30%  { transform:scale(1.18); }
  60%  { transform:scale(1); }
  100% { transform:scale(1); }
}

/* Watermark centrale */
.cvipcmp-watermark{
  position:absolute;
  top:10px;
  left:50%;
  transform:translateX(-50%);
  font-size:13px;
  font-weight:600;
  color:#6b7280;
  opacity:.75;
  pointer-events:none;
  user-select:none;
}

/* =========================================================
   HEADER COLONNA + TASTO CAMBIA ↻
   ========================================================= */

.cvipcmp-col-header{
  display:flex;
  flex-direction:row;
  align-items:center;
  justify-content:space-between;
  gap:6px;
  width:100%;
}

.cvipcmp-col-title{
  font-weight:700;
  font-size:14px;
  color:#111;
  text-align:left;
  flex:1;
}

.cvipcmp-change-btn{
  border:none;
  background:transparent;
  cursor:pointer;
  font-size:15px;
  line-height:1;
  padding:4px 6px;
  border-radius:8px;
  color:#6b7280;
  transition:background .12s ease, transform .12s ease, color .12s ease;
}
.cvipcmp-change-btn:hover{
  background:#e5e7eb;
  color:#111827;
  transform:scale(1.12);
}

/* =========================================================
   FILTRO PIATTAFORMA
   ========================================================= */

.cvipcmp-platform-btn{
  border:none;
  width:44px;
  height:44px;
  border-radius:10px;
  background:#f9fafb;
  border:1px solid #e5e7eb;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-weight:800;
  font-size:14px;
  cursor:pointer;
  user-select:none;
  transition:background .12s ease, border-color .12s ease, transform .12s ease;
}

.cvipcmp-platform-btn--pc{ color:#4b5563; }
.cvipcmp-platform-btn--ps{ color:#1d4ed8; }
.cvipcmp-platform-btn--xbox{ color:#15803d; }

.cvipcmp-platform-btn.is-active{
  background:#111827;
  border-color:#111827;
  color:#fff;
  transform:translateY(-1px);
}

/* bottone X (reset filtro) */
.cvipcmp-platform-reset{
  background:#111827;
  border-color:#111827;
  color:#fff;
  font-size:18px;
  display:none;
}
.cvipcmp-platform-reset.is-visible{
  display:inline-flex;
}
.cvipcmp-imgcell {
  position: relative;
  display: inline-block;
}

.cvipcmp-telemetry-icon {
  position: relative;
  bottom: 4px;
  left: 4px;
  font-size: 16px;
  line-height: 1;
  padding: 4px 6px;
  border-radius: 999px;
  background: #22c55e;
  color: #22c55e;
  cursor: help;
}

.cvipcmp-telemetry-icon:hover {
  transform: translateY(-1px);
}
/* Tecnologia: testo + icone in linea */
.cvipcmp-cell-tech{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

/* Chip telemetria (verde) */
.cvipcmp-telemetry-chip{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:30px;
  height:30px;
  border-radius:999px;
  background:#22c55e;
  color:#fff;
  font-size:14px;
  cursor:help;
}

/* pulse 2 volte SOLO sulla chip */
.cvipcmp-telemetry-chip.pulse-twice{
  animation: cvipcmp-pulse 0.7s ease-in-out 0s 2;
}
@keyframes cvipcmp-pulse{
  0%{ transform:scale(1); opacity:1; }
  50%{ transform:scale(1.22); opacity:.85; }
  100%{ transform:scale(1); opacity:1; }
}

.cvipcmp-linkbtn:hover{
  background: rgba(15, 23, 42, 0.10);
}

.cvipcmp-linkbtn .cvipcmp-ico{
  display:inline-flex;
  width:22px;
  height:22px;
  align-items:center;
  justify-content:center;
}

/* Variante YouTube */
.cvipcmp-linkbtn--yt{
  background: rgba(239, 68, 68, 0.10);
  color:#991b1b;
}
.cvipcmp-linkbtn--yt:hover{
  background: rgba(239, 68, 68, 0.16);
}
/* =========================================================
   FIX ANIMAZIONI: niente scale sui BEST e sulla telemetria
   (evita collisione tra @keyframes con stesso nome)
   ========================================================= */

/* 1) Animazione BEST: solo glow verde, nessun resize */
@keyframes cvipcmp-pulse {
  0%   { box-shadow: 0 0 0 rgba(34,197,94,0);   opacity: 1; }
  50%  { box-shadow: 0 0 0 10px rgba(34,197,94,.12); opacity: .98; }
  100% { box-shadow: 0 0 0 rgba(34,197,94,0);   opacity: 1; }
}

.cvipcmp-best{
  animation: cvipcmp-pulse 1.4s ease-out 2;
  transform: none !important;
}

/* 2) Telemetria: animazione separata (NO scale) */
@keyframes cvipcmp-telemetry-glow {
  0%   { box-shadow: 0 0 0 rgba(34,197,94,0);   opacity: 1; }
  50%  { box-shadow: 0 0 0 10px rgba(34,197,94,.18); opacity: .95; }
  100% { box-shadow: 0 0 0 rgba(34,197,94,0);   opacity: 1; }
}

.cvipcmp-telemetry-chip.pulse-twice{
  animation: cvipcmp-telemetry-glow 0.9s ease-in-out 0s 2 !important;
  transform: none !important;
}

/* 3) (Optional) se non usi più .cvipcmp-telemetry-icon puoi ignorare */
.cvipcmp-telemetry-icon{
  background:#22c55e;
  color:#fff;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}

.cvipcmp-links-icons{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
}

.cvipcmp-iconlink{
  width:46px;
  height:46px;
  border-radius:999px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
  background: rgba(15, 23, 42, 0.06);
  color:#0f172a;
  transition: transform .12s ease, background .12s ease;
}

.cvipcmp-iconlink:hover{
  transform: translateY(-1px);
  background: rgba(15, 23, 42, 0.10);
}

.cvipcmp-iconlink--yt{
  background: rgba(239, 68, 68, 0.12);
  color:#dc2626;
}
.cvipcmp-iconlink--yt:hover{
  background: rgba(239, 68, 68, 0.18);
}

.cvipcmp-yt-svg{
  width:22px;
  height:22px;
  fill: currentColor;
  display:block;
}
.cvipcmp-amz-svg{
  width: 24px;
  height: 24px;
}

/* SOLO SMARTPHONE: rimpicciolisci i 3 pulsanti links così stanno in linea */
@media (max-width: 640px){
  .cvipcmp-comparetable tbody tr:last-child td{
    padding-left: 6px;
    padding-right: 6px;
  }

  .cvipcmp-links-icons{
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
    gap: 6px;
    width: 100%;
  }

  .cvipcmp-links-icons .cvipcmp-iconlink{
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
  }

  .cvipcmp-links-icons .cvipcmp-amz-svg,
  .cvipcmp-links-icons .cvipcmp-yt-svg{
    width: 18px;
    height: 18px;
    display: block;
  }

  .cvipcmp-links-icons .cvipcmp-iconlink--shop{
    font-size: 16px;
    line-height: 1;
  }
}

/* =========================================================
   NEW — INFO ICON "Links" + POPUP (dentro il modal)
   ========================================================= */

.cvipcmp-rowlabel-withinfo{
  display:inline-flex;
  align-items:center;
  gap:8px;
}

.cvipcmp-links-info-btn:active{
  transform: translateY(0);
}

.cvipcmp-links-info-btn{
  all: unset;
  width:36px;
  height:36px;
  border-radius:999px;
  background: rgba(15, 23, 42, 0.06);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  transition: transform .12s ease, background .12s ease, box-shadow .12s ease;
  position:relative;
}

/* hover identico agli altri */
.cvipcmp-links-info-btn:hover{
  transform: translateY(-1px);
  background: rgba(15, 23, 42, 0.10);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.18);
}

/* disegno della ℹ come icona, NON testo */
.cvipcmp-links-info-btn::before{
  content: "ℹ";
  font-size:18px;
  font-weight:900;
  color:#0f172a;
  line-height:1;
  display:block;
}

/* Mobile */
@media (max-width: 640px){
  .cvipcmp-links-info-btn{
    width:40px;
    height:40px;
  }
  .cvipcmp-links-info-btn::before{
    font-size:16px;
  }
}

/* overlay sopra al modal */
.cvipcmp-links-info-overlay{
  position:absolute;
  inset:0;
  background:rgba(0,0,0,.45);
  display:none;
  align-items:center;
  justify-content:center;
  padding:16px;
  z-index:10000001;
}
.cvipcmp-links-info-overlay.is-open{ display:flex; }

.cvipcmp-links-info-dialog{
  width:min(520px, 100%);
  background:#fff;
  border-radius:14px;
  box-shadow:0 18px 60px rgba(0,0,0,.35);
  overflow:hidden;
}

.cvipcmp-links-info-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:12px 14px;
  border-bottom:1px solid rgba(15,23,42,.10);
  background:#f8fafc;
}

.cvipcmp-links-info-title{
  margin:0;
  font-size:15px;
  font-weight:800;
  color:#0f172a;
}

.cvipcmp-links-info-close{
  width:40px;
  height:40px;
  border-radius:999px;
  border:0;
  background: rgba(15, 23, 42, 0.06); /* stesso grigio soft delle icone */
  color:#0f172a;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:20px;
  font-weight:700;
  cursor:pointer;
  transition: transform .12s ease, background .12s ease, box-shadow .12s ease;
}
.cvipcmp-links-info-close:hover{
  transform: translateY(-1px);
  background: rgba(15, 23, 42, 0.10);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.18);
}
.cvipcmp-links-info-close:active{
  transform: translateY(0);
}
/* Mobile: leggermente più compatta */
@media (max-width: 640px){
  .cvipcmp-links-info-close{
    width:36px;
    height:36px;
    font-size:18px;
  }
}
.cvipcmp-links-info-body{
  padding:12px 14px 16px;
  font-size:14px;
  line-height:1.45;
  color:rgba(15,23,42,.82);
}
.cvipcmp-links-info-body p{ margin:0 0 10px; }
.cvipcmp-links-info-body p:last-child{ margin-bottom:0; }