/* Floorinsite 2027 — Places Map page template (MapLibre + OpenFreeMap dark style). */
#tie-body .fi-map-page { background: var(--fi-bg); color: var(--fi-white); font-family: var(--fi-sans); }
#tie-body .fi-map-app {
  display: grid;
  grid-template-columns: minmax(320px, 400px) 1fr;
  height: clamp(600px, calc(100svh - 78px), 1400px);
  background: var(--fi-bg);
  min-width: 0;
  border-bottom: 1px solid var(--fi-line);
}
#tie-body .fi-map-panel {
  background: var(--fi-bg);
  border-right: 1px solid var(--fi-line);
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  z-index: 5;
}
#tie-body .fi-map-panel-top { padding: 20px 18px 10px; flex: 0 0 auto; min-width: 0; }
#tie-body .fi-map-panel h1 {
  margin: 0 0 6px;
  font-family: var(--fi-display);
  font-size: 1.6rem;
  letter-spacing: -0.05em;
  font-weight: 600;
  line-height: 1.1;
  color: #fff;
}
#tie-body .fi-map-lede { margin: 0 0 12px; color: var(--fi-muted); font-size: 13px; line-height: 1.45; }
#tie-body .fi-map-page .fi-map-search {
  width: 100%;
  background: var(--fi-bg-3);
  border: 1px solid var(--fi-line);
  color: #fff;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 14px;
  outline: none;
  height: auto;
}
#tie-body .fi-map-page .fi-map-search:focus { border-color: rgba(255, 255, 255, 0.28); box-shadow: none; }
#tie-body .fi-map-page .fi-map-search::placeholder { color: rgba(245, 245, 247, 0.4); }
#tie-body .fi-map-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fi-muted);
  margin: 12px 0 7px;
}
#tie-body .fi-chips { display: flex; flex-wrap: wrap; gap: 6px; }
#tie-body .fi-chips.is-scroll { max-height: 88px; overflow: auto; scrollbar-width: thin; }
#tie-body #fi-map-regions { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 5px; }
#tie-body #fi-map-regions .fi-chip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  width: 100%;
  border-radius: 10px;
  padding: 6px 8px;
  font-size: 11.5px;
}
#tie-body .fi-map-page .fi-chip {
  appearance: none;
  border: 1px solid var(--fi-line);
  background: transparent;
  color: var(--fi-white);
  border-radius: 999px;
  padding: 5px 9px;
  font: 500 12px/1.2 var(--fi-sans);
  cursor: pointer;
  text-transform: none;
  letter-spacing: 0;
  transform: none;
}
#tie-body .fi-map-page .fi-chip:hover { border-color: rgba(255, 255, 255, 0.28); background: transparent; color: #fff; }
#tie-body .fi-map-page .fi-chip.is-on { background: var(--fi-red); border-color: var(--fi-red); color: #fff; }
#tie-body .fi-map-page .fi-chip .n { opacity: 0.7; margin-left: 4px; font-variant-numeric: tabular-nums; }
#tie-body .fi-map-count {
  padding: 8px 18px;
  font-size: 12px;
  color: var(--fi-muted);
  border-top: 1px solid var(--fi-line);
}
#tie-body .fi-map-list { flex: 1; overflow: auto; padding: 4px 8px 20px; scrollbar-width: thin; }
#tie-body .fi-map-card {
  display: block;
  padding: 11px 10px;
  border-radius: 14px;
  border: 1px solid transparent;
  cursor: pointer;
}
#tie-body .fi-map-card:hover,
#tie-body .fi-map-card.is-on { background: var(--fi-bg-3); }
#tie-body .fi-map-card.is-on { border-color: var(--fi-line); }
#tie-body .fi-map-card h3 {
  margin: 0 0 3px;
  font-family: var(--fi-display);
  font-size: 14.5px;
  letter-spacing: -0.03em;
  font-weight: 600;
  color: #fff;
}
#tie-body .fi-map-card p { margin: 0; font-size: 12.5px; color: var(--fi-muted); line-height: 1.45; }
#tie-body .fi-map-card .cat { color: #ffb3ae; }
#tie-body .fi-map-card .view { font-weight: 600; color: rgba(245, 245, 247, 0.88); }
#tie-body .fi-map-card .view:hover { color: var(--fi-red-hot); }
#tie-body .fi-map-empty { color: var(--fi-muted); font-size: 13px; padding: 18px 10px; margin: 0; }
#tie-body .fi-map-stage { position: relative; min-height: 0; min-width: 0; }
#tie-body .fi-map-canvas { position: absolute; inset: 0; background: var(--fi-bg); width: 100%; height: 100%; }
#tie-body .fi-map-noscript { padding: 24px; }

/* MapLibre controls and popups, dark. */
#tie-body .fi-map-page .maplibregl-popup-content {
  background: #161618;
  color: #f5f5f7;
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  font-family: var(--fi-sans);
}
#tie-body .fi-map-page .maplibregl-popup-anchor-bottom .maplibregl-popup-tip { border-top-color: #161618; }
#tie-body .fi-map-page .maplibregl-popup-anchor-top .maplibregl-popup-tip { border-bottom-color: #161618; }
#tie-body .fi-map-page .maplibregl-popup-close-button { color: #c8c8d0; font-size: 18px; padding: 0 6px; background: transparent; }
#tie-body .fi-map-page .maplibregl-popup-content h3 { margin: 0 0 4px; font-size: 16px; letter-spacing: -0.03em; font-weight: 600; color: #fff; }
#tie-body .fi-map-page .maplibregl-popup-content p { margin: 0 0 8px; color: var(--fi-muted); font-size: 13px; }
#tie-body .fi-map-page .maplibregl-popup-content a { color: #fff; font-weight: 600; font-size: 13px; }
#tie-body .fi-map-page .maplibregl-popup-content a:hover { color: var(--fi-red-hot); }
#tie-body .fi-map-page .maplibregl-ctrl-attrib { background: rgba(11, 11, 12, 0.75); color: #8e8e96; }
#tie-body .fi-map-page .maplibregl-ctrl-attrib a { color: #c8c8d0; }
#tie-body .fi-map-page .maplibregl-ctrl-group { background: #1a1a1e; border: 1px solid var(--fi-line); box-shadow: none; }
#tie-body .fi-map-page .maplibregl-ctrl-group button { background: #1a1a1e; padding: 0; border-radius: 0; }
#tie-body .fi-map-page .maplibregl-ctrl-group button + button { border-top-color: #2a2a2e; }
#tie-body .fi-map-page .maplibregl-ctrl-group button:hover { background: #2a2a2e; }
#tie-body .fi-map-page .maplibregl-ctrl button .maplibregl-ctrl-icon { filter: invert(1); }

/* Below the map. */
#tie-body .fi-map-page .fi-map-ad { padding: 28px 24px; background: var(--fi-paper); }
#tie-body .fi-map-page .fi-map-ad .ad-frame { width: min(100%, 970px); margin: 0 auto; }
#tie-body .fi-map-page .fi-map-content { padding: 48px 0 8px; }
#tie-body .fi-map-page .fi-map-content .entry-content { color: var(--fi-ink-body); }
#tie-body .fi-map-page .fi-map-more { padding: 32px 0 56px; }
#tie-body .fi-map-page .fi-map-more .wrap { display: flex; flex-wrap: wrap; gap: 12px; }
#tie-body .fi-map-page .light { background: var(--fi-paper); color: var(--fi-ink); }
#tie-body .fi-map-page .wrap { width: min(100% - 48px, var(--fi-max)); margin-inline: auto; }
#tie-body .fi-map-page .btn {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 11px 18px;
  font: 600 13px/1.2 var(--fi-sans);
  color: #fff;
}
#tie-body .fi-map-page .btn--dark { background: var(--fi-ink); }
#tie-body .fi-map-page .btn--red { background: var(--fi-red); }
#tie-body .fi-map-page .btn:hover { background: var(--fi-red-hot); color: #fff; }
#tie-body .fi-map-page .ad-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fi-muted);
  margin: 0 0 8px;
  text-align: center;
}

@media (max-width: 800px) {
  #tie-body .fi-map-app {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(280px, 46vh) minmax(0, 1fr);
    height: auto;
    min-height: calc(100svh - 64px);
  }
  #tie-body .fi-map-panel { border-right: 0; max-height: 70vh; }
  #tie-body .fi-map-lede { display: none; }
  #tie-body .fi-map-panel-top { padding: 12px 14px 8px; }
  #tie-body .fi-map-panel h1 { font-size: 1.25rem; }
  #tie-body #fi-map-regions { display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 6px; padding-bottom: 4px; }
  #tie-body #fi-map-regions .fi-chip { width: auto; flex: 0 0 auto; font-size: 12px; padding: 5px 9px; }
  #tie-body .fi-chips.is-scroll { flex-wrap: nowrap; overflow-x: auto; max-height: none; padding-bottom: 4px; }
  #tie-body .fi-chips.is-scroll .fi-chip { flex: 0 0 auto; }
  #tie-body .fi-map-page .wrap { width: min(100% - 32px, var(--fi-max)); }
}


/* ——— 1.0.2: full-bleed layout, stats, HUD, richer cards and popups ——— */
#tie-body.fi-places-map #main-content-row,
#tie-body.fi-places-map .main-content { padding: 0 !important; margin: 0 !important; }
#tie-body .fi-map-page { width: 100%; max-width: none; }
#tie-body .fi-map-app:fullscreen { height: 100vh; }
#tie-body .fi-map-panel {
  background:
    radial-gradient(120% 40% at 0% 0%, rgba(225, 6, 0, 0.10), transparent 60%),
    var(--fi-bg);
}
#tie-body .fi-map-panel h1 { font-size: 1.85rem; letter-spacing: -0.055em; }
#tie-body .fi-map-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px;
  margin: 2px 0 14px; padding: 0;
}
#tie-body .fi-map-stats div {
  border: 1px solid var(--fi-line); border-radius: 12px; padding: 9px 10px 8px;
  background: rgba(255, 255, 255, 0.025);
}
#tie-body .fi-map-stats dt { margin: 0; font-size: 10.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--fi-muted); }
#tie-body .fi-map-stats dd {
  margin: 3px 0 0; font-family: var(--fi-display); font-size: 1.35rem; font-weight: 600;
  letter-spacing: -0.04em; color: #fff; font-variant-numeric: tabular-nums;
}
#tie-body .fi-map-stats div:first-child dd { color: #ff5a52; }
#tie-body .fi-map-searchwrap { position: relative; }
#tie-body .fi-map-searchwrap svg {
  position: absolute; left: 13px; top: 50%; width: 17px; height: 17px; transform: translateY(-50%);
  color: rgba(245, 245, 247, 0.5); pointer-events: none;
}
#tie-body .fi-map-page .fi-map-searchwrap .fi-map-search { padding-left: 40px; height: 44px; border-radius: 14px; font-size: 14.5px; }
#tie-body .fi-map-page .fi-map-search:focus { border-color: var(--fi-red); box-shadow: 0 0 0 3px rgba(225, 6, 0, 0.18); }
#tie-body .fi-map-card { position: relative; padding: 12px 12px 12px 14px; transition: background 0.15s ease, border-color 0.15s ease; }
#tie-body .fi-map-card::before {
  content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 3px;
  background: var(--fi-red); opacity: 0; transition: opacity 0.15s ease;
}
#tie-body .fi-map-card:hover::before,
#tie-body .fi-map-card.is-on::before { opacity: 1; }
#tie-body .fi-map-card:focus-visible { outline: 2px solid var(--fi-red); outline-offset: -2px; }
#tie-body .fi-map-page .fi-map-more-btn {
  display: block; width: calc(100% - 8px); margin: 10px 4px 0; padding: 11px 14px;
  border: 1px solid var(--fi-line); border-radius: 12px; background: transparent;
  color: #fff; font: 600 13px/1.2 var(--fi-sans); cursor: pointer; text-transform: none; letter-spacing: 0;
}
#tie-body .fi-map-page .fi-map-more-btn span { color: var(--fi-muted); font-weight: 500; }
#tie-body .fi-map-page .fi-map-more-btn:hover { border-color: var(--fi-red); background: rgba(225, 6, 0, 0.1); }

/* HUD over the map. */
#tie-body .fi-map-hud {
  position: absolute; top: 14px; right: 14px; z-index: 3;
  display: flex; align-items: center; gap: 12px;
  padding: 8px 8px 8px 16px; border-radius: 999px;
  background: rgba(11, 11, 12, 0.78); border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  color: #fff; font: 500 13px/1 var(--fi-sans);
  max-width: calc(100% - 90px);
}
#tie-body .fi-map-hud-count strong { font-family: var(--fi-display); font-size: 1.15rem; letter-spacing: -0.03em; color: #fff; font-variant-numeric: tabular-nums; }
#tie-body .fi-map-hud-count span { color: var(--fi-muted); }
#tie-body .fi-map-hud-scope {
  padding-left: 12px; border-left: 1px solid rgba(255, 255, 255, 0.14); color: #ffb3ae;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0;
}
#tie-body .fi-map-page .fi-map-reset {
  border: 0; border-radius: 999px; padding: 8px 13px; background: rgba(255, 255, 255, 0.08);
  color: #fff; font: 600 12px/1 var(--fi-sans); cursor: pointer; text-transform: none; letter-spacing: 0;
}
#tie-body .fi-map-page .fi-map-reset:hover { background: var(--fi-red); }

/* Listing popup card. */
#tie-body .fi-map-page .fi-pop .maplibregl-popup-content {
  padding: 16px 18px 16px; border-radius: 16px; border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, #1b1b1f, #131315);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
}
#tie-body .fi-map-page .fi-pop .maplibregl-popup-close-button { top: 6px; right: 6px; font-size: 20px; line-height: 1; }
#tie-body .fi-map-page .fi-pop-cats { display: flex; flex-wrap: wrap; gap: 5px; margin: 0 22px 8px 0; }
#tie-body .fi-map-page .fi-pop-cats span {
  padding: 3px 8px; border-radius: 999px; background: rgba(225, 6, 0, 0.16); color: #ffb3ae;
  font-size: 11px; font-weight: 600;
}
#tie-body .fi-map-page .fi-pop .maplibregl-popup-content h3 {
  margin: 0 22px 6px 0; font-family: var(--fi-display); font-size: 18px; line-height: 1.15; letter-spacing: -0.035em;
}
#tie-body .fi-map-page .fi-pop-loc { display: flex; align-items: center; gap: 6px; margin: 0 0 12px; color: var(--fi-muted); font-size: 13px; }
#tie-body .fi-map-page .fi-pop-loc svg { width: 14px; height: 14px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 2; }
#tie-body .fi-map-page .maplibregl-popup-content a.fi-pop-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border-radius: 999px;
  background: var(--fi-red); color: #fff; font-size: 13px; font-weight: 600;
}
#tie-body .fi-map-page .maplibregl-popup-content a.fi-pop-btn:hover { background: var(--fi-red-hot); color: #fff; }
#tie-body .fi-map-page .fi-pop.maplibregl-popup-anchor-bottom .maplibregl-popup-tip { border-top-color: #131315; }
#tie-body .fi-map-page .fi-pop.maplibregl-popup-anchor-top .maplibregl-popup-tip { border-bottom-color: #1b1b1f; }

@media (max-width: 800px) {
  #tie-body .fi-map-app { grid-template-rows: minmax(300px, 52svh) minmax(0, 1fr); }
  #tie-body .fi-map-stage { order: -1; border-bottom: 1px solid var(--fi-line); min-height: 300px; }
  #tie-body .fi-map-stats { margin-bottom: 10px; }
  #tie-body .fi-map-stats dd { font-size: 1.1rem; }
  #tie-body .fi-map-hud { top: 10px; right: 10px; left: 56px; max-width: none; justify-content: space-between; gap: 8px; padding: 6px 6px 6px 12px; font-size: 12px; }
  #tie-body .fi-map-hud-count strong { font-size: 1rem; }
  #tie-body .fi-map-panel { max-height: none; }
  #tie-body .fi-map-list { max-height: 60svh; }
}
