/* =============================================================================
 * x99 Conversion Engine — Visual badges + discount prices.
 * WS7.4 (2026-05-07). Consumes design tokens only (zero hardcoded colors).
 * =========================================================================== */

/* --- Product card badge (top-right corner) --- */
.x99-conv-badge {
  position: absolute;
  top: var(--sp-3);
  right: var(--sp-3);
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  padding: var(--sp-1) var(--sp-3);
  border-radius: 8px;  /* squircle-like: continuous curve, not full pill */
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-kicker);
  text-transform: uppercase;
  line-height: 1;
  pointer-events: none;
  z-index: 2;
}

.x99-conv-badge--popular {
  background: rgba(var(--accent-rgb), 0.18);
  color: var(--c-accent);
  font-weight: var(--fw-semi);
}

:root[data-theme="light"] .x99-conv-badge--popular {
  background: rgba(220, 38, 38, 0.12);
  color: #b91c1c;
}

.x99-conv-badge--geo {
  background: var(--c-success-soft);
  color: var(--c-success);
}

.x99-conv-badge--discount {
  background: var(--c-warning-soft);
  color: var(--c-warning);
}

/* --- Low-stock city options: stock text turns red, arrow stays --- */
.x99-order-bmcard-city-opt--low .x99-order-bmcard-city-opt-stock {
  color: var(--c-danger) !important;
  font-weight: var(--fw-bold);
}

/* Highlight the city row when low stock — text + entire row gets danger tint */
.x99-order-bmcard-city-opt--low .x99-order-bmcard-city-opt-stock {
  color: var(--c-danger);
  font-weight: var(--fw-semi);
}

.x99-order-bmcard-city-opt--low .x99-order-bmcard-city-opt-name {
  color: var(--c-danger);
}

/* --- Price with discount (strikethrough original + special price) --- */
.x99-conv-price-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.x99-conv-price-original {
  font-size: var(--fs-sm);
  color: var(--c-text-muted);
  text-decoration: line-through;
  text-decoration-color: var(--c-danger);
}

.x99-conv-price-special {
  font-size: var(--fs-md);
  font-weight: var(--fw-semi);
  color: var(--c-success);
}

.x99-conv-price-savings {
  font-size: var(--fs-xs);
  color: var(--c-success);
  opacity: 0.85;
}

/* --- Badge dot indicator (small squircle before label) --- */
.x99-conv-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 2px;  /* squircle micro */
  background: currentColor;
  flex-shrink: 0;
}

/* --- Ensure card has position:relative for absolute badge --- */
.x99-order-bmcard,
.x99-order-vpscard {
  position: relative;
}

/* --- Subtle entrance animation for badges --- */
@keyframes x99-conv-badge-in {
  from {
    opacity: 0;
    transform: translateY(-4px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.x99-conv-badge {
  animation: x99-conv-badge-in var(--dur-enter) var(--ease-out) both;
}
