/* Website-only layout around the shared, public Studio map runtime. */
html { box-sizing: border-box; }
*, *::before, *::after { box-sizing: inherit; }
body.tx-public-discover {
  --tx-map-control-bg: #101813;
  font: 14px/1.45 var(--tx-font-ui, system-ui, sans-serif);
}
.tx-public-discover button, .tx-public-discover input, .tx-public-discover select { font-family: inherit; }
.tx-public-discover button:focus-visible, .tx-public-discover a:focus-visible,
.tx-public-discover input:focus-visible, .tx-public-discover select:focus-visible {
  outline: 3px solid #44754d; outline-offset: 2px;
}

/* A single, predictable header keeps branding, search and controls apart. */
.tx-public-discover .tx-discover-brandbar {
  padding: 0; border: 0; border-radius: 0;
  background: transparent; box-shadow: none; backdrop-filter: none;
}
/* Preserve the shared runtime artwork and wordmark sizing. */
.tx-public-discover .tx-discover-brandbar img {
  filter: none;
}
.tx-public-discover .tx-public-badge { display: none; }
.tx-public-discover .tx-discover-searchbar { align-items: center; }
.tx-public-discover .tx-discover-searchbar,
.tx-public-discover .tx-discover-brandbar button,
.tx-public-discover .tx-discover-brandbar .tx-public-studio-link,
.tx-public-discover .tx-discover-searchbar button,
.tx-public-discover .tx-discover-map-actions button,
.tx-public-discover .tx-discover-v2 .tx-map-toolbar button,
body.tx-public-discover:has(#discover-map.active) .tx-ai-launcher {
  background: var(--tx-map-control-bg); color: #fff;
}
.tx-public-discover .tx-discover-layer-panel,
.tx-public-discover .tx-discover-filter-panel {
  overflow-y: auto;
  overscroll-behavior: contain; scrollbar-gutter: stable;
}
.tx-public-discover .tx-discover-panel-head {
  position: sticky; top: -16px; z-index: 1; margin-top: -16px;
  padding-top: 16px; padding-bottom: 8px; background: var(--tx-paper);
}
.tx-public-discover .tx-discover-layer-option { flex-shrink: 0; }

/* The loading/error fallback remains usable even if the shared runtime fails. */
body > .tx-public-home-link {
  position: fixed; top: 14px; left: 14px; z-index: 20;
  padding: 12px 18px; border: 1px solid #66786b; border-radius: 14px;
  background: var(--tx-map-control-bg); color: white; text-decoration: none; font-weight: 600;
}
#discover-loading { position: fixed; inset: 45% 20px auto; text-align: center; color: #f7f8f2; }
#discover-loading[hidden] { display: none; }

@media (max-width: 980px) {
  .tx-public-discover .tx-discover-searchbar input { font-size: 16px; }
}

/* The homepage frame is a preview: preserve map imagery, cards and attribution. */
.tx-public-embed :is(.tx-discover-brandbar, .tx-discover-searchbar,
  .tx-public-home-link, .tx-discover-drawer, .tx-discover-map-actions,
  .tx-discover-layer-panel, .tx-discover-filter-panel, .tx-map-toolbar,
  .tx-ride-nav, .tx-ride-card, .tx-discover-resize-handle,
  .maplibregl-ctrl-top-right, .mapboxgl-ctrl-top-right) { display: none !important; }
.tx-public-embed .tx-map-message { top: 40%; bottom: auto; }
/* Keep the live map credits readable without a bright card in the homepage. */
.tx-public-embed :is(.maplibregl-ctrl-bottom-right, .mapboxgl-ctrl-bottom-right) { width: 100%; }
.tx-public-embed :is(.maplibregl-ctrl.maplibregl-ctrl-attrib, .mapboxgl-ctrl.mapboxgl-ctrl-attrib) {
  box-sizing: border-box; width: 100%; margin: 0; padding: 4px 8px;
  border-radius: 0; background: #0d1611eb; color: #d7ded2;
  font: 12px/1.4 var(--tx-font-ui, system-ui, sans-serif);
}
.tx-public-embed :is(.maplibregl-ctrl-attrib.maplibregl-compact, .mapboxgl-ctrl-attrib.mapboxgl-compact) { padding-right: 32px; }
.tx-public-embed :is(.maplibregl-ctrl-attrib, .mapboxgl-ctrl-attrib) a { color: inherit; }
.tx-public-embed :is(.maplibregl-ctrl-attrib .maplibregl-ctrl-attrib-button, .mapboxgl-ctrl-attrib .mapboxgl-ctrl-attrib-button) {
  top: 4px; right: 4px; background-color: transparent; filter: invert(1);
}
@media (prefers-reduced-motion: reduce) {
  .tx-public-discover *, .tx-public-discover *::before, .tx-public-discover *::after {
    transition: none !important; animation: none !important;
  }
}

.tx-public-embed .tx-discover-header{display:none!important}
.tx-public-embed .tx-discover-v2 .tx-discover-stage{grid-template-rows:minmax(0,1fr)}



/* Shared Admin Studio navigation treatment (homepage and Discover). */
.tx-admin-studio-link{display:inline-flex;align-items:center;justify-content:center;min-height:36px;padding:0 12px;border:1px solid #53614f;border-radius:7px;background:#17231b;color:#eaf4e4!important;font:600 14px/1.2 Arial,sans-serif;text-decoration:none;white-space:nowrap}.tx-admin-studio-link:hover{background:#293b28;border-color:#b6e466}.tx-admin-studio-link:focus-visible{outline:2px solid #b6e466;outline-offset:3px}
