/* ============================================================
   ONHYM GIS Engine — Frontend styles
   Lightweight, theme-isolated, scoped under .onhym-gis-wrapper
   ============================================================ */

.onhym-gis-wrapper {
  position: relative;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
  color: #1f2937;
  background: #f3f7fc;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 28px rgba(15,23,42,.08);
}
.onhym-gis-map {
  position: relative;
  background: #e5edf5;
}

/* Layer panel (overlay top-right) */
.onhym-gis-panel {
  position: absolute;
  top: 14px; right: 14px;
  z-index: 500;
  width: 280px;
  max-height: calc(100% - 28px);
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(14px) saturate(150%);
  border: 1px solid rgba(15,23,42,.08);
  border-radius: 10px;
  box-shadow: 0 6px 24px rgba(15,23,42,.12);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.onhym-gis-panel header {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(15,23,42,.07);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .02em;
  color: #0f172a;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.onhym-gis-panel ul {
  list-style: none;
  margin: 0;
  padding: 8px 6px;
  overflow-y: auto;
}
.onhym-gis-panel li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  transition: background .15s;
}
.onhym-gis-panel li:hover { background: rgba(31,79,134,.06); }
.onhym-gis-panel input[type=checkbox] {
  accent-color: #1f4f86;
  width: 14px; height: 14px;
  cursor: pointer;
}
.onhym-gis-swatch {
  width: 14px; height: 14px;
  border-radius: 3px;
  border: 1px solid rgba(0,0,0,.15);
  flex-shrink: 0;
}

/* Loading overlay */
.onhym-gis-loading {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.7);
  z-index: 600;
  font-size: 13px;
  color: #475569;
}
.onhym-gis-spinner {
  width: 28px; height: 28px;
  border: 3px solid #cbd5e1;
  border-top-color: #1f4f86;
  border-radius: 50%;
  animation: ohgis-spin .8s linear infinite;
  margin-right: 10px;
}
@keyframes ohgis-spin { to { transform: rotate(360deg); } }

/* Popups */
.onhym-gis-popup-title {
  font-weight: 600;
  font-size: 14px;
  color: #0f172a;
  margin: 0 0 6px;
  padding-bottom: 6px;
  border-bottom: 1px solid #e5e7eb;
}
.onhym-gis-popup-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.onhym-gis-popup-table td {
  padding: 4px 6px;
  vertical-align: top;
}
.onhym-gis-popup-table td:first-child {
  color: #6b7280;
  font-weight: 500;
  white-space: nowrap;
}

/* Search bar */
.onhym-gis-search {
  position: absolute;
  top: 14px; left: 14px; z-index: 500;
  display: flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(15,23,42,.08);
  border-radius: 8px;
  padding: 6px 10px;
  box-shadow: 0 4px 14px rgba(15,23,42,.1);
  width: 280px;
}
.onhym-gis-search input {
  flex: 1; border: 0; outline: 0;
  background: transparent; font-size: 13px;
  color: #0f172a;
}
.onhym-gis-results {
  position: absolute; top: 50px; left: 14px;
  width: 300px; max-height: 280px; overflow: auto;
  background: #fff; border-radius: 8px;
  box-shadow: 0 8px 24px rgba(15,23,42,.15);
  border: 1px solid rgba(15,23,42,.08);
  z-index: 500;
}
.onhym-gis-results .item {
  padding: 8px 12px; cursor: pointer; font-size: 13px;
  border-bottom: 1px solid #f1f5f9;
}
.onhym-gis-results .item:hover { background: #f1f5f9; }
.onhym-gis-results .item small { color: #64748b; display: block; }

/* Attribution footer */
.onhym-gis-attrib {
  position: absolute; bottom: 4px; right: 8px;
  font-size: 10.5px; color: rgba(15,23,42,.55);
  z-index: 400; pointer-events: auto;
}
.onhym-gis-attrib a { color: inherit; text-decoration: none; }
.onhym-gis-attrib a:hover { text-decoration: underline; }
