/* Nevsoft Universal Tiered Cart Rewards & Auto Gift Widget */
:root {
  --ns-cr-primary: #16a34a;
  --ns-cr-accent: #f59e0b;
  --ns-cr-bg: #f8fafc;
}

.ns-cr-css-probe {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 9997;
}

#ns-cr-product-box,
#ns-cr-cart-box,
#ns-cr-checkout-box {
  display: block;
  width: 100%;
  clear: both;
  box-sizing: border-box;
}

.ns-cr-topbar {
  background: linear-gradient(90deg, #0f172a 0%, #1e293b 100%);
  color: #ffffff;
  font-size: 13px;
  padding: 7px 14px;
  text-align: center;
  position: relative;
  z-index: 9998;
  line-height: 1.4;
  border-bottom: 2px solid var(--ns-cr-primary);
}
.ns-cr-topbar strong {
  color: #fde047;
  font-weight: 700;
}
.ns-cr-topbar-progress {
  max-width: 460px;
  height: 5px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 99px;
  margin: 5px auto 2px;
  overflow: hidden;
}
.ns-cr-topbar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--ns-cr-accent), var(--ns-cr-primary));
  border-radius: 99px;
  transition: width 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Main Card Widget (Product, Cart, Checkout, Side Drawer) */
.ns-cr-card {
  background: var(--ns-cr-bg);
  border: 1.5px solid rgba(22, 163, 74, 0.28);
  border-radius: 12px;
  padding: 13px 15px;
  margin: 12px 0;
  box-shadow: 0 3px 12px rgba(15, 23, 42, 0.05);
  font-family: inherit;
  color: #1e293b;
  width: 100%;
  display: block;
  clear: both;
  box-sizing: border-box;
}
.ns-cr-card--compact {
  padding: 10px 12px;
  margin: 0;
  border-radius: 10px;
}

/* Side Drawer (pmc-panel) & SO-Emarket Mini-Cart Slot */
#cart .ns-cr-minicart-slot,
.shopping_cart .ns-cr-minicart-slot,
li.ns-cr-minicart-slot {
  display: block !important;
  flex: 0 0 auto !important;
  padding: 10px 13px 2px !important;
  margin: 0 !important;
  background: #f7f8f9 !important;
  list-style: none !important;
  border: 0 !important;
}

.ns-cr-headline {
  font-size: 13.5px;
  line-height: 1.45;
  margin-bottom: 10px;
  color: #0f172a;
}
.ns-cr-card--compact .ns-cr-headline {
  font-size: 12.5px;
  margin-bottom: 8px;
}
.ns-cr-headline strong {
  color: var(--ns-cr-primary);
  font-weight: 700;
}

/* Progress Track */
.ns-cr-track-wrap {
  position: relative;
  height: 9px;
  background: #e2e8f0;
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 11px;
}
.ns-cr-card--compact .ns-cr-track-wrap {
  margin-bottom: 8px;
  height: 7px;
}
.ns-cr-track-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--ns-cr-primary) 0%, #22c55e 100%);
  border-radius: 99px;
  transition: width 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Tier Milestones Grid */
.ns-cr-tiers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
}
.ns-cr-card--compact .ns-cr-tiers {
  grid-template-columns: 1fr;
  gap: 6px;
}
.ns-cr-tier-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  padding: 6px 10px;
  transition: all 0.25s ease;
}
.ns-cr-tier-pill.is-unlocked {
  border-color: var(--ns-cr-primary);
  background: #f0fdf4;
}
.ns-cr-tier-pill.is-oos {
  opacity: 0.6;
}
.ns-cr-tier-icon {
  width: 34px;
  height: 34px;
  min-width: 34px;
  border-radius: 8px;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  overflow: hidden;
}
.ns-cr-tier-pill.is-unlocked .ns-cr-tier-icon {
  background: var(--ns-cr-primary);
  color: #fff;
}
.ns-cr-tier-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ns-cr-tier-meta {
  flex: 1;
  min-width: 0;
  line-height: 1.25;
}
.ns-cr-tier-limit {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
}
.ns-cr-tier-pill.is-unlocked .ns-cr-tier-limit {
  color: var(--ns-cr-primary);
}
.ns-cr-tier-name {
  font-size: 12px;
  font-weight: 600;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ns-cr-check {
  font-size: 13px;
  color: var(--ns-cr-primary);
  font-weight: bold;
}

/* Celebratory Toast */
.ns-cr-toast {
  position: fixed;
  bottom: 22px;
  left: 22px;
  z-index: 2147483640;
  background: #0f172a;
  color: #ffffff;
  border-left: 4px solid var(--ns-cr-primary);
  padding: 12px 18px;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.28);
  font-size: 13.5px;
  max-width: 340px;
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.35s ease;
  pointer-events: none;
}
.ns-cr-toast.is-visible {
  transform: translateY(0);
  opacity: 1;
}

.ns-cr-rtl {
  direction: rtl;
  text-align: right;
}
@media (max-width: 576px) {
  .ns-cr-card { padding: 11px 12px; }
  .ns-cr-tiers { grid-template-columns: 1fr; }
  .ns-cr-topbar { font-size: 12px; padding: 6px 10px; }
}
