html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  color: #000;
  background: #fff;
  font-family: Arial, sans-serif;
  font-size: 15px;
  overflow: auto;
}

a {
  color: black;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.outerbox {
  margin: 12pt;
  width: calc(100% - 24pt);
  height: calc(100vh - 24pt);
  display: flex;
  flex-direction: column;
  padding: 0;
  position: relative;
}

.header-container {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  z-index: 600;
}

.hometitle, .hometitles {
  background: rgba(255, 255, 255, 0.459);
  display: inline-block;
  font-family: Arial, sans-serif;
  letter-spacing: 1px;
}

.hometitle {
  font-size: 15px;
  font-weight: bold;
}

.hometitles {
  font-size: 13px;
  color: rgb(27, 27, 27);
  padding: 0;
}

.hometitles a:hover {
  color: rgb(52, 52, 52);
}

#loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.8);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

#loading-progress {
  width: 200px;
  height: 10px;
  background-color: #f0f0f0;
  border-radius: 5px;
  overflow: hidden;
  margin-top: 10px;
}

#loading-bar {
  width: 0;
  height: 100%;
  background-color: #005892;
  transition: width 0.5s ease;
}

#loading-message {
  font-size: 12px;
  font-family: arial;
  font-weight: normal;
}

.model-description {
  font-size: 13px;
  color: #333;
  background: rgba(255, 255, 255, 0.8);
  margin-bottom: 5px;
  display: block;
  line-height: 1.4;
  z-index: 550;
}

.nysmodel-container {
  width: 100%;
  height: calc(100% - 80px);
  position: relative;
  overflow: hidden;
}

button {
  width: 25px;
  height: 25px;
  color: #333;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin: 2px;
  border: none;
}

button:hover {
  background: rgba(199, 199, 199, 0.9);
}

button.active {
  background-color: #0078ff;
  color: white;
}

#controls-container {
  position: absolute;
  display: flex;
  flex-direction: column;
  z-index: 100;
  top: 0px;
  left: 0px;
  background: rgba(255, 255, 255, 0.8);
}

/* Layer Buttons */
#controls-container .layer-button {
  width: 100%; /* Full width of the container */
  height: auto;
  padding: 8px;
  font-size: 12px;
  color: #000000;
  font-weight: bold;
  background: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  white-space: normal;
  display: block;
  margin: 0px;
  box-sizing: border-box; /* Include padding in width */
}

#controls-container .layer-button:hover {
  background: rgba(230, 230, 230, 0.9) !important;
}

#controls-container .layer-button.active {
  background: #747474 !important;
  color: #ffffff;
}

#controls-container .layer-button[data-layer="satellite"] {
  background: #daa805;
}

#controls-container .layer-button[data-layer="water"] {
  background: #64b5f6;
}

#controls-container .layer-button[data-layer="farmland"] {
  background: #81c784;
}

.controls-group {
  padding: 0;
  width: 100%;
}

.group-label {
  display: none;
}

.controls-grid {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  margin-bottom: 0;
  width: 100%;
}

.controls-row {
  display: flex;
  width: 100%;
}

.control-section {
  flex: 1;
  width: 100%;
}

.layer-buttons-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 5px;
  background: #c0c0c0;
  width: 100%; /* Full width */
}

.control-buttons-group {
  display: flex;
  flex-direction: column;
  padding: 5px;
  background: #80808070;
  margin-bottom: 5px;
  width: fit-content; 
}

.control-buttons-group button {
  cursor: pointer;
  text-align: center; 
  background: rgba(255, 255, 255, 0.8);
  transition: all 0.2s ease;
  box-sizing: border-box; 
}

.control-buttons-group button:hover {
  background: rgba(230, 230, 230, 0.9);
}

@media (max-width: 430px) {
  .outerbox {
    width: calc(100% - 16px);
    height: calc(100% - 16px);
    margin: 8px;
  }

  .hometitle,
  .hometitles {
    margin: 0 0px 3px 0;
  }

  .homebox {
    margin: 8px;
    gap: 5px;
  }
}