/* index.css - styling for map + sidebar */

:root{
  --bg:#f7f7fb;
  --accent:#0f62fe;
  --muted:#6b7280;
  --card:#ffffff;
  --radius:10px;
}

*{box-sizing:border-box}
html,body,#map{height:100%}
body{
  margin:0;
  font-family:Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  background:var(--bg);
  color:#111827;
  min-height:100vh;
  display:flex;
  flex-direction:column;
}

/* Topbar */
.topbar{
  padding:14px 18px;
  background:linear-gradient(90deg,#ffffff, #f1f5ff);
  border-bottom:1px solid rgba(15,98,254,0.05);
}
.topbar h1{margin:0;font-size:18px}
.topbar .tag{margin:2px 0 0;color:var(--muted);font-size:13px}

/* Layout */
.layout{
  display:grid;
  grid-template-columns: 360px 1fr;
  gap:16px;
  padding:16px;
  flex:1;
}

/* Sidebar */
.sidebar{
  background:var(--card);
  border-radius:var(--radius);
  padding:14px;
  box-shadow:0 6px 18px rgba(12,15,40,0.06);
  display:flex;
  flex-direction:column;
  min-height:0;
}

.search-wrap{
  display:flex;
  gap:6px;
  align-items:center;
  margin-bottom:10px;
}
#searchBox{
  flex:1;
  padding:10px 12px;
  border-radius:8px;
  border:1px solid #e6e9ef;
  font-size:14px;
  outline:none;
}
#searchBox:focus{box-shadow:0 0 0 3px rgba(15,98,254,0.08);border-color:var(--accent)}
#clearBtn{
  background:#fff;border:1px solid #e6e9ef;border-radius:8px;padding:8px 10px;cursor:pointer
}

.stats{font-size:13px;color:var(--muted);margin-bottom:8px}

/* Results list */
.results{
  list-style:none;padding:0;margin:0;overflow:auto;
  flex:1; /* allow scrolling list inside sidebar */
}
.results li{
  display:flex;gap:10px;padding:10px;border-radius:8px;margin-bottom:8px;
  align-items:flex-start;background:linear-gradient(180deg,#ffffff,#fcfcff);
  cursor:pointer;border:1px solid rgba(10,10,10,0.03);
  transition:transform .08s ease, box-shadow .08s ease;
}
.results li:hover{transform:translateY(-2px);box-shadow:0 6px 18px rgba(12,15,40,0.06)}
.results li .thumb{
  width:76px;height:56px;border-radius:6px;background:#ddd;flex-shrink:0;overflow:hidden;
}
.results li .thumb img{width:100%;height:100%;object-fit:cover;display:block}
.results li .meta{flex:1}
.results li .meta h3{margin:0;font-size:15px}
.results li .meta p{margin:4px 0 0;color:var(--muted);font-size:13px}

/* Map */
.map-wrap{border-radius:var(--radius);overflow:hidden;box-shadow:0 6px 18px rgba(12,15,40,0.06)}
.map{width:100%;height:100%;min-height:520px}

/* cluster popup small image */
.leaflet-popup-content img { width:100%; height:120px; object-fit:cover; border-radius:6px; display:block; margin-top:8px;}

/* Footer */
.footer{padding:10px 16px;background:transparent;border-top:1px solid rgba(0,0,0,0.03);text-align:center;color:var(--muted);font-size:13px}

/* Responsive */
@media (max-width:900px){
  .layout{grid-template-columns:1fr; padding:10px;}
  .sidebar{order:2;margin-top:10px}
  .map-wrap{order:1}
  .results li .thumb{width:92px;height:64px}
}
