/* File: map.css — Overlay, Map, Button Styling */

#sf-map-wrapper {
  position: relative;
  height: 100vh;
}
#sf-map {
  height: 100%;
}

#sf-map-overlay {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 40vw;
  height: 95vh;
  background: white;
  padding: 10px 12px;
  border-radius: 6px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
  font-family: sans-serif;
  font-size: 12px;
  overflow-y: auto;
  z-index: 9999;
  display: flex;
  flex-direction: column;
}

.overlay-header {
  font-size: 14px;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.overlay-add-btn {
  font-size: 20px;
  cursor: pointer;
  border: 1px solid #ccc;
  border-radius: 4px;
  width: 28px;
  height: 28px;
  text-align: center;
  line-height: 24px;
  background-color: #f5f5f5;
  color: #333;
}
.overlay-add-btn:hover {
  background-color: #eaeaea;
}

#sf-overlay-folders {
  flex: 1;
}

.folder-datasets {
  margin-left: 16px;
}

.folder, .dataset {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  line-height: 1.2;
  position: relative;
}

.folder > strong,
.dataset > div > strong {
  font-size: 14px !important;
  font-weight: normal;
  cursor: pointer;
  display: inline-block;
}
.folder > strong:hover,
.dataset > div > strong:hover {
  text-decoration: underline;
}

.menu-trigger {
  float: right !important;
  position: absolute;
  right: 8px;
  top: 0;
  font-size: 16px;
  padding: 0;
  margin: 0;
  cursor: pointer;
  user-select: none;
}

/* Context Menu */
.context-menu {
  display: none;
  position: absolute;
  background: white;
  border: 1px solid #ccc;
  box-shadow: 0 1px 5px rgba(0,0,0,0.15);
  z-index: 10001;
  font-size: 12px;
  padding: 6px;
  border-radius: 4px;
  width: 180px;
  flex-direction: column;
}
.context-menu button {
  display: block;
  width: 100%;
  margin: 4px 0;
  text-align: left;
  padding: 5px 8px;
  font-size: 13px;
  border-radius: 4px;
  cursor: pointer;
  border: 1px solid;
}

/* Popup Modal */
#sf-popup-modal {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  background: white;
  border: 1px solid #ccc;
  padding: 16px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  z-index: 10000;
  max-width: 80vw;
  width: 400px;
  font-family: sans-serif;
  font-size: 13px;
  display: none;
}
#sf-popup-modal input,
#sf-popup-modal select {
  width: 100%;
  padding: 4px;
  margin: 4px 0 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

/* General button base */
.ds-btn {
  display: block;
  width: 100%;
  margin: 6px 0;
  padding: 6px 10px;
  font-size: 13px;
  border-radius: 4px;
  cursor: pointer;
  border: 1px solid;
  text-align: left;
}

/* Save/default button */
.ds-btn-save {
  background-color: #017be4;
  border-color: #017be4;
  color: #ffffff;
}
.ds-btn-save:hover {
  background-color: #0150be;
  border-color: #0150be;
}

/* Delete button */
.ds-btn-delete {
  background-color: #ba0517 !important;
  border-color: #ba0517 !important;
  color: #ffffff !important;
}
.ds-btn-delete:hover,
.ds-btn-delete:active {
  background-color: #920614 !important;
  border-color: #920614 !important;
}

/* Cancel/close button */
.ds-btn-cancel {
  background-color: #ffffff;
  color: #017be4;
  border-color: #017be4;
}
.ds-btn-cancel:hover,
.ds-btn-cancel:active {
  background-color: #cccccc;
  border-color: #0150be;
}

/* Hover highlight */
.folder > strong:hover,
.dataset > div:hover {
  background-color: rgba(80, 227, 194, 0.4);
  display: inline-block;
  width: calc(100% - 32px);
}
