/* Social-proof badge — property sidebar + project header */
.pd-dynamic-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  max-width: 100%;
  margin: 0.65rem 0 0;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.35;
}

.pd-dynamic-badge__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.9rem;
  color: #ea580c;
}

.pd-dynamic-badge__text {
  min-width: 0;
}

/* Loaded only after backend confirms apply_voucher=true. */
.pd-offer-available {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  width: fit-content;
  max-width: 100%;
  margin-top: 0.65rem;
  padding: 0.5rem 0.8rem;
  border: 1px solid #fde68a;
  border-radius: 10px;
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  color: #92400e;
  box-shadow: 0 5px 14px rgba(217, 119, 6, 0.12);
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.35;
}

.pd-offer-available__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  font-size: 1rem;
}

.pd-title-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
}

.pd-title-badges .pd-listing-intent--title {
  margin-bottom: 0;
}

.pd-hero-badges {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  z-index: 6;
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  flex-wrap: wrap;
  gap: 0.5rem;
  width: calc(100% - 1.7rem);
  max-width: calc(100% - 1.7rem);
}

.pd-hero-badges .pd-listing-intent--hero {
  position: static;
}

.pd-offer-available--property {
  margin-left: 0;
  margin-top: 0;
  padding: 0.38rem 0.8rem;
  border-color: rgba(30, 95, 122, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: #1e5f7a;
  box-shadow: 0 4px 14px rgba(30, 95, 122, 0.12);
  -webkit-backdrop-filter: blur(8px) saturate(125%);
  backdrop-filter: blur(8px) saturate(125%);
  font-size: 0.72rem;
  line-height: 1;
  text-transform: uppercase;
}

.pd-offer-available--property .pd-offer-available__icon {
  font-size: 0.85rem;
}

.pd-offer-available--project {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 4;
  margin: 0;
  border-color: rgba(255, 255, 255, 0.55);
  background: rgba(15, 23, 42, 0.48);
  color: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.22);
  -webkit-backdrop-filter: blur(10px) saturate(130%);
  backdrop-filter: blur(10px) saturate(130%);
  font-family: "Poppins", sans-serif;
  pointer-events: none;
}

@media (max-width: 640px) {
  .pd-offer-available--project {
    top: 10px;
    left: 10px;
    padding: 0.42rem 0.65rem;
    font-size: 0.75rem;
  }
}

.pv-header-left .pd-dynamic-badge {
  margin-top: 0.75rem;
  border-radius: 8px;
}

/* Project detail header — Housing-style recommendation chip */
.pv-header-left > #dynamic-badge.pd-dynamic-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  max-width: min(100%, 28rem);
  margin-top: 0.85rem;
  padding: 0.55rem 0.9rem 0.55rem 0.55rem;
  border-radius: 10px;
  border: 1px solid rgba(249, 115, 22, 0.28);
  background:
    linear-gradient(90deg, rgba(249, 115, 22, 0.12) 0%, transparent 42%),
    linear-gradient(135deg, #fff7ed 0%, #ffedd5 48%, #fff 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.85) inset,
    0 8px 20px rgba(249, 115, 22, 0.12);
  color: #9a3412;
  font-family: "Poppins", "Plus Jakarta Sans", sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.35;
  white-space: normal;
  animation: pd-badge-in 0.45s ease-out both;
}

.pv-header-left > #dynamic-badge .pd-dynamic-badge__icon {
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  background: linear-gradient(145deg, #fb923c 0%, #ea580c 100%);
  color: #fff;
  font-size: 0.72rem;
  box-shadow: 0 3px 8px rgba(234, 88, 12, 0.35);
}

.pv-header-left > #dynamic-badge #dynamic-badge-text,
.pv-header-left > #dynamic-badge .pd-dynamic-badge__text {
  min-width: 0;
}

@keyframes pd-badge-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .pv-header-left > #dynamic-badge.pd-dynamic-badge {
    animation: none;
  }
}

/* Property detail sidebar — full-width, single-line, attention strip */
.pd-sidebar > #dynamic-badge.pd-dynamic-badge {
  display: flex;
  width: 100%;
  box-sizing: border-box;
  margin: 0.85rem 0 0;
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  border: 1px solid #fdba74;
  background: linear-gradient(105deg, #fff7ed 0%, #ffedd5 55%, #fed7aa 100%);
  box-shadow: 0 6px 16px rgba(234, 88, 12, 0.14);
  color: #9a3412;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
}

.pd-sidebar > #dynamic-badge .pd-dynamic-badge__icon {
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 50%;
  background: #ea580c;
  color: #fff;
  font-size: 0.72rem;
  box-shadow: 0 2px 6px rgba(234, 88, 12, 0.35);
}

.pd-sidebar > #dynamic-badge .pd-dynamic-badge__text {
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
