/*
 * Footer visitor counter, rendered by static/js/visitors.js into #visitors-root.
 * Small and muted like the rest of the Nerfies-style footer; uses the index.css tokens with fallbacks.
 * The root stays empty, and takes no space, while the counter is not configured or not reachable.
 */

#visitors-root:empty {
  display: none;
}

/* The MapMyVisitors world map under the footer text (index.html): its script sizes the map to this box's width, at
   2.04:1, so the box keeps it small and centred. */
.hx-visitor-map {
  width: min(100%, 20rem);
  margin: 1.25rem auto 0;
}

/* The complete local map is inside the SVG marker canvas; suppress the provider's separate raster map. */
.hx-visitor-map .mapmyvisitors-map {
  background-image: none !important;
  background-color: #2d78ad;
}

.hx-map-expand {
  display: block;
  margin: 0.35rem auto 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--hx-muted, #5f6b70);
  font: inherit;
  font-size: 0.8rem;
  text-decoration: underline;
  cursor: pointer;
}

.hx-map-dialog {
  width: min(94vw, 1200px);
  max-width: 94vw;
  max-height: 92vh;
  margin: auto;
  padding: 0.75rem;
  border: 0;
  border-radius: var(--hx-radius, 12px);
  background: #fff;
}

.hx-map-dialog::backdrop {
  background: rgb(0 0 0 / 55%);
}

.hx-map-close {
  display: block;
  margin: 0 0 0.75rem auto;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--hx-line, #e3e6e8);
  border-radius: 6px;
  background: #fff;
  color: var(--hx-ink, #1f2b30);
  font: inherit;
  cursor: pointer;
}

.hx-map-dialog svg,
.hx-map-dialog img {
  display: block;
  width: 100%;
  height: auto;
  background: #2d78ad;
}

.hx-visitors {
  margin-top: 1rem;
  color: var(--hx-muted, #5f6b70);
  font-size: 0.8rem;
  line-height: 1.5;
  text-align: center;
  cursor: default;
}

.hx-visitors-summary {
  margin: 0;
  font-variant-numeric: tabular-nums;
}

.hx-visitors-countries {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.2rem 0.85rem;
  margin: 0.4rem 0 0;
  padding: 0;
  list-style: none;
}

.hx-visitors-country,
.hx-visitors-more {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-variant-numeric: tabular-nums;
}

/* Keep the font list in sync with EMOJI_FONTS in static/js/visitors.js. */
.hx-visitors-flag {
  font-family: "Apple Color Emoji", "Noto Color Emoji", "Twemoji Mozilla", "Segoe UI Emoji", sans-serif;
  font-size: 1.05rem;
  line-height: 1;
}

/* Shown instead of flags where the system draws flag emoji as letters (Windows). */
.hx-visitors-code {
  padding: 0 0.3em;
  border: 1px solid var(--hx-line, #e3e6e8);
  border-radius: 3px;
  font-family: var(--hx-font-mono, ui-monospace, monospace);
  font-size: 0.7rem;
  line-height: 1.4;
}

.hx-visitors-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
