/* ============================================
   BADGE COMPONENTS
   ============================================ */

/* Base Badge */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 4px 10px;
  font-size: var(--text-xs);
  font-weight: var(--font-weight-semibold);
  border-radius: 999px;
  white-space: nowrap;
}

/* Badge Variants */
.badge-primary {
  background: var(--color-primary-light);
  color: var(--color-primary);
}

.badge-secondary {
  background: var(--color-secondary-light);
  color: var(--color-secondary);
}

.badge-success {
  background: var(--color-success-light);
  color: var(--color-success);
}

.badge-warning {
  background: var(--color-warning-light);
  color: var(--color-warning);
}

.badge-danger {
  background: var(--color-danger-light);
  color: var(--color-danger);
}

.badge-info {
  background: var(--color-info-light);
  color: var(--color-info);
}

.badge-neutral {
  background: var(--neutral-100);
  color: var(--neutral-700);
}

/* Condition Badges */
.condition-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 4px 12px;
  font-size: var(--text-xs);
  font-weight: var(--font-weight-semibold);
  border-radius: 999px;
}

.condition-badge.new {
  background: #dbeafe;
  color: #0046be;
}

.condition-badge.like-new {
  background: #e0e7ff;
  color: #003399;
}

.condition-badge.fair {
  background: #fef3c7;
  color: #92400e;
}

.condition-badge.good {
  background: #dbeafe;
  color: #1e40af;
}

.condition-badge.excellent {
  background: #fff8e1;
  color: #b89200;
}

/* Product Card Condition Badge */
.product-card-badge {
  position: absolute;
  top: var(--space-sm);
  left: var(--space-sm);
  padding: 4px 10px;
  font-size: var(--text-xs);
  font-weight: var(--font-weight-semibold);
  border-radius: var(--radius-md);
  text-transform: capitalize;
}

.product-card-badge.new {
  background: rgba(219, 234, 254, 0.95);
  color: #0046be;
}

.product-card-badge.like-new {
  background: rgba(224, 231, 254, 0.95);
  color: #003399;
}

.product-card-badge.fair {
  background: rgba(254, 243, 199, 0.95);
  color: #92400e;
}

.product-card-badge.good {
  background: rgba(219, 234, 254, 0.95);
  color: #1e40af;
}

.product-card-badge.excellent {
  background: rgba(255, 248, 225, 0.95);
  color: #b89200;
}

/* Status Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 4px 12px;
  font-size: var(--text-xs);
  font-weight: var(--font-weight-semibold);
  border-radius: 999px;
}

.status-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.status-badge.placed {
  background: #dbeafe;
  color: #0046be;
}

.status-badge.confirmed {
  background: #d1fae5;
  color: #065f46;
}

.status-badge.in-transit {
  background: #fef3c7;
  color: #92400e;
}

.status-badge.delivered {
  background: #d1fae5;
  color: #047857;
}

.status-badge.cancelled {
  background: #fee2e2;
  color: #b91c1c;
}

/* Role Badges */
.role-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 4px 10px;
  font-size: var(--text-xs);
  font-weight: var(--font-weight-semibold);
  border-radius: 999px;
  text-transform: capitalize;
}

.role-badge.buyer {
  background: #dbeafe;
  color: #0046be;
}

.role-badge.seller {
  background: #fef3c7;
  color: #92400e;
}

.role-badge.admin {
  background: #fee2e2;
  color: #b91c1c;
}

/* Verified Badge */
.verified-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #ffffff;
  font-size: 10px;
}

/* Trust Badges */
.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: var(--font-weight-semibold);
  border-radius: 999px;
  white-space: nowrap;
}

.trust-badge-top-seller {
  background: #fef3c7;
  color: #92400e;
}

.trust-badge-verified {
  background: #d1fae5;
  color: #065f46;
}

.trust-badge-secure {
  background: #dbeafe;
  color: #1e40af;
}

.trust-badge-buyer-protect {
  background: #dbeafe;
  color: #0046be;
}

.trust-badge svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

/* New Badge */
.new-badge {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  background: var(--color-danger);
  color: #ffffff;
  padding: 2px 8px;
  font-size: var(--text-xs);
  font-weight: var(--font-weight-semibold);
  border-radius: 999px;
  text-transform: uppercase;
}

/* Sale Badge */
.sale-badge {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  background: var(--color-warning);
  color: #ffffff;
  padding: 4px 10px;
  font-size: var(--text-xs);
  font-weight: var(--font-weight-semibold);
  border-radius: var(--radius-md);
  text-transform: uppercase;
}

/* Discount Badge */
.discount-badge {
  background: var(--color-danger);
  color: #ffffff;
  padding: 4px 10px;
  font-size: var(--text-xs);
  font-weight: var(--font-weight-semibold);
  border-radius: var(--radius-md);
}

/* University Badge */
.university-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 6px 12px;
  font-size: var(--text-sm);
  font-weight: var(--font-weight-medium);
  background: var(--neutral-100);
  color: var(--color-text);
  border-radius: var(--radius-lg);
}

/* Delivery Badge */
.delivery-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 6px 12px;
  font-size: var(--text-sm);
  font-weight: var(--font-weight-medium);
  border-radius: var(--radius-lg);
}

.delivery-badge.bolt {
  background: #fef3c7;
  color: #92400e;
}

.delivery-badge.yango {
  background: #dbeafe;
  color: #0046be;
}

.delivery-badge.inperson {
  background: #d1fae5;
  color: #065f46;
}

/* Badge Sizes */
.badge-sm {
  padding: 2px 8px;
  font-size: 10px;
}

.badge-lg {
  padding: 6px 16px;
  font-size: var(--text-sm);
}

/* Badge with Icon */
.badge-icon {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
}

/* Animated Badge */
.badge-animated {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

/* ============================================
   DARK MODE OVERRIDES
   ============================================ */
[data-theme='dark'] .condition-badge.new {
  background: rgba(109, 158, 255, 0.15);
  color: #6d9eff;
}

[data-theme='dark'] .condition-badge.like-new {
  background: rgba(77, 127, 219, 0.15);
  color: #4d7fdb;
}

[data-theme='dark'] .condition-badge.fair {
  background: rgba(255, 183, 77, 0.15);
  color: #ffb74d;
}

[data-theme='dark'] .condition-badge.good {
  background: rgba(102, 187, 106, 0.15);
  color: #66bb6a;
}

[data-theme='dark'] .condition-badge.excellent {
  background: rgba(255, 206, 0, 0.15);
  color: #ffce00;
}

[data-theme='dark'] .product-card-badge.new {
  background: rgba(109, 158, 255, 0.15);
  color: #6d9eff;
}

[data-theme='dark'] .product-card-badge.like-new {
  background: rgba(77, 127, 219, 0.15);
  color: #4d7fdb;
}

[data-theme='dark'] .product-card-badge.fair {
  background: rgba(255, 183, 77, 0.15);
  color: #ffb74d;
}

[data-theme='dark'] .product-card-badge.good {
  background: rgba(102, 187, 106, 0.15);
  color: #66bb6a;
}

[data-theme='dark'] .product-card-badge.excellent {
  background: rgba(255, 206, 0, 0.15);
  color: #ffce00;
}

[data-theme='dark'] .status-badge.placed {
  background: rgba(109, 158, 255, 0.15);
  color: #6d9eff;
}

[data-theme='dark'] .status-badge.confirmed {
  background: rgba(76, 175, 80, 0.15);
  color: #4caf50;
}

[data-theme='dark'] .status-badge.in-transit {
  background: rgba(255, 183, 77, 0.15);
  color: #ffb74d;
}

[data-theme='dark'] .status-badge.delivered {
  background: rgba(76, 175, 80, 0.15);
  color: #66bb6a;
}

[data-theme='dark'] .status-badge.cancelled {
  background: rgba(239, 83, 80, 0.15);
  color: #ef5350;
}

[data-theme='dark'] .role-badge.buyer {
  background: rgba(109, 158, 255, 0.15);
  color: #6d9eff;
}

[data-theme='dark'] .role-badge.seller {
  background: rgba(255, 183, 77, 0.15);
  color: #ffb74d;
}

[data-theme='dark'] .role-badge.admin {
  background: rgba(239, 83, 80, 0.15);
  color: #ef5350;
}

[data-theme='dark'] .trust-badge-top-seller {
  background: rgba(255, 183, 77, 0.15);
  color: #ffb74d;
}

[data-theme='dark'] .trust-badge-verified {
  background: rgba(76, 175, 80, 0.15);
  color: #4caf50;
}

[data-theme='dark'] .trust-badge-secure {
  background: rgba(109, 158, 255, 0.15);
  color: #6d9eff;
}

[data-theme='dark'] .trust-badge-buyer-protect {
  background: rgba(109, 158, 255, 0.15);
  color: #6d9eff;
}

[data-theme='dark'] .delivery-badge.bolt {
  background: rgba(255, 183, 77, 0.15);
  color: #ffb74d;
}

[data-theme='dark'] .delivery-badge.yango {
  background: rgba(109, 158, 255, 0.15);
  color: #6d9eff;
}

[data-theme='dark'] .delivery-badge.inperson {
  background: rgba(76, 175, 80, 0.15);
  color: #4caf50;
}
