/* Unified For Rent — cohesive category segmented selector + All-mode chrome */

.pg-for-rent-channel {
  --pg-fr-navy: #062b5b;
  --pg-fr-emerald: #0ba360;
  --pg-fr-emerald-deep: #087b4d;
  --pg-fr-emerald-soft: #eef9f3;
  --pg-fr-border: #d5dde8;
  --pg-fr-muted: #5a6b7d;
  --pg-fr-surface: #f4f7fb;
  margin: 0 0 16px;
  padding: 0;
}

.pg-for-rent-channel__list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  width: 100%;
  max-width: 520px;
  min-height: 42px;
  padding: 3px;
  gap: 0;
  border: 1px solid var(--pg-fr-border);
  border-radius: 10px;
  background: var(--pg-fr-surface);
  box-sizing: border-box;
}

.pg-for-rent-channel__tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  min-height: 36px;
  height: 100%;
  margin: 0;
  padding: 7px 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--pg-fr-navy) !important;
  font-weight: 600;
  font-size: 0.88rem;
  line-height: 1.15;
  text-decoration: none !important;
  text-align: center;
  white-space: nowrap;
  transition: background-color 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

.pg-for-rent-channel__tab:hover {
  color: var(--pg-fr-emerald-deep) !important;
  background: rgba(11, 163, 96, 0.08);
}

.pg-for-rent-channel__tab:focus {
  outline: none;
}

.pg-for-rent-channel__tab:focus-visible {
  outline: 2px solid var(--pg-fr-emerald);
  outline-offset: 2px;
  z-index: 1;
}

.pg-for-rent-channel__tab.is-active {
  background: var(--pg-fr-emerald);
  color: #fff !important;
  font-weight: 700;
  box-shadow: 0 1px 2px rgba(6, 43, 91, 0.12);
}

.pg-for-rent-channel__tab.is-active:hover {
  background: var(--pg-fr-emerald-deep);
  color: #fff !important;
}

.pg-for-rent-channel__label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pg-for-rent-channel__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35em;
  padding: 1px 5px;
  border-radius: 999px;
  background: rgba(6, 43, 91, 0.08);
  color: var(--pg-fr-muted);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  font-size: 0.78em;
  line-height: 1.2;
}

.pg-for-rent-channel__tab.is-active .pg-for-rent-channel__count {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

/* All Rentals: common filters only (location + price). Hide residential-only controls. */
body[data-for-rent-channel="all"] .bayut-filter-field:has(#type-filter),
body[data-for-rent-channel="all"] .bayut-filter-field:has(#bedrooms-filter),
body[data-for-rent-channel="all"] .bayut-filter-field:has(#bathrooms-filter),
body[data-for-rent-channel="all"] .bayut-filter-field:has(#furnished-filter),
body[data-for-rent-channel="all"] .bayut-filter-field:has(#min-sqft-filter),
body[data-for-rent-channel="all"] .bayut-filter-field--pills,
body[data-for-rent-channel="all"] [data-rental-needs-bar],
body[data-for-rent-channel="all"] .bayut-quick-chips,
body[data-for-rent-channel="all"] [data-listings-quick-chips],
body[data-for-rent-channel="all"] [data-fresh-recent-filter],
body[data-for-rent-channel="all"] label.bayut-filter-field:has(#fresh-recent-filter) {
  display: none !important;
}

.pg-for-rent-card-badge {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  margin: 0 0 8px;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  text-transform: uppercase;
}

.pg-for-rent-card-badge--residential {
  background: #eef9f3;
  color: #087b4d;
  border: 1px solid #b7e5cb;
}

.pg-for-rent-card-badge--commercial {
  background: #eef2f7;
  color: #062b5b;
  border: 1px solid #c5d0de;
}

@media (max-width: 430px) {
  .pg-for-rent-channel__list {
    max-width: none;
  }

  .pg-for-rent-channel__tab {
    flex-direction: column;
    gap: 2px;
    padding: 6px 4px;
    font-size: 0.78rem;
  }

  .pg-for-rent-channel__count {
    font-size: 0.72em;
    padding: 0 4px;
  }
}

@media (max-width: 320px) {
  .pg-for-rent-channel__tab {
    font-size: 0.72rem;
    padding: 6px 2px;
  }
}
