/**
 * Havenlytics Pro — Premium Badge (theme-agnostic base styles).
 * Themes may override via higher-specificity selectors / CSS variables.
 *
 * Canonical chip metrics are owned here so every surface (home, archives,
 * singles, About, Elementor) shares the same polished presentation when this
 * stylesheet is enqueued. Variant colors/icons remain per-badge.
 */

.hvnly-pro-badge-list {
  --hvnly-pro-badge-bg: #0f172a;
  --hvnly-pro-badge-fg: #ffffff;
  --hvnly-pro-badge-radius: 999px;
  --hvnly-pro-badge-gap: 0.35rem;
  --hvnly-pro-badge-fs: 0.6875rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--hvnly-pro-badge-gap);
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 100%;
  pointer-events: none;
  z-index: 2;
  box-sizing: border-box;
  line-height: 1;
  font-size: var(--hvnly-pro-badge-fs);
  font-weight: 600;
  text-transform: none;
  letter-spacing: normal;
}

.hvnly-pro-badge-list *,
.hvnly-pro-badge-list *::before,
.hvnly-pro-badge-list *::after {
  box-sizing: border-box;
}

.hvnly-pro-badge {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  margin: 0;
  padding: 0.28rem 0.55rem;
  border: 0;
  border-radius: var(--hvnly-pro-badge-radius);
  background: var(--hvnly-pro-badge-bg);
  color: var(--hvnly-pro-badge-fg);
  font-family: inherit;
  font-size: var(--hvnly-pro-badge-fs);
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.2;
  text-align: left;
  text-decoration: none;
  text-transform: none;
  vertical-align: middle;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.18);
}

.hvnly-pro-badge__inner {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  min-width: 0;
  max-width: 100%;
}

.hvnly-pro-badge__label {
  display: inline-block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 9.5rem;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  line-height: inherit;
  color: inherit;
}

.hvnly-pro-badge__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  font-size: 0.75rem;
  line-height: 1;
  width: 0.75rem;
  height: 0.75rem;
}

.hvnly-pro-badge__image {
  display: block;
  width: 1.25rem;
  height: 1.25rem;
  max-width: 1.25rem;
  max-height: 1.25rem;
  object-fit: contain;
  border-radius: 2px;
  flex: 0 0 auto;
  transform: none;
}

.hvnly-pro-badge--image {
  padding: 0.2rem 0.35rem;
  background: rgba(255, 255, 255, 0.92);
  color: #0f172a;
}

/* Standalone card mount (when Theme does not host chips). */
.hvnly-pro-badge-list--card {
  position: absolute;
  top: 0.65rem;
  left: 0.65rem;
  right: auto;
  max-width: calc(100% - 5.5rem);
}

/* Embedded in Theme overlay / hero badge rows. */
.hvnly-pro-badge-list--overlay,
.hvnly-pro-badge-list--single {
  position: static;
  display: inline-flex;
}

/*
 * Compact inline surfaces: title rows, agent/agency cards & profiles.
 * Same metrics as polished homepage title_inline chips — one SSOT.
 */
.hvnly-pro-badge-list--title_inline,
.hvnly-pro-badge-list--agent_card,
.hvnly-pro-badge-list--agent_profile,
.hvnly-pro-badge-list--agency_card,
.hvnly-pro-badge-list--agency_profile {
  position: static;
  display: inline-flex;
  flex: 1 1 auto;
  align-items: center;
  margin: 0;
  max-width: 100%;
  vertical-align: middle;
}

.hvnly-pro-badge-list--agent_card,
.hvnly-pro-badge-list--agent_profile,
.hvnly-pro-badge-list--agency_card,
.hvnly-pro-badge-list--agency_profile {
  margin: 0.35rem 0 0;
  flex: 0 1 auto;
}

.hvnly-pro-badge-list--title_inline .hvnly-pro-badge,
.hvnly-pro-badge-list--agent_card .hvnly-pro-badge,
.hvnly-pro-badge-list--agent_profile .hvnly-pro-badge,
.hvnly-pro-badge-list--agency_card .hvnly-pro-badge,
.hvnly-pro-badge-list--agency_profile .hvnly-pro-badge {
  --hvnly-pro-badge-fs: 0.625rem;
  padding: 0.18rem 0.45rem;
  box-shadow: none;
}

.hvnly-pro-badge-list--title_inline .hvnly-pro-badge__label,
.hvnly-pro-badge-list--agent_card .hvnly-pro-badge__label,
.hvnly-pro-badge-list--agent_profile .hvnly-pro-badge__label,
.hvnly-pro-badge-list--agency_card .hvnly-pro-badge__label,
.hvnly-pro-badge-list--agency_profile .hvnly-pro-badge__label {
  max-width: 8rem;
  white-space: nowrap;
}

.hvnly-pro-badge__preset {
  display: block;
  width: 0.875rem;
  height: 0.875rem;
  max-width: 0.875rem;
  max-height: 0.875rem;
  object-fit: contain;
  flex: 0 0 auto;
  transform: none;
}

.hvnly-pro-badge--preset {
  gap: 0;
}

.hvnly-pro-badge__icon--preset {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  width: 0.875rem;
  height: 0.875rem;
}

@media (max-width: 900px) {
  .hvnly-pro-badge {
    --hvnly-pro-badge-fs: 0.625rem;
    padding: 0.22rem 0.45rem;
  }

  .hvnly-pro-badge__label {
    max-width: 7.5rem;
  }

  .hvnly-pro-badge-list--card {
    top: 0.5rem;
    left: 0.5rem;
    max-width: calc(100% - 4.75rem);
  }

  .hvnly-pro-badge-list--title_inline .hvnly-pro-badge__label,
  .hvnly-pro-badge-list--agent_card .hvnly-pro-badge__label,
  .hvnly-pro-badge-list--agent_profile .hvnly-pro-badge__label,
  .hvnly-pro-badge-list--agency_card .hvnly-pro-badge__label,
  .hvnly-pro-badge-list--agency_profile .hvnly-pro-badge__label {
    max-width: 6.5rem;
  }
}

@media (max-width: 420px) {
  .hvnly-pro-badge-list--title_inline .hvnly-pro-badge__label,
  .hvnly-pro-badge-list--agent_card .hvnly-pro-badge__label,
  .hvnly-pro-badge-list--agent_profile .hvnly-pro-badge__label,
  .hvnly-pro-badge-list--agency_card .hvnly-pro-badge__label,
  .hvnly-pro-badge-list--agency_profile .hvnly-pro-badge__label {
    max-width: 5.25rem;
  }
}
