/* ============================================
   ROUGE PRINT — Discount Progress Widget
   rouge-discount-widget.css
   ============================================ */

#rouge-discount-widget {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  width: 780px;
  max-width: calc(100vw - 32px);
  height: 92px;
  background: #0f0f0f;
  border: 1px solid #242424;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 16px 48px rgba(0,0,0,0.7), 0 4px 12px rgba(0,0,0,0.5);
  transition: border-color 0.5s ease, box-shadow 0.5s ease;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

#rouge-discount-widget.rdw-best {
  border-color: rgba(34,197,94,0.45);
  box-shadow: 0 16px 48px rgba(0,0,0,0.7), 0 4px 12px rgba(0,0,0,0.5), 0 0 0 1px rgba(34,197,94,0.15);
}

/* ── HEADER h=32px fisso ── */
.rdw-header {
  height: 32px;
  min-height: 32px;
  max-height: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  border-bottom: 1px solid #1c1c1c;
  flex-shrink: 0;
  overflow: hidden;
}
.rdw-header-label {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.38);
  white-space: nowrap;
  overflow: hidden;
}
.rdw-counter {
  font-size: 10px;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.25);
  white-space: nowrap;
  flex-shrink: 0;
  margin-left: 16px;
}
.rdw-counter strong {
  font-weight: 700;
  font-size: 12px;
  color: rgba(255,255,255,0.7);
  transition: color 0.45s;
}
#rouge-discount-widget.rdw-best .rdw-counter strong {
  color: #22c55e;
}

/* ── BODY h=58px fisso ── */
.rdw-body {
  height: 58px;
  min-height: 58px;
  max-height: 58px;
  display: flex;
  align-items: stretch;
  flex-shrink: 0;
  overflow: hidden;
}

/* ZONA 1 — prezzo w=160px fisso */
.rdw-price-zone {
  width: 160px;
  min-width: 160px;
  max-width: 160px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  border-right: 1px solid #1c1c1c;
  flex-shrink: 0;
  overflow: hidden;
}

/* Slot prezzo — clip rigido */
.rdw-slot {
  height: 32px;
  min-height: 32px;
  max-height: 32px;
  width: 52px;
  min-width: 52px;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
}
.rdw-slot-inner {
  display: flex;
  flex-direction: column;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
}
.rdw-slot-item {
  height: 32px;
  min-height: 32px;
  max-height: 32px;
  display: flex;
  align-items: center;
  font-size: 26px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1;
  letter-spacing: -0.02em;
  transition: color 0.45s;
  white-space: nowrap;
  flex-shrink: 0;
}
#rouge-discount-widget.rdw-best .rdw-slot-item {
  color: #22c55e;
}

.rdw-price-meta {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex-shrink: 0;
  overflow: hidden;
}
.rdw-price-unit {
  font-size: 10px;
  color: rgba(255,255,255,0.28);
  letter-spacing: 0.06em;
  white-space: nowrap;
}

/* Slot pill sconto — clip rigido */
.rdw-disc-slot {
  height: 20px;
  min-height: 20px;
  max-height: 20px;
  overflow: hidden;
  position: relative;
}
.rdw-disc-inner {
  display: flex;
  flex-direction: column;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
}
.rdw-disc-item {
  height: 20px;
  min-height: 20px;
  max-height: 20px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  overflow: hidden;
}
.rdw-disc-pill {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 1px 7px;
  line-height: 16px;
  height: 18px;
  box-sizing: border-box;
  border-radius: 99px;
  white-space: nowrap;
  display: inline-block;
  min-width: 40px;
  text-align: center;
  background: rgba(232,23,58,0.18);
  color: #ff3355;
  border: 1px solid rgba(232,23,58,0.35);
  transition: background 0.45s, color 0.45s, border-color 0.45s;
}
.rdw-disc-pill.rdw-empty {
  background: transparent;
  color: transparent;
  border-color: transparent;
}
.rdw-disc-pill.rdw-green {
  background: rgba(34,197,94,0.18);
  color: #22c55e;
  border-color: rgba(34,197,94,0.4);
}

/* ZONA 2 — centro */
.rdw-center {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 20px;
  gap: 8px;
  overflow: hidden;
}
.rdw-callout {
  height: 16px;
  min-height: 16px;
  max-height: 16px;
  line-height: 16px;
  font-size: 12px;
  color: rgba(255,255,255,0.38);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rdw-callout strong {
  color: rgba(255,255,255,0.9);
  font-weight: 700;
}
.rdw-callout .rdw-accent { color: #ff3355; font-weight: 700; }
.rdw-callout .rdw-green  { color: #22c55e; font-weight: 700; }

.rdw-bar-track {
  height: 4px;
  min-height: 4px;
  max-height: 4px;
  background: #1e1e1e;
  border-radius: 999px;
  position: relative;
  overflow: visible;
  flex-shrink: 0;
}
.rdw-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: #e8173a;
  transition: width 0.55s cubic-bezier(0.4,0,0.2,1), background 0.45s;
  position: relative;
  z-index: 1;
}
.rdw-bar-fill.rdw-green { background: #22c55e; }

.rdw-markers {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
}
.rdw-marker {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #181818;
  border: 1.5px solid #2e2e2e;
  transition: background 0.4s, border-color 0.4s;
  z-index: 2;
}
.rdw-marker.rdw-reached {
  background: #e8173a;
  border-color: #e8173a;
}
.rdw-marker.rdw-reached.rdw-green {
  background: #22c55e;
  border-color: #22c55e;
}

/* ZONA 3 — tier 4×72px fisso */
.rdw-tiers {
  display: flex;
  align-items: stretch;
  border-left: 1px solid #1c1c1c;
  flex-shrink: 0;
  overflow: hidden;
}
.rdw-tier {
  width: 72px;
  min-width: 72px;
  max-width: 72px;
  height: 58px;
  min-height: 58px;
  max-height: 58px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-left: 1px solid #1c1c1c;
  position: relative;
  transition: background 0.35s;
  overflow: hidden;
  flex-shrink: 0;
}
.rdw-tier:first-child { border-left: none; }
.rdw-tier.rdw-active   { background: #161616; }
.rdw-tier.rdw-best-act { background: rgba(34,197,94,0.06); }

.rdw-tier::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: transparent;
  transition: background 0.35s;
}
.rdw-tier.rdw-active::before   { background: #e8173a; }
.rdw-tier.rdw-best-act::before { background: #22c55e; }

.rdw-tier-qty {
  height: 13px;
  min-height: 13px;
  line-height: 13px;
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  transition: color 0.3s;
  white-space: nowrap;
}
.rdw-tier.rdw-active   .rdw-tier-qty { color: rgba(255,255,255,0.55); }
.rdw-tier.rdw-next-up  .rdw-tier-qty { color: rgba(255,255,255,0.38); }
.rdw-tier.rdw-best-act .rdw-tier-qty { color: rgba(34,197,94,0.6); }

.rdw-tier-s {
  height: 20px;
  min-height: 20px;
  line-height: 20px;
  font-size: 15px;
  font-weight: 800;
  color: rgba(255,255,255,0.22);
  transition: color 0.3s;
  white-space: nowrap;
  letter-spacing: -0.01em;
}
.rdw-tier.rdw-active   .rdw-tier-s { color: #ff3355; font-size: 15px; }
.rdw-tier.rdw-best-act .rdw-tier-s { color: #22c55e; font-size: 15px; }
.rdw-tier.rdw-next-up  .rdw-tier-s { color: rgba(255,255,255,0.38); }
.rdw-tier-s.rdw-none {
  font-size: 12px;
  color: rgba(255,255,255,0.12) !important;
}
.rdw-tier.rdw-active .rdw-tier-s.rdw-none {
  color: rgba(255,255,255,0.28) !important;
  font-size: 12px;
}

/* Mobile */
@media (max-width: 600px) {
  #rouge-discount-widget {
    bottom: 12px;
    border-radius: 10px;
  }
  .rdw-header-label {
    font-size: 9px;
    letter-spacing: 0.1em;
  }
  .rdw-price-zone {
    width: 120px;
    min-width: 120px;
    max-width: 120px;
  }
  .rdw-slot-item { font-size: 20px; }
  .rdw-tier { width: 56px; min-width: 56px; max-width: 56px; }
  .rdw-tier-s { font-size: 12px; }
}