/*
 * Frontend styles for SalehBazar Smart Badges
 */

.sb-badges {
  position: absolute;
  z-index: 9;
  display: flex;
  flex-direction: column;
  gap: var(--sb-gap, 5px);
  pointer-events: none;
}

.sb-badges.sb-top-left {
  top: 10px;
  left: 10px;
  align-items: flex-start;
}

.sb-badges.sb-top-right {
  top: 10px;
  right: 10px;
  align-items: flex-end;
}

.sb-badges.sb-bottom-left {
  bottom: 10px;
  left: 10px;
  align-items: flex-start;
}

.sb-badges.sb-bottom-right {
  bottom: 10px;
  right: 10px;
  align-items: flex-end;
}

.sb-badge {
  --bg: var(--sb-badge-bg, #009688);
  --color: var(--sb-badge-color, #ffffff);
  background: var(--bg);
  color: var(--color);
  padding: 2px 6px;
  font-size: 12px;
  line-height: 1.2;
  border-radius: 3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  white-space: nowrap;
  pointer-events: auto;
  transform: translateY(var(--offset, 0px));
}

.sb-badge.sb-type-image {
  background: none;
  padding: 0;
}

.sb-badge.sb-type-hybrid img.sb-badge-icon {
  width: 14px;
  height: 14px;
  margin-inline-end: 4px;
}

.sb-badge[data-sb-countdown]::after {
  content: attr(data-sb-countdown-display);
  margin-inline-start: 4px;
  font-variant-numeric: tabular-nums;
}

.sb-badge-wrapper,
.sb-badge-wrapper-single {
  position: relative;
  display: inline-block;
}

.sb-badge-placeholder {
  padding: 10px;
  border: 1px dashed #ccc;
  text-align: center;
  font-size: 13px;
  color: #666;
}

.sb-product-preview-wrap {
  position: relative;
  display: inline-block;
  max-width: 200px;
  border: 1px solid #ddd;
  padding: 8px;
  background: #fff;
}

.sb-product-preview-wrap img {
  max-width: 100%;
  height: auto;
  display: block;
}
