/* Map Tooltips */

.ol-tooltip { position: relative; background: rgba(0, 0, 0, 0.75); border-radius: 4px; color: white; padding: 5px 10px; white-space: nowrap; font-size: 13px; pointer-events: none; user-select: none; font-weight: 700; z-index: 10; }

.ol-tooltip-measure { opacity: 1; }

.ol-tooltip-static { background-color: var(--measure-tooltip-color, #ffcc00); color: var(--measure-tooltip-text-color, black); border: 1.5px solid white; }

.ol-tooltip-measure:before, .ol-tooltip-static:before { border-top: 6px solid rgba(0, 0, 0, 0.75); border-right: 6px solid transparent; border-left: 6px solid transparent; content: ""; position: absolute; bottom: -6px; margin-left: -7px; left: 50%; }

.ol-tooltip-static:before { border-top-color: var(--measure-tooltip-color, #ffcc00); }



/* GeoJSON Info Popup */

.ol-popup {

  position: absolute; background-color: white; 

  box-shadow: 0 2px 10px rgba(0,0,0,0.2); 

  padding: 8px 12px; border-radius: 6px; 

  border: 1px solid #ffcc00; 

  bottom: 15px; left: -50%; transform: translateX(-50%);

  min-width: 300px; max-width: 420px;

  z-index: 2000; font-size: 12px; color: #333;

  display: none; 

  user-select: none; 

  pointer-events: none;

}

.ol-popup::after {

  content: ""; position: absolute; top: 100%; left: 50%; margin-left: -6px;

  border-width: 6px; border-style: solid;

  border-color: #ffcc00 transparent transparent transparent;

}

.popup-title { font-weight: bold; margin-bottom: 6px; border-bottom: 2px solid #ffcc00; padding-bottom: 4px; color: #000; }

/* Ширина стовпчика значення (2fr) більше ширини стовпчика ключа (1fr) */

.popup-content { display: grid; grid-template-columns: 1fr 2fr; gap: 4px 12px; }

.popup-key { color: #777; font-size: 11px; font-weight: 600; text-align: right; word-break: break-word; }

.popup-val { text-align: left; font-weight: 500; word-break: break-word; }





/* Custom Context Menu */
.custom-menu {
  position: absolute;
  background: white;
  border: 1.5px solid #ffcc00;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  padding: 4px 0;
  display: none;
  z-index: 3000;
  min-width: 140px;
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  font-weight: 600;
}
.custom-menu-item {
  padding: 8px 12px;
  cursor: pointer;
  color: #333;
  transition: background 0.2s, color 0.2s;
}
.custom-menu-item:hover {
  background: #fffbe6;
  color: #d4a000;
}

/* About Modal Dialog */
.about-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 4000;
  font-family: 'Montserrat', sans-serif;
}
.about-modal-content {
  background: white;
  padding: 24px;
  border-radius: 8px;
  border: 2px solid #ffcc00;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  width: min(400px, calc(100vw - 32px));
  position: relative;
  text-align: center;
  box-sizing: border-box;
}
.about-modal-content h3 {
  margin-top: 0;
  color: #000;
  font-weight: 700;
  border-bottom: 2px solid #ffcc00;
  padding-bottom: 8px;
  font-size: 16px;
}
.about-modal-content p {
  font-size: 13px;
  color: #555;
  line-height: 1.5;
  margin: 12px 0;
}
.about-modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
  color: #aaa;
  transition: color 0.2s;
  line-height: 1;
}
.about-modal-close:hover {
  color: #ff4d4f;
}
