*,
*:before,
*:after {
  box-sizing: border-box;
}

:root {
  --header-h: 50px;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  font-family: 'Open Sans', sans-serif;
}
#viewDiv {
  position: absolute;
  top: var(--header-h);
  left: 0;
  right: 280px; 
  bottom: 0;
}

#headerBar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  background-image: linear-gradient(to right, #00467f, #005a9b);
  color: white;
  padding: 0 10px; 
  z-index: 100;
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
  display: flex; 
  align-items: center;
  justify-content: space-between;
}

.header-app-title {
  font-size: 20px;
  font-weight: bold;
  line-height: var(--header-h); 
  flex-shrink: 0; 
}

.header-right-controls {
  display: flex;
  align-items: center;
  gap: 15px; 
}

.header-nav-links {
  display: flex;
  align-items: center;
  gap: 15px; 
  flex-shrink: 0; 
}

.nav-link {
  color: white;
  text-decoration: none; 
  padding: 5px 10px;
  border-radius: 4px;
  transition: background-color 0.3s ease;
  font-size: 14px; 
  font-weight: normal; 
  white-space: nowrap; 
  line-height: 1; 
}

.nav-link:hover {
  background-color: rgba(255, 255, 255, 0.2); 
}

.nav-link.active-nav-link {
  background-color: rgba(255, 255, 255, 0.3); 
  font-weight: bold; 
  border: 1px solid rgba(255, 255, 255, 0.5); 
}

#helpButton {
  background-color: transparent;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  padding: 0 10px;
  flex-shrink: 0; 
}

#helpButton:hover {
  color: #f0f0f0;
}

#symbologyEditorPanel {
  position: fixed; 
  top: var(--header-h); 
  right: 0; 
  bottom: 0; 
  background-color: #fefefe;
  padding: 20px;
  border-left: 1px solid #888; 
  border-radius: 0; 
  width: 280px; 
  box-shadow: -4px 0 15px rgba(0,0,0,0.1); 
  font-family: 'Open Sans', sans-serif;
  z-index: 110;
  overflow-y: auto; 
}

#symbologyEditorPanel h3#symbologyPanelTitle { 
  font-size: 22px; 
  margin-top: 0;
  margin-bottom: 15px;
  color: #333;
}

#symbologyEditorPanel h3#symbologyPanelTitle + hr { 
  margin-top: 15px;
  margin-bottom: 20px;
  border: 0;
  border-top: 1px solid #eee;
}

#symbologyEditorPanel h2:not(#symbologyPanelTitle) {
  font-size: 16px; 
  color: #666; 
  background-color: transparent; 
  padding: 0; 
  margin-top: 25px; 
  margin-bottom: 15px;
  border-radius: 0; 
  box-shadow: none; 
  text-align: left; 
}

#symbologyEditorPanel label {
  display: block;
  margin-bottom: 5px;
  font-size: 14px;
}

#symbologyEditorPanel input[type="number"] {
  width: 100%; 
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
  margin-bottom: 10px;
}

.color-pickers-wrapper {
  display: flex;
  gap: 10px; 
  margin-bottom: 15px; 
  justify-content: space-around; 
}

.color-pickers-wrapper input[type="color"] {
  flex-grow: 1; 
  min-width: 50px; 
  height: 35px; 
  padding: 0; 
  border: 1px solid #ccc;
  border-radius: 4px;
  cursor: pointer;
}

.color-input-group {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap; 
    justify-content: space-between; 
}

.color-input-group label {
    flex-basis: 100%; 
    margin-bottom: 5px; 
    margin-right: 0; 
}

.color-input-group input[type="color"] {
    flex-grow: 1; 
    min-width: 50px; 
    height: 35px; 
    padding: 0; 
    border: 1px solid #ccc;
    border-radius: 4px;
    margin-bottom: 0;
}

#transparencyInput {
  width: 100%;
  margin-bottom: 10px;
}

#colorRampPreview {
  width: 100%;
  height: 20px; 
  border: 1px solid #ccc;
  margin-top: 10px;
  margin-bottom: 15px;
  border-radius: 4px;
}

hr {
  border: 0;
  border-top: 1px solid #dcdcdc;
  margin: 25px 0; 
}

.modal-overlay {
  display: none; 
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6); 
  z-index: 1000; 
  justify-content: center;
  align-items: center;
}

.help-modal {
  background-color: white;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  width: 90%;
  max-width: 500px; 
  position: relative;
  font-family: 'Open Sans', sans-serif;
  color: #333;
}

.help-modal h3 {
  margin-top: 0;
  color: #00467f;
  text-align: center;
  margin-bottom: 20px;
}

.help-modal p {
  margin-bottom: 10px;
  line-height: 1.5;
  font-size: 14px;
}

.help-modal p strong {
  color: #005a9b;
}

.close-button {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 28px;
  font-weight: bold;
  color: #aaa;
  background: none;
  border: none;
  cursor: pointer;
}

.close-button:hover,
.close-button:focus {
  color: #333;
  text-decoration: none;
  cursor: pointer;
}
