@font-face { font-family: Vazirmatn; src: url(/static/vendor/Vazirmatn.woff2) format('woff2'); }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; font-family: Vazirmatn, Tahoma, sans-serif; font-size: 13px; color: #222; }
#map { position: absolute; inset: 0; }
#side { position: absolute; top: 10px; right: 10px; z-index: 2; width: 340px; max-height: calc(100% - 20px); display: flex;
  flex-direction: column; background: rgba(255, 255, 255, .96); border-radius: 10px; box-shadow: 0 2px 12px rgba(0, 0, 0, .2); }
#side header { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; border-bottom: 1px solid #eee; }
#side h1 { font-size: 15px; margin: 0; }
#side.closed #sideBody { display: none; }
#sideBody { overflow: auto; padding: 8px 12px 12px; }
button, .btn { font: inherit; border: 1px solid #ccc; background: #fafafa; border-radius: 6px; padding: 3px 10px; cursor: pointer;
  color: inherit; text-decoration: none; }
button.on { background: #1e88e5; color: #fff; border-color: #1e88e5; }
#toggleSide { border: 0; background: none; font-size: 18px; }
.row { margin: 4px 0 8px; }
.row.btns { display: flex; gap: 6px; flex-wrap: wrap; }
select { font: inherit; margin-inline-start: 6px; }
.lay { border-bottom: 1px solid #f0f0f0; padding: 4px 0; }
.lay > label { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.lay .t { flex: 1; }
.lay .n { color: #888; font-size: 11px; direction: ltr; }
.sw { display: inline-block; width: 12px; height: 12px; border-radius: 2px; border: 1px solid rgba(0, 0, 0, .25); flex: none; }
.ctl { display: flex; align-items: center; gap: 6px; margin: 4px 22px 2px 0; font-size: 12px; }
.ctl input[type=range] { flex: 1; }
.legend { margin: 2px 22px 4px 0; font-size: 12px; display: flex; flex-wrap: wrap; gap: 2px 10px; }
.legend span { white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; }
.note { color: #666; font-size: 12px; line-height: 1.7; }
.maplibregl-popup-content { font-family: Vazirmatn, Tahoma, sans-serif; direction: rtl; max-height: 60vh; overflow: auto; }
.pop b { display: block; margin-bottom: 4px; }
.pop table { border-collapse: collapse; }
.pop th { text-align: right; font-weight: normal; color: #666; padding: 1px 0 1px 10px; vertical-align: top; }
.pop td { padding: 1px 0; }
.pop tr.hl td, .pop tr.hl th { background: #fff8e1; }
.pop h4 { margin: 8px 0 2px; font-size: 12px; color: #1e88e5; }
@media (max-width: 600px) { #side { width: calc(100% - 20px); max-height: 50%; } }
