.nut-stock-bar {
  margin: 16px 0 22px;
  padding: 14px 16px;
  border: 1px solid #d5e9d7;
  border-radius: 14px;
  background: linear-gradient(135deg, #f8fcf6 0%, #eff8ec 100%);
  box-shadow: 0 8px 20px rgba(39, 94, 59, .07);
}

.nut-stock-bar__topline {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nut-stock-bar__icon {
  position: relative;
  display: inline-flex;
  flex: 0 0 38px;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: #fff;
  background: #2f7649;
}

.nut-stock-bar__icon::after {
  position: absolute;
  inset: -4px;
  border: 1px solid rgba(47, 118, 73, .38);
  border-radius: inherit;
  content: '';
  animation: nut-stock-pulse 2.2s ease-out infinite;
}

.nut-stock-bar__summary {
  flex: 1 1 auto;
  min-width: 0;
}

.nut-stock-bar__summary strong {
  display: block;
  margin-bottom: 7px;
  color: #25452e;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
}

.nut-stock-bar__track {
  overflow: hidden;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: #dbe9db;
}

.nut-stock-bar__fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #79ab4f 0%, #2f7649 100%);
  box-shadow: 0 0 12px rgba(47, 118, 73, .36);
  transition: width .45s ease, background-color .3s ease;
}

.nut-stock-bar__viewers {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  padding: 7px 9px;
  border-radius: 9px;
  color: #2d603e;
  background: rgba(255, 255, 255, .65);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.nut-stock-bar__viewers i {
  color: #4f8b44;
}

.nut-stock-bar__viewers b {
  color: #1f5b35;
  font-weight: 800;
}

.nut-stock-bar.is-sold-out {
  border-color: #efd5d5;
  background: #fff8f8;
  box-shadow: none;
}

.nut-stock-bar.is-sold-out .nut-stock-bar__icon {
  background: #b44b4b;
}

.nut-stock-bar.is-sold-out .nut-stock-bar__icon::after {
  display: none;
}

.nut-stock-bar.is-sold-out .nut-stock-bar__fill {
  background: #d4a2a2;
}

.nut-stock-bar.is-sold-out .nut-stock-bar__summary strong {
  color: #8d3939;
}

@keyframes nut-stock-pulse {
  0% { transform: scale(.9); opacity: .8; }
  70%, 100% { transform: scale(1.22); opacity: 0; }
}

@media (max-width: 575.98px) {
  .nut-stock-bar {
    padding: 13px;
  }

  .nut-stock-bar__topline {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .nut-stock-bar__summary {
    width: calc(100% - 50px);
  }

  .nut-stock-bar__viewers {
    width: 100%;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nut-stock-bar__icon::after {
    animation: none;
  }

  .nut-stock-bar__fill {
    transition: none;
  }
}
