/* ============================================================
   Trail Conditions — Type View
   Mike Rosinski's subjective 2-axis trail-feel map, rendered with
   live status. Dots positioned by trail "feel" coordinates; fill
   colour = today's status, ring = stewardship org.
   Popup reuses .map-popup* styles from map.css.
   ============================================================ */

#tab-style { padding-top: 0.25rem; }

.style-intro {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.5;
  margin: 0.25rem 0 0.75rem;
}

/* ── Org legend ───────────────────────────────────────────── */
.style-legend {
  display: flex;
  gap: 1rem 1.25rem;
  flex-wrap: wrap;
  align-items: center;
  font-size: 0.78rem;
  color: var(--text);
  margin-bottom: 0.75rem;
}
.style-leg {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.style-leg img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  border-radius: 4px;
}
.style-leg .ring {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2.5px solid var(--c, #888);
  background: var(--surface);
  box-sizing: border-box;
}
.style-legend .style-hint {
  color: var(--muted);
  flex-basis: 100%;
  font-size: 0.75rem;
}

/* ── Plot ─────────────────────────────────────────────────── */
.style-plot {
  position: relative;
  width: 100%;
  max-width: 900px;
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  overflow: hidden;
  touch-action: manipulation;
}
@media (min-width: 640px) {
  .style-plot { aspect-ratio: 16 / 12; }
}

/* Axis cross-hairs through the middle */
.style-plot::before,
.style-plot::after {
  content: '';
  position: absolute;
  background: rgba(0, 0, 0, 0.12);
}
.style-plot::before { left: 0; right: 0; top: 50%; height: 1px; }
.style-plot::after  { top: 0; bottom: 0; left: 50%; width: 1px; }

.style-axis {
  position: absolute;
  font-weight: 700;
  font-size: 0.68rem;
  letter-spacing: 0.02em;
  color: var(--forest);
  background: rgba(255, 255, 255, 0.85);
  padding: 0.08rem 0.35rem;
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 2;
}
.style-ax-top    { top: 0.3rem;    left: 50%; transform: translateX(-50%); }
.style-ax-bottom { bottom: 0.3rem; left: 50%; transform: translateX(-50%); }
.style-ax-left   { left: 0.3rem;   top: 50%;  transform: translateY(-50%); }
.style-ax-right  { right: 0.3rem;  top: 50%;  transform: translateY(-50%); }

/* ── Dots ─────────────────────────────────────────────────── */
.style-dot {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 0.28rem;
  max-width: 46%;
  padding: 0.12rem 0.4rem 0.12rem 0.28rem;
  font-size: 0.64rem;
  font-weight: 600;
  line-height: 1.05;
  color: var(--text);
  background: var(--surface);
  border: 2px solid var(--org, #888);
  border-radius: 100px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  white-space: nowrap;
  z-index: 1;
  transition: box-shadow 0.12s, transform 0.12s;
}
.style-dot:hover,
.style-dot.active {
  z-index: 5;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
  transform: translate(-50%, -50%) scale(1.06);
}
.style-dot .swatch {
  flex: none;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--status, #d0d0d0);
  border: 1px solid rgba(0, 0, 0, 0.15);
}
.style-dot .dot-label {
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 480px) {
  .style-dot { font-size: 0.58rem; max-width: 42%; }
  .style-dot .dot-label { max-width: 6.2rem; }
}

/* ── Popup (reuses .map-popup* look, floated over the plot) ── */
.style-popup {
  position: absolute;
  z-index: 20;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.22);
  padding: 0.6rem 0.7rem;
  transform: translate(-50%, calc(-100% - 14px));
  pointer-events: auto;
}
.style-popup::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -7px;
  width: 12px;
  height: 12px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  transform: translateX(-50%) rotate(45deg);
}
/* Top-row dots: popup drops below the dot, arrow points up. */
.style-popup.below {
  transform: translate(-50%, 14px);
}
.style-popup.below::after {
  bottom: auto;
  top: -7px;
  border: 0;
  border-left: 1px solid var(--border);
  border-top: 1px solid var(--border);
}
/* Org badge inside the popup uses the shared .org-badge styles (base.css). */
