/* Phone map dashboard -- the Pins tab of the map control sheet
   (static/js/mobile-map-dashboard.js). The desktop map dashboard's
   information in the compact owner look: 13px system type, tabular figures,
   1px hairline cards at 12px radius, no glass.

   Scoped under #mmd and restating colour with !important on the leaf: the
   phone's blanket theme sweeps ([data-theme=light] * * *, the button glass
   rule) otherwise repaint it. Uses mobile-map-pins.css's --mmp-* tokens. */

#map-control-section-pins { padding: 0; }
html body #mmd {
  --mmd-edge: var(--mmp-line, #e6e6e9);
  --mmd-soft: rgba(127, 127, 140, 0.08);
  --mmd-gold: #d4a106;
  display: flex; flex-direction: column; gap: 10px;
  font: 500 13px/1.35 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-variant-numeric: tabular-nums;
  color: var(--mmp-ink) !important; -webkit-text-fill-color: var(--mmp-ink) !important;
}
html body #mmd * { box-sizing: border-box; font-family: inherit; color: inherit !important; -webkit-text-fill-color: currentColor !important; }

html body #mmd .mmd-note { margin: 0; padding: 8px 10px; border-radius: 8px; background: rgba(245, 158, 11, 0.14) !important; color: #b45309 !important; -webkit-text-fill-color: #b45309 !important; font-size: 12.5px; }

/* Tiles */
#mmd .mmd-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
html body #mmd .mmd-tile {
  display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; min-height: 70px;
  border-radius: 12px; border: 1px solid var(--mmd-edge) !important; background: var(--mmp-bg) !important;
}
html body #mmd .mmd-tile__label { font-size: 12px; color: var(--mmp-dim) !important; -webkit-text-fill-color: var(--mmp-dim) !important; }
html body #mmd .mmd-tile__value { font-size: 21px; font-weight: 650; letter-spacing: -0.02em; line-height: 1.1; }
html body #mmd .mmd-tile__value.is-untracked { font-size: 13px; font-weight: 500; color: var(--mmp-faint) !important; -webkit-text-fill-color: var(--mmp-faint) !important; }
html body #mmd .mmd-tile__sub { font-size: 11px; color: var(--mmp-faint) !important; -webkit-text-fill-color: var(--mmp-faint) !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html body #mmd .mmd-skel { background: var(--mmd-soft) !important; border-color: transparent !important; }

/* Cards */
html body #mmd .mmd-card {
  border-radius: 12px; border: 1px solid var(--mmd-edge) !important; background: var(--mmp-bg) !important; overflow: hidden;
}
#mmd .mmd-card__head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 10px 12px 6px; }
#mmd .mmd-card__head h3 { margin: 0; font-size: 13.5px; font-weight: 650; }
html body #mmd .mmd-card__meta { font-size: 12px; color: var(--mmp-faint) !important; -webkit-text-fill-color: var(--mmp-faint) !important; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60%; }
html body #mmd .mmd-empty { margin: 0; padding: 4px 12px 12px; font-size: 12.5px; color: var(--mmp-faint) !important; -webkit-text-fill-color: var(--mmp-faint) !important; }

/* Sponsor summary */
#mmd .mmd-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 0 12px 8px; }
html body #mmd .mmd-stats > div { display: flex; flex-direction: column; gap: 1px; padding: 7px 9px; border-radius: 8px; background: var(--mmd-soft) !important; }
html body #mmd .mmd-stats span { font-size: 11.5px; color: var(--mmp-dim) !important; -webkit-text-fill-color: var(--mmp-dim) !important; }
#mmd .mmd-stats b { font-size: 17px; font-weight: 650; }
html body #mmd .mmd-sponrow {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 6px 12px; text-align: left;
  border: 0 !important; border-top: 1px solid var(--mmd-edge) !important; border-radius: 0; background: transparent !important;
  box-shadow: none !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
}
#mmd .mmd-sponrow__t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
#mmd .mmd-sponrow__t b { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html body #mmd .mmd-sponrow__t small { font-size: 11.5px; color: var(--mmp-dim) !important; -webkit-text-fill-color: var(--mmp-dim) !important; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html body #mmd .mmd-logo {
  width: 28px; height: 28px; border-radius: 7px; flex: 0 0 auto; overflow: hidden; display: grid; place-items: center;
  background: #ffffff !important; color: #111113 !important; -webkit-text-fill-color: #111113 !important;
  font-size: 12px; font-weight: 700; box-shadow: 0 0 0 1.5px var(--mmd-gold) !important;
}
#mmd .mmd-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
html body #mmd .mmd-pill {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 7px; border-radius: 6px;
  font-size: 11px; font-weight: 600; background: var(--mmd-soft) !important; color: var(--mmp-dim) !important; -webkit-text-fill-color: var(--mmp-dim) !important;
}
html body #mmd .mmd-pill.is-live { background: rgba(22, 163, 74, 0.12) !important; color: #15803d !important; -webkit-text-fill-color: #15803d !important; }
html body #mmd .mmd-pill.is-scheduled { background: rgba(245, 158, 11, 0.14) !important; color: #b45309 !important; -webkit-text-fill-color: #b45309 !important; }

/* Map preview */
#mmd .mmd-map { height: 170px; border-top: 1px solid var(--mmd-edge); background: #eef0ee; }
.mmd-dot { background: none !important; border: 0 !important; }
.mmd-dot > span {
  position: absolute; left: -6px; top: -6px; width: 12px; height: 12px; border-radius: 50%;
  background: #111113; border: 2px solid #ffffff; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3); transition: all 0.15s;
}
.mmd-dot.is-sponsor > span { background: #d4a106; }
.mmd-dot.is-on > span {
  left: -12px; top: -12px; width: 24px; height: 24px; background: #ffffff; border: 4px solid var(--mmp-btn, #111113);
  box-shadow: 0 0 0 5px rgba(0, 0, 0, 0.12), 0 3px 10px rgba(0, 0, 0, 0.3);
}
.mmd-dot.is-sponsor.is-on > span { border-color: #d4a106; box-shadow: 0 0 0 5px rgba(212, 161, 6, 0.2), 0 3px 10px rgba(0, 0, 0, 0.3); }

/* The pin list: search, sort, rows */
#mmd .mmd-tools { display: flex; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--mmd-edge); }
html body #mmd .mmd-q, html body #mmd .mmd-sort {
  height: 34px; border-radius: 8px; border: 1px solid var(--mmd-edge) !important; background: var(--mmp-field, #ffffff) !important;
  color: var(--mmp-field-ink) !important; -webkit-text-fill-color: var(--mmp-field-ink) !important;
  font-size: 16px; padding: 0 10px; outline: none; box-shadow: none !important; -webkit-appearance: none; appearance: none;
}
#mmd .mmd-q { flex: 1; min-width: 0; }
html body #mmd .mmd-sort { flex: 0 0 auto; max-width: 42%; font-size: 13px; padding-right: 22px;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%) !important;
  background-position: calc(100% - 13px) 15px, calc(100% - 9px) 15px !important; background-size: 4px 4px !important; background-repeat: no-repeat !important; }
#mmd .mmd-row { border-bottom: 1px solid var(--mmd-edge); }
#mmd .mmd-row:last-child { border-bottom: 0; }
html body #mmd .mmd-row.is-on { background: rgba(127, 127, 140, 0.07) !important; box-shadow: inset 3px 0 0 var(--mmp-btn, #111113); }
html body #mmd .mmd-row.is-sponsor.is-on { box-shadow: inset 3px 0 0 var(--mmd-gold); }
html body #mmd .mmd-row__main {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 52px; padding: 8px 12px; text-align: left;
  border: 0 !important; background: transparent !important; border-radius: 0; box-shadow: none !important;
  backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
}
html body #mmd .mmd-glyph {
  width: 34px; height: 34px; border-radius: 8px; flex: 0 0 auto; overflow: hidden; display: grid; place-items: center;
  background: var(--mmd-soft) !important; font-size: 16px;
}
html body #mmd .mmd-row.is-sponsor .mmd-glyph { box-shadow: 0 0 0 2px var(--mmd-gold) !important; }
#mmd .mmd-glyph img { width: 100%; height: 100%; object-fit: cover; display: block; }
#mmd .mmd-row__t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
#mmd .mmd-row__t b { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html body #mmd .mmd-star { font-style: normal; color: var(--mmd-gold) !important; -webkit-text-fill-color: var(--mmd-gold) !important; }
html body #mmd .mmd-row__t small { font-size: 11.5px; color: var(--mmp-dim) !important; -webkit-text-fill-color: var(--mmp-dim) !important; }
#mmd .mmd-row__sp { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 12px; font-weight: 600; }
#mmd .mmd-row__sp > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#mmd .mmd-row__n { flex: 0 0 auto; display: grid; grid-template-columns: auto auto; gap: 0 5px; align-items: baseline; text-align: right; }
#mmd .mmd-row__n b { font-size: 13px; font-weight: 600; }
html body #mmd .mmd-row__n small { font-size: 11px; text-align: left; color: var(--mmp-faint) !important; -webkit-text-fill-color: var(--mmp-faint) !important; }
#mmd .mmd-row__more { padding: 0 12px 10px 56px; display: flex; flex-direction: column; gap: 8px; }
html body #mmd .mmd-row__spstats { margin: 0; font-size: 12px; color: var(--mmp-dim) !important; -webkit-text-fill-color: var(--mmp-dim) !important; }
#mmd .mmd-acts { display: flex; gap: 6px; flex-wrap: wrap; }
html body #mmd .mmd-btn, html body #mmd .mmd-feat {
  height: 32px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--mmd-edge) !important;
  background: var(--mmp-bg) !important; font-size: 13px; font-weight: 600; box-shadow: none !important;
  backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
  display: inline-flex; align-items: center; gap: 6px;
}
html body #mmd .mmd-btn--bad { color: #dc2626 !important; -webkit-text-fill-color: #dc2626 !important; }
html body #mmd .mmd-btn--bad.is-armed { background: #dc2626 !important; border-color: #dc2626 !important; color: #ffffff !important; -webkit-text-fill-color: #ffffff !important; }
html body #mmd .mmd-feat { padding-left: 6px; }
html body #mmd .mmd-feat__track { position: relative; width: 26px; height: 16px; border-radius: 8px; background: var(--mmd-edge) !important; transition: background 0.15s; }
html body #mmd .mmd-feat__track::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%;
  background: #ffffff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); transition: transform 0.15s;
}
html body #mmd .mmd-feat[aria-checked="true"] { border-color: var(--mmd-gold) !important; }
html body #mmd .mmd-feat[aria-checked="true"] .mmd-feat__track { background: var(--mmd-gold) !important; }
html body #mmd .mmd-feat[aria-checked="true"] .mmd-feat__track::after { transform: translateX(10px); }
html body #mmd .mmd-foot { margin: 0; padding: 9px 12px; font-size: 11.5px; border-top: 1px solid var(--mmd-edge); color: var(--mmp-faint) !important; -webkit-text-fill-color: var(--mmp-faint) !important; }
