/* =====================================================
   PREZZOTOP CI - VERSIONE COMPATTA E MODERNA
   ISOLATO PER EVITARE CONFLITTI CON ptop-price-index.css
   ===================================================== */

/* Isoliamo gli stili solo al contenitore principale con massima specificità */
.prezzotop-ci-mount > .ptop-ci-card {
  --ptop-ci-score: 0 !important;
  --ptop-ci-accent: #6C4176 !important;
  
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%) !important;
  border: 1px solid rgba(0,0,0,0.04) !important;
  border-radius: 12px !important;
  padding: 16px 18px !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08), 0 0 0 1px rgba(0,0,0,0.04) !important;
  margin: 16px 0 !important;
  position: relative !important;
  overflow: hidden !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.prezzotop-ci-mount > .ptop-ci-card::before {
  content: '' !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  height: 3px !important;
  background: linear-gradient(90deg, #22c55e 0%, #10b981 100%) !important;
  opacity: 0 !important;
  transition: opacity 0.3s !important;
}

.prezzotop-ci-mount > .ptop-ci-card.ptop-ci--good::before { 
  background: linear-gradient(90deg, #22c55e 0%, #10b981 100%) !important;
  opacity: 1 !important;
}
.prezzotop-ci-mount > .ptop-ci-card.ptop-ci--medium::before { 
  background: linear-gradient(90deg, #f59e0b 0%, #f97316 100%) !important;
  opacity: 1 !important;
}
.prezzotop-ci-mount > .ptop-ci-card.ptop-ci--bad::before { 
  background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%) !important;
  opacity: 1 !important;
}

.prezzotop-ci-mount > .ptop-ci-card:hover {
  box-shadow: 0 8px 30px rgba(0,0,0,0.12), 0 0 0 1px rgba(0,0,0,0.06) !important;
  transform: translateY(-2px) !important;
}

/* =====================================================
   HEADER COMPATTO
   ===================================================== */
.prezzotop-ci-mount > .ptop-ci-card .ptop-ci-head {
  display: flex !important;
  justify-content: space-between !important;
  align-items: flex-start !important;
  gap: 12px !important;
  margin-bottom: 12px !important;
}

.prezzotop-ci-mount > .ptop-ci-card .ptop-ci-kicker {
  font-size: 11px !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  color: #6b7280 !important;
  margin-bottom: 2px !important;
  opacity: 1 !important;
}

.prezzotop-ci-mount > .ptop-ci-card .ptop-ci-title {
  font-size: 15px !important;
  font-weight: 700 !important;
  color: #111827 !important;
  margin-bottom: 6px !important;
  line-height: 1.2 !important;
}

/* =====================================================
   GAUGE COMPATTO (Score numerico + mini grafico)
   ===================================================== */
.prezzotop-ci-mount > .ptop-ci-card .ptop-ci-gauge {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-end !important;
  min-width: 70px !important;
  width: auto !important;
  height: auto !important;
  border-radius: 0 !important;
  background: transparent !important;
  place-items: initial !important;
}

.prezzotop-ci-mount > .ptop-ci-card .ptop-ci-gauge-inner {
  display: flex !important;
  align-items: baseline !important;
  gap: 2px !important;
  margin-bottom: 4px !important;
  width: auto !important;
  height: auto !important;
  background: transparent !important;
  border-radius: 0 !important;
  flex-direction: row !important;
  justify-content: flex-end !important;
}

.prezzotop-ci-mount > .ptop-ci-card .ptop-ci-gauge-score {
  font-size: 32px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  background: linear-gradient(135deg, #111827 0%, #374151 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
  color: transparent !important;
}

.prezzotop-ci-mount > .ptop-ci-card.ptop-ci--good .ptop-ci-gauge-score {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

.prezzotop-ci-mount > .ptop-ci-card.ptop-ci--medium .ptop-ci-gauge-score {
  background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

.prezzotop-ci-mount > .ptop-ci-card.ptop-ci--bad .ptop-ci-gauge-score {
  background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

.prezzotop-ci-mount > .ptop-ci-card .ptop-ci-gauge-max {
  font-size: 14px !important;
  font-weight: 600 !important;
  color: #9ca3af !important;
  opacity: 1 !important;
}

/* =====================================================
   BARRA PROGRESSO MODERNA
   ===================================================== */
.prezzotop-ci-mount > .ptop-ci-card .ptop-ci-bar {
  height: 8px !important;
  background: #e5e7eb !important;
  border-radius: 999px !important;
  overflow: hidden !important;
  margin: 10px 0 !important;
  position: relative !important;
}

.prezzotop-ci-mount > .ptop-ci-card .ptop-ci-bar span {
  display: block !important;
  height: 100% !important;
  width: 0 !important;
  border-radius: 999px !important;
  background: linear-gradient(90deg, #22c55e 0%, #10b981 100%) !important;
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1) !important;
  position: relative !important;
  overflow: hidden !important;
}

.prezzotop-ci-mount > .ptop-ci-card.ptop-ci--good .ptop-ci-bar span {
  background: linear-gradient(90deg, #22c55e 0%, #10b981 100%) !important;
}

.prezzotop-ci-mount > .ptop-ci-card.ptop-ci--medium .ptop-ci-bar span {
  background: linear-gradient(90deg, #f59e0b 0%, #f97316 100%) !important;
}

.prezzotop-ci-mount > .ptop-ci-card.ptop-ci--bad .ptop-ci-bar span {
  background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%) !important;
}

.prezzotop-ci-mount > .ptop-ci-card .ptop-ci-bar span::after {
  content: '' !important;
  position: absolute !important;
  top: 0 !important;
  left: -100% !important;
  width: 100% !important;
  height: 100% !important;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent) !important;
  animation: shimmer 2s infinite !important;
}

@keyframes shimmer {
  to { left: 200%; }
}

/* =====================================================
   GIUDIZIO COMPATTO
   ===================================================== */
.prezzotop-ci-mount > .ptop-ci-card .ptop-ci-judgement {
  font-size: 13px !important;
  font-weight: 600 !important;
  padding: 6px 12px !important;
  border-radius: 8px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  margin-bottom: 8px !important;
  line-height: 1.3 !important;
}

.prezzotop-ci-mount > .ptop-ci-card .ptop-judgement-buy {
  background: #dcfce7 !important;
  color: #166534 !important;
}

.prezzotop-ci-mount > .ptop-ci-card .ptop-judgement-good {
  background: #dbeafe !important;
  color: #1e40af !important;
}

.prezzotop-ci-mount > .ptop-ci-card .ptop-judgement-neutral {
  background: #fef3c7 !important;
  color: #92400e !important;
}

.prezzotop-ci-mount > .ptop-ci-card .ptop-judgement-wait {
  background: #fee2e2 !important;
  color: #991b1b !important;
}

/* =====================================================
   BADGE COMPATTI
   ===================================================== */
.prezzotop-ci-mount > .ptop-ci-card .ptop-ci-badges {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
  margin-top: 4px !important;
}

.prezzotop-ci-mount > .ptop-ci-card .ptop-badge {
  font-size: 11px !important;
  font-weight: 600 !important;
  padding: 4px 10px !important;
  border-radius: 6px !important;
  white-space: nowrap !important;
  transition: transform 0.2s !important;
  border: none !important;
}

.prezzotop-ci-mount > .ptop-ci-card .ptop-badge:hover {
  transform: scale(1.05) !important;
}

.prezzotop-ci-mount > .ptop-ci-card .ptop-badge-fire {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%) !important;
  color: #92400e !important;
}

.prezzotop-ci-mount > .ptop-ci-card .ptop-badge-green {
  background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%) !important;
  color: #166534 !important;
}

.prezzotop-ci-mount > .ptop-ci-card .ptop-badge-yellow {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%) !important;
  color: #92400e !important;
}

.prezzotop-ci-mount > .ptop-ci-card .ptop-badge-down {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%) !important;
  color: #1e40af !important;
}

.prezzotop-ci-mount > .ptop-ci-card .ptop-badge-up {
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%) !important;
  color: #991b1b !important;
}

.prezzotop-ci-mount > .ptop-ci-card .ptop-badge-stable {
  background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%) !important;
  color: #9a3412 !important;
}

/* =====================================================
   CONSULENTE COMPATTO
   ===================================================== */
.prezzotop-ci-mount > .ptop-ci-card .ptop-consultant {
  background: #f9fafb !important;
  border-radius: 10px !important;
  padding: 12px 14px !important;
  margin-top: 12px !important;
  border-left: 3px solid #e5e7eb !important;
  transition: all 0.3s !important;
  border: 1px solid transparent !important;
  border-left: 3px solid #e5e7eb !important;
}

.prezzotop-ci-mount > .ptop-ci-card .ptop-consultant:hover {
  background: #f3f4f6 !important;
  border-left-color: #9ca3af !important;
}

.prezzotop-ci-mount > .ptop-ci-card .ptop-consultant-head {
  display: flex !important;
  justify-content: space-between !important;
  align-items: flex-start !important;
  margin-bottom: 8px !important;
  gap: 10px !important;
}

.prezzotop-ci-mount > .ptop-ci-card .ptop-consultant-title {
  font-size: 13px !important;
  font-weight: 700 !important;
  color: #111827 !important;
  margin-bottom: 2px !important;
}

.prezzotop-ci-mount > .ptop-ci-card .ptop-consultant-subtitle {
  font-size: 11px !important;
  color: #6b7280 !important;
  line-height: 1.3 !important;
  opacity: 1 !important;
}

.prezzotop-ci-mount > .ptop-ci-card .ptop-consultant-badge {
  font-size: 11px !important;
  font-weight: 700 !important;
  padding: 4px 10px !important;
  border-radius: 6px !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}

.prezzotop-ci-mount > .ptop-ci-card .ptop-consultant-body {
  margin-top: 8px !important;
}

.prezzotop-ci-mount > .ptop-ci-card .ptop-consultant-main {
  font-size: 13px !important;
  font-weight: 600 !important;
  color: #1f2937 !important;
  margin-bottom: 4px !important;
  line-height: 1.4 !important;
}

.prezzotop-ci-mount > .ptop-ci-card .ptop-consultant-sub {
  font-size: 12px !important;
  color: #6b7280 !important;
  line-height: 1.4 !important;
  opacity: 1 !important;
}

.prezzotop-ci-mount > .ptop-ci-card .ptop-consultant-footer {
  margin-top: 8px !important;
  padding-top: 8px !important;
  border-top: 1px solid #e5e7eb !important;
  font-size: 10px !important;
  color: #9ca3af !important;
  line-height: 1.3 !important;
  opacity: 1 !important;
}

/* Stati consulente */
.prezzotop-ci-mount > .ptop-ci-card .ptop-excellent {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%) !important;
  border-left-color: #22c55e !important;
}

.prezzotop-ci-mount > .ptop-ci-card .ptop-excellent .ptop-consultant-badge {
  background: #dcfce7 !important;
  color: #166534 !important;
}

.prezzotop-ci-mount > .ptop-ci-card .ptop-average {
  background: linear-gradient(135deg, #fefce8 0%, #fef3c7 100%) !important;
  border-left-color: #f59e0b !important;
}

.prezzotop-ci-mount > .ptop-ci-card .ptop-average .ptop-consultant-badge {
  background: #fef3c7 !important;
  color: #92400e !important;
}

.prezzotop-ci-mount > .ptop-ci-card .ptop-wait {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%) !important;
  border-left-color: #3b82f6 !important;
}

.prezzotop-ci-mount > .ptop-ci-card .ptop-wait .ptop-consultant-badge {
  background: #dbeafe !important;
  color: #1e40af !important;
}

.prezzotop-ci-mount > .ptop-ci-card .ptop-expensive {
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%) !important;
  border-left-color: #ef4444 !important;
}

.prezzotop-ci-mount > .ptop-ci-card .ptop-expensive .ptop-consultant-badge {
  background: #fee2e2 !important;
  color: #991b1b !important;
}

/* =====================================================
   LOADING STATE
   ===================================================== */
.prezzotop-ci-mount > .ptop-ci-card.ptop-ci-loading {
  opacity: 0 !important;
  animation: fadeIn 0.4s 0.1s forwards !important;
  transform: translateY(0) !important;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 640px) {
  .prezzotop-ci-mount > .ptop-ci-card {
    padding: 14px 16px !important;
    border-radius: 10px !important;
  }
  
  .prezzotop-ci-mount > .ptop-ci-card .ptop-ci-title {
    font-size: 14px !important;
  }
  
  .prezzotop-ci-mount > .ptop-ci-card .ptop-ci-gauge-score {
    font-size: 28px !important;
  }
  
  .prezzotop-ci-mount > .ptop-ci-card .ptop-ci-judgement {
    font-size: 12px !important;
    padding: 5px 10px !important;
  }
  
  .prezzotop-ci-mount > .ptop-ci-card .ptop-badge {
    font-size: 10px !important;
    padding: 3px 8px !important;
  }
  
  .prezzotop-ci-mount > .ptop-ci-card .ptop-consultant {
    padding: 10px 12px !important;
  }
}

/* =====================================================
   WIDGET BASE (ptop-widget)
   ===================================================== */
.ptop-widget {
  background: #fff;
  border-radius: 12px;
  padding: 12px;
  margin: 0 0 24px 0;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.ptop-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.ptop-emoji {
  font-size: 32px;
  line-height: 1;
}

.ptop-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.02em;
}

.ptop-bar {
  position: relative;
  height: 8px;
  background: #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 16px;
}

.ptop-bar-fill {
  position: absolute;
  height: 100%;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 4px;
}

.ptop-score {
  position: absolute;
  right: 8px;
  top: -24px;
  font-size: 14px;
  font-weight: 600;
  color: #6b7280;
}

.ptop-message {
  font-size: 15px;
  line-height: 1.5;
  color: #374151;
  margin: 0 0 16px 0;
}

.ptop-cta {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  font-size: 15px;
}

.ptop-meta {
  margin-top: 16px;
  font-size: 12px;
  color: #9ca3af;
}

/* STATI VISIVI */
.ptop-buy .ptop-title { color: #dc2626; }
.ptop-buy .ptop-bar-fill { background: linear-gradient(90deg, #f97316, #16A34A); }
.ptop-buy .ptop-cta {
  background: #dc2626;
  color: white;
}
.ptop-buy .ptop-cta:hover {
  background: #b91c1c;
  transform: translateY(-1px);
}

.ptop-wait .ptop-title { color: #f59e0b; }
.ptop-wait .ptop-bar-fill { background: linear-gradient(90deg, #fbbf24, #f59e0b); }
.ptop-wait .ptop-cta {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;
}
.ptop-wait .ptop-cta:hover {
  background: #e5e7eb;
}

.ptop-avoid .ptop-title { color: #6b7280; }
.ptop-avoid .ptop-bar-fill { background: linear-gradient(90deg, #9ca3af, #6b7280); }
.ptop-avoid .ptop-cta {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;
}
.ptop-avoid .ptop-cta:hover {
  background: #e5e7eb;
}

/* =====================================================
   ✨ FAQ MODERNA - DESIGN A CARDS
   ===================================================== */
.prezzotop-faq-modern {
  margin: 24px 0;
  padding: 0;
}

.prezzotop-faq-modern h2 {
  margin: 0 0 16px;
  font-size: 20px;
  font-weight: 700;
  color: #111827;
  letter-spacing: -0.02em;
}

.ptop-faq-grid {
  display: grid;
  gap: 12px;
}

.ptop-faq-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px 18px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.ptop-faq-card:hover {
  border-color: #6C4176;
  box-shadow: 0 4px 12px rgba(108,65,118,0.1);
  transform: translateY(-2px);
}

.ptop-faq-card h3 {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 700;
  color: #111827;
  line-height: 1.4;
}

.ptop-faq-card p {
  margin: 0;
  font-size: 14px;
  color: #4b5563;
  line-height: 1.6;
}

/* Stili dinamici per evidenziare risposte positive/negative */
.ptop-faq-card .ptop-faq-dynamic strong {
  font-weight: 700;
}

/* Responsive FAQ */
@media (max-width: 640px) {
  .prezzotop-faq-modern h2 {
    font-size: 18px;
  }
  
  .ptop-faq-card {
    padding: 14px 16px;
  }
  
  .ptop-faq-card h3 {
    font-size: 14px;
  }
  
  .ptop-faq-card p {
    font-size: 13px;
  }
}

/* =====================================================
   SNIPPET SEO MIGLIORATO
   ===================================================== */
.prezzotop-seo-snippet {
  font-size: 13px;
  color: #374151;
  margin: 20px 0;
  padding: 16px 18px;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-left: 4px solid #6C4176;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.prezzotop-seo-snippet p {
  margin: 0;
  line-height: 1.6;
}

.prezzotop-seo-snippet strong {
  font-weight: 700;
  color: #111827;
}

/* Responsive snippet */
@media (max-width: 640px) {
  .prezzotop-seo-snippet {
    font-size: 12px;
    padding: 14px 16px;
  }
}
