/* The tab bar on Convention insights and its Map tab (js/convention-map.js).
   Uses the page's own custom properties (--conv, --conv-deep, --border ...). */

.ci-tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--border); margin-bottom: 20px; }
.ci-tab {
  appearance: none; background: none; border: 0; border-bottom: 3px solid transparent; margin-bottom: -2px;
  padding: 10px 18px; font: inherit; font-size: 0.9375rem; font-weight: 600; color: var(--muted); cursor: pointer;
}
.ci-tab:hover { color: var(--conv-deep); }
.ci-tab[aria-selected="true"] { color: var(--conv-deep); border-bottom-color: var(--conv); }
.ci-tab:focus-visible { outline: 2px solid var(--conv); outline-offset: -2px; border-radius: 4px; }

.cm-loading { padding: 48px 16px; text-align: center; color: var(--muted); }

.cm-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; margin-bottom: 12px; font-size: 0.875rem; color: var(--text-2); }
.cm-toggle { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-weight: 600; }
.cm-key-venue-wrap { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.cm-key { display: inline-block; width: 14px; height: 14px; border-radius: 50%; flex: none; }
.cm-key-contrib { background: var(--conv-deep); border: 2px solid #fff; box-shadow: 0 0 0 1px var(--conv-deep); }
.cm-key-orderers { background: rgba(214, 192, 1, 0.4); border: 1.5px dashed #9A7B00; }
.cm-key-venue, .cm-venue { background: #E74515; border: 2px solid #fff; border-radius: 2px; transform: rotate(45deg); box-shadow: 0 0 0 1px #A12A24; }
.cm-key-venue { width: 11px; height: 11px; }
.cm-venue-at { position: relative; display: block; width: 0; height: 0; }
.cm-venue { position: absolute; left: -6px; top: -6px; width: 12px; height: 12px; }
/* the leader from the diamond to its name */
.cm-venue-at::before { content: ""; position: absolute; left: 6px; top: -1px; width: 26px; border-top: 2px solid #A12A24; }
.cm-venue-tag {
  position: absolute; left: 32px; top: -11px; white-space: nowrap; padding: 2px 8px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.92); border: 1px solid #E5E7EB; font-size: 0.75rem; font-weight: 600; line-height: 16px; color: #A12A24;
}

.cm-views { margin-left: auto; display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.cm-view { border: 0; background: var(--card); padding: 5px 12px; font: inherit; font-size: 0.8125rem; color: var(--text-2); cursor: pointer; }
.cm-view + .cm-view { border-left: 1px solid var(--border); }
.cm-view[aria-pressed="true"] { background: var(--conv-light); color: var(--conv-deep); font-weight: 600; }

/* Mode buttons: the look of .mode-btn on map.html, in this page's purple. */
.cm-modes { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-bottom: 12px; }
.cm-modes-l { font-size: 0.8125rem; color: var(--muted); margin-right: 6px; }
.cm-mode {
  padding: 7px 12px; border: 1px solid var(--border); background: #FAFAFA; border-radius: 8px;
  font: inherit; font-size: 0.75rem; font-weight: 600; color: var(--muted); cursor: pointer;
}
.cm-mode[aria-pressed="true"] { background: var(--conv); border-color: var(--conv); color: #fff; }
.cm-mode:hover:not([aria-pressed="true"]) { border-color: var(--conv); color: var(--conv-deep); background: var(--conv-light); }
.cm-person { display: block; width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.9); box-shadow: 0 1px 5px rgba(0, 0, 0, 0.4); }
.cm-people-one li { border-top: 0; padding-top: 0; }

.cm-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.cm-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--card); font: inherit; font-size: 0.8125rem; color: var(--text-2); cursor: pointer;
}
.cm-chip b { color: var(--muted); font-weight: 600; }
.cm-chip:hover { border-color: var(--conv-border); }
.cm-chip[aria-pressed="true"] { background: var(--conv-light); border-color: var(--conv); color: var(--conv-deep); font-weight: 600; }
.cm-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex: none; }

.cm-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.cm-map { height: 640px; border: 1px solid var(--border); border-radius: 10px; background: #EEF1F4; z-index: 0; }
.cm-side { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 4px 14px; max-height: 640px; overflow-y: auto; }
/* The two lists are collapsible and start shut. */
.cm-sec + .cm-sec { border-top: 1px solid var(--border); }
.cm-sec > summary { list-style: none; cursor: pointer; padding: 10px 18px 10px 0; position: relative; user-select: none; }
.cm-sec > summary::-webkit-details-marker { display: none; }
.cm-sec > summary::after { content: "▸"; position: absolute; right: 0; top: 10px; color: var(--muted); transition: transform 0.18s ease; }
.cm-sec[open] > summary::after { transform: rotate(90deg); }
.cm-sec > summary:hover .cm-sec-t { text-decoration: underline; }
.cm-sec > summary:focus-visible { outline: 2px solid var(--conv); outline-offset: 2px; border-radius: 4px; }
.cm-sec-t { display: block; font-size: 0.875rem; font-weight: 700; color: var(--conv-deep); }
.cm-side-sub { display: block; font-size: 0.75rem; color: var(--muted); margin-top: 2px; }
.cm-sec[open] { padding-bottom: 10px; }

.cm-towns { list-style: none; }
.cm-towns button {
  display: flex; justify-content: space-between; align-items: center; gap: 8px; width: 100%;
  padding: 5px 8px; border: 0; border-radius: 6px; background: none; font: inherit; font-size: 0.8125rem; color: var(--text-2); cursor: pointer; text-align: left;
}
.cm-towns button:hover, .cm-towns button:focus-visible { background: var(--conv-light); color: var(--conv-deep); outline: none; }
.cm-towns b { font-variant-numeric: tabular-nums; color: var(--conv-deep); }
.cm-empty { font-size: 0.8125rem; color: var(--muted); padding: 5px 8px; }
/* The count on a ticket orderer bubble: a badge on its bottom edge. */
.cm-ord-n {
  position: absolute; transform: translate(-50%, 0); padding: 0 6px; border-radius: 999px; white-space: nowrap;
  background: #FFF8CC; border: 1px solid #9A7B00; color: #5C4A00; font-size: 0.6875rem; font-weight: 700; line-height: 1.5;
}
.cm-ord-towns b { color: #7A6200; }

.cm-pin {
  display: flex; align-items: center; justify-content: center; border-radius: 50%;
  background: var(--conv-deep, #2F2259); color: #fff; font-weight: 700; font-size: 0.8125rem;
  border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35); cursor: pointer;
}
/* "Numbers" switched off: the circles stay, the figures on them go. */
.cm-no-numbers .cm-pin, .cm-no-numbers .marker-cluster span { color: transparent; }
.cm-no-numbers .cm-ord-n { display: none; }
.cm-pin:hover { background: var(--conv, #5B3FA8); }

.cm-pop { font-size: 0.8125rem; line-height: 1.4; }
.cm-pop-h { font-size: 0.9375rem; font-weight: 700; color: #2F2259; }
.cm-pop-n { color: #6B7280; margin-bottom: 6px; }
.cm-people { list-style: none; margin: 0; padding: 0; }
.cm-people li { display: flex; gap: 8px; align-items: baseline; padding: 4px 0; border-top: 1px solid #F3F4F6; }
.cm-sub { color: #6B7280; font-size: 0.75rem; }

.cm-notes { margin-top: 14px; font-size: 0.8125rem; line-height: 1.5; color: var(--text-2); }
.cm-notes p + p { margin-top: 8px; }

@media (max-width: 900px) {
  .cm-layout { grid-template-columns: minmax(0, 1fr); }
  .cm-map { height: 460px; }
  .cm-side { max-height: none; }
}
