/* Tabs */
#tabs{ display:flex; gap:8px; }
.tab{
  border:1px solid var(--border);
  background:var(--bg);
  padding:8px 10px;
  border-radius:10px;
  cursor:pointer;
}
.tab.is-active{ box-shadow: inset 0 0 0 2px rgba(0,0,0,.08); }

/* Left panel */
.leftTop{ padding:10px; border-bottom:1px solid var(--border); }
#search{ width:100%; padding:9px 10px; border:1px solid var(--border); border-radius:10px; }
.row{ margin-top:8px; display:flex; gap:8px; align-items:center; }
.label{ font-size:12px; color:var(--muted); }
#sort{ flex:1; padding:8px; border:1px solid var(--border); border-radius:10px; }

#cardList{ list-style:none; padding:8px; margin:0; overflow:auto; }
#cardList li{
  padding:10px;
  border:1px solid var(--border);
  border-radius:12px;
  background:var(--bg);
  margin-bottom:8px;
}

#cardList li.is-selected{
  outline: 2px solid rgba(0,0,0,.25);
  box-shadow: 0 8px 18px rgba(0,0,0,.10);
}

.card {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 10px;
  align-items: center;
}

.cardThumb {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
  object-fit: cover;
  display: block;
}

.cardTitle { font-weight: 600; }
.cardSub { color: var(--muted); font-size: 12px; }


/* Map placeholder */
#map{ position:absolute; inset:0; }
.mapPlaceholder{
  position:absolute; inset:0;
  display:flex; align-items:center; justify-content:center;
  color:var(--muted);
}

/* Bottom tray */
#bottomTray{ padding:10px; }
.trayTitle{ font-size:12px; color:var(--muted); margin-bottom:8px; }
.trayPins{ display:flex; gap:8px; flex-wrap:wrap; }
.trayPins > div{
  width:42px; height:42px;
  border:1px solid var(--border);
  border-radius:12px;
  background:var(--bg);
}
.trayPin{
  border: 0;
  border-radius: 10px;
  width: 48px;
  height: 48px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.trayPin img{
  width: 32px;
  height: 32px;
  object-fit: contain;
}
.trayPin.is-selected{
  outline: 3px solid rgba(0,0,0,.35);
}

/* Right overlay detail panel (covers map area only) */
#detailPanel{
  position:absolute;
  top:10px; right:10px; bottom:10px;
  z-index: 1000;
  width:min(520px, calc(100% - 20px));
  border:1px solid var(--border);
  border-radius:16px;
  background:var(--bg);
  box-shadow:var(--shadow);
  overflow:auto;
}

#detailPanel.hidden{ display:none; }

#detailClose{
  position:absolute;
  top:10px; right:10px;
  border:1px solid var(--border);
  background:var(--bg);
  border-radius:10px;
  width:34px; height:34px;
  cursor:pointer;
}

.detailHeader{ padding:14px 14px 10px; border-bottom:1px solid var(--border); }
.detailTitle{ font-weight:600; }

.detailBody{ padding:18px; display:flex; flex-direction:column; gap:12px; }
.thumbRow{
  display: grid;
  grid-template-columns: 1fr 1fr; /* side-by-side */
  gap: 16px;
  justify-items: center;          /* centers fixed-width thumbs */
}

.detailText{ color:var(--muted); font-size: 14px; line-height:1.4; }
.detailImg{
  width: 240px;
  aspect-ratio: 1 / 1;
  height: auto;
  border-radius: 14px;
  border: 1px solid var(--border);
  object-fit: cover;
  display: block;
  background: #fff;
}

.detailLinks a{
  display: inline-block;
  margin-right: 10px;
  margin-top: 6px;
}

.detailAttrs {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 12px;
  row-gap: 6px;
  font-size: 13px;
}

.detailAttrKey {
  color: var(--muted);
  text-align: right;
  white-space: nowrap;
}

.detailAttrVal {
  font-weight: 500;
}

/* Leaflet pin */
.pinDot{
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
}

.pinDot.is-selected{
  transform: scale(1.25);
  box-shadow:
    0 0 0 3px rgba(255,255,255,.95),
    0 0 0 7px rgba(0,0,0,.20),
    0 6px 16px rgba(0,0,0,.25);
}

.leaflet-tooltip.pinLabel{
  background: rgba(255,255,255,.95);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 4px 8px;
  box-shadow: 0 6px 16px rgba(0,0,0,.10);
  color: #111;
}

