/*
 * map.css — Leaflet popup, hearing timeline, map controls
 * Apple × Notion design language
 */

/* ── Hearing phase tabs ── */
.pb {
  display: flex; gap: 4px; margin-bottom: 14px; flex-wrap: wrap;
}
.pbt {
  background: var(--white);
  border: 0.5px solid rgba(0,0,0,.1);
  color: var(--slate-500);
  font-size: 11px; font-weight: 500;
  padding: 5px 13px;
  border-radius: 999px;
  cursor: pointer; font-family: var(--font);
  display: inline-flex; align-items: center; gap: 6px;
  transition: all .18s cubic-bezier(.25,.46,.45,.94);
  letter-spacing: -.01em;
}
.pbt.has   { color: var(--slate-700); font-weight: 600; }
.pbt:hover { border-color: rgba(0,0,0,.2); background: var(--slate-50); color: var(--slate-900); }
.pbt.on    {
  background: var(--slate-900); border-color: var(--slate-900);
  color: var(--white); font-weight: 600;
  box-shadow: 0 1px 3px rgba(0,0,0,.15);
}
.pc {
  background: rgba(0,0,0,.12); color: inherit;
  font-size: 9px; padding: 1px 5px; border-radius: 10px; font-weight: 700;
}
.pbt.on .pc { background: rgba(255,255,255,.2); }

/* ── Hearing timeline ── */
.tl { padding-left: 18px; position: relative; margin-top: 4px; }
.tl::before {
  content: ''; position: absolute; left: 5px; top: 6px; bottom: 6px;
  width: 1px; background: var(--slate-200); border-radius: 1px;
}
.ti { position: relative; margin-bottom: 4px; }
.dot {
  position: absolute; left: -13px; top: 10px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--blue-600);
  border: 2px solid var(--white);
  box-shadow: 0 0 0 1.5px var(--blue-300);
  transition: transform .15s;
}
.dot.nh { background: var(--slate-300); box-shadow: 0 0 0 1.5px var(--slate-200); }

/* Hearing row */
.hrow {
  padding: 9px 12px;
  background: var(--white);
  border: 0.5px solid rgba(0,0,0,.08);
  border-radius: 10px;
  cursor: pointer;
  display: flex; align-items: flex-start;
  justify-content: space-between; gap: 8px;
  transition: all .18s cubic-bezier(.25,.46,.45,.94);
  box-shadow: 0 1px 2px rgba(0,0,0,.03);
}
.hrow:hover {
  background: #FAFAF9;
  border-color: rgba(0,0,0,.14);
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  transform: translateY(-0.5px);
}
.hrow.on {
  background: #FAFAF9;
  border-color: rgba(0,0,0,.14);
  border-radius: 10px 10px 0 0;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.hleft { flex: 1; min-width: 0; }
.hd { font-size: 12px; font-weight: 600; color: var(--slate-900); letter-spacing: -.01em; }
.ht { font-size: 10px; color: var(--slate-500); margin-top: 2px; }
.hjudge { font-size: 10px; color: var(--blue-700); margin-top: 2px; font-weight: 500; }
.hw { font-size: 10px; color: #92400E; margin-top: 2px; }
.hchev { font-size: 9px; color: var(--slate-400); flex-shrink: 0; transition: transform .2s; }
.hchev.on { transform: rotate(180deg); color: var(--slate-600); }

/* Hearing detail */
.hdet {
  display: none;
  border: 0.5px solid rgba(0,0,0,.08);
  border-top: none;
  border-radius: 0 0 10px 10px;
  padding: 12px 14px;
  background: #FAFAF9;
}
.hdet.on { display: block; animation: fadeIn .15s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }

.hdet-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 6px 14px; margin-bottom: 12px;
  padding: 10px 12px;
  background: var(--white);
  border-radius: 8px;
  border: 0.5px solid rgba(0,0,0,.07);
}
.hdet-grid > div { display: flex; flex-direction: column; }
.hdl { font-size: 9px; color: var(--slate-400); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 2px; }
.hdv { font-size: 11px; font-weight: 500; color: var(--slate-800); line-height: 1.4; letter-spacing: -.005em; }

/* People at hearing */
.hpeople { margin-top: 10px; border-radius: 10px; border: 0.5px solid rgba(0,0,0,.08); overflow: hidden; }
.hpeople-hd {
  font-size: 9px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--slate-500);
  padding: 7px 12px;
  background: var(--white);
  border-bottom: 0.5px solid rgba(0,0,0,.07);
}
.hperson-row {
  display: flex; align-items: center; gap: 8px; padding: 7px 12px;
  border-bottom: 0.5px solid rgba(0,0,0,.06);
  transition: background .12s;
  background: #FAFAF9;
}
.hperson-row:last-child { border-bottom: none; }
.hperson-row:hover { background: var(--white); }
.hperson-role {
  font-size: 9px; font-weight: 700; padding: 2px 8px; border-radius: 999px;
  white-space: nowrap; flex-shrink: 0; text-transform: uppercase;
  letter-spacing: .04em; min-width: 76px; text-align: center;
}
.judge-role { background: var(--blue-50); color: var(--blue-800); border: 0.5px solid var(--blue-200); }
.pros-role  { background: #FFF5F5; color: #9B2C2C; border: 0.5px dashed #FC8181; }
.def-role   { background: #FFFBEB; color: #92400E; border: 0.5px dotted #F6AD55; }
.wit-role   { background: var(--slate-100); color: var(--slate-600); border: 0.5px solid var(--slate-300); }
.hperson-name { font-size: 12px; font-weight: 500; color: var(--slate-900); flex: 1; letter-spacing: -.01em; }
.hperson-sub  { font-size: 10px; color: var(--slate-400); margin-left: auto; flex-shrink: 0; }

.hnote {
  margin-top: 10px;
  background: var(--white);
  border-left: 2px solid var(--blue-200);
  border-radius: 0 8px 8px 0;
  padding: 8px 12px;
  font-size: 11px; color: var(--slate-600);
  line-height: 1.65; white-space: pre-wrap; word-break: break-word;
  letter-spacing: -.005em;
}

/* ── Map popup ── */
.pp b { font-size: 13px; display: block; margin-bottom: 5px; color: var(--slate-900); font-weight: 600; letter-spacing: -.01em; }
.pp table { font-size: 11px; border-collapse: collapse; width: 100%; }
.pp td { padding: 2px 0; vertical-align: top; }
.pp td:first-child { color: var(--slate-500); width: 64px; padding-right: 8px; white-space: nowrap; font-size: 10px; }

/* Leaflet popup — Notion card */
.leaflet-popup-content-wrapper {
  border-radius: 12px !important;
  border: 0.5px solid rgba(0,0,0,.09) !important;
  box-shadow: 0 8px 24px rgba(0,0,0,.1), 0 2px 8px rgba(0,0,0,.06) !important;
  padding: 0 !important;
  background: #FAFAF9 !important;
}
.leaflet-popup-content { margin: 12px 14px !important; }
.leaflet-popup-tip-container { display: none !important; }
.leaflet-popup-close-button {
  top: 8px !important; right: 10px !important;
  color: var(--slate-400) !important;
  font-size: 18px !important; line-height: 1 !important;
}
.leaflet-popup-close-button:hover { color: var(--slate-900) !important; }

/* Leaflet controls — Apple style */
.leaflet-control-zoom {
  border: 0.5px solid rgba(0,0,0,.1) !important;
  border-radius: 10px !important;
  box-shadow: 0 2px 8px rgba(0,0,0,.08) !important;
  overflow: hidden;
}
.leaflet-control-zoom a {
  background: rgba(250,250,249,.92) !important;
  backdrop-filter: blur(8px) !important;
  color: var(--slate-700) !important;
  font-size: 16px !important;
  font-weight: 300 !important;
  border-color: rgba(0,0,0,.08) !important;
  width: 30px !important; height: 30px !important;
  line-height: 30px !important;
}
.leaflet-control-zoom a:hover { background: var(--white) !important; color: var(--slate-900) !important; }
