/* ==========================================================================
   hdr-618 — the scope chip in the public header, on every page.
   --------------------------------------------------------------------------
   Before this file the chip was two words and a number with no structure, and
   a leftover rule in agent-home-b-v2.css capped it at 160px, so the caption
   was permanently truncated to «دامنهٔ جست…».
   Anatomy now: [pin] caption / scope · hairline · count — the same shape as
   the mobile bar, so the two viewports describe the same control.
   ========================================================================== */

.header-city,
html[data-dg-design="editorial"] .header-city,
:root[data-dg-bazaar] .site-header a.header-city {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding-block: 5px;
  padding-inline: 12px 13px;
  max-inline-size: 300px;
}

.header-city .dgi {
  inline-size: 15px;
  block-size: 15px;
  flex: none;
  opacity: .78;
}

.header-city-txt {
  display: grid;
  gap: 1px;
  min-inline-size: 0;
  text-align: start;
  max-inline-size: none;
  overflow: visible;
  white-space: normal;
}

:root[data-dg-bazaar] .site-header a.header-city .header-city-txt > small,
.header-city .header-city-txt > small {
  display: block;
  font-size: 9.5px !important;
  line-height: 1.3 !important;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--color-muted-foreground, #526157);
  white-space: nowrap;
}

:root[data-dg-bazaar] .site-header a.header-city .header-city-txt > strong,
.header-city .header-city-txt > strong {
  display: block;
  font-size: 13px !important;
  line-height: 1.4 !important;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-inline-size: 16ch;
}

:root[data-dg-bazaar] .site-header a.header-city > .header-city-n,
.header-city > .header-city-n {
  flex: none;
  margin-inline-start: 1px;
  padding-inline-start: 10px;
  border-inline-start: 1px solid color-mix(in oklab, currentColor 20%, transparent);
  font-size: 12px !important;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  opacity: .7;
  white-space: nowrap;
}

/* ---------- the mobile bar: same three-part reading ---------- */
.mobile-city-bar small {
  font-size: 10.5px !important;
  font-weight: 700;
  line-height: 1.35;
  color: var(--color-muted-foreground, #526157);
}
.mobile-city-bar strong {
  font-size: 13.5px !important;
  font-weight: 800;
  line-height: 1.45;
  max-inline-size: 20ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mobile-city-bar .mobile-city-n {
  font-size: 10.5px !important;
  font-variant-numeric: tabular-nums;
}

/* ---------- narrower headers ---------- */
@media (max-width: 1280px) {
  .header-city,
  html[data-dg-design="editorial"] .header-city { max-inline-size: 240px; }
  .header-city .header-city-txt > strong { max-inline-size: 12ch; }
}
@media (max-width: 1100px) {
  .header-city,
  html[data-dg-design="editorial"] .header-city { max-inline-size: 200px; }
  .header-city .header-city-txt > small { display: none !important; }
  .header-city .header-city-txt > strong { font-size: 12px !important; }
}
@media (max-width: 900px) {
  .header-city { max-inline-size: 170px; }
  .header-city .header-city-txt > strong { max-inline-size: 9ch; }
}
