/* Map Canvas */
.map_canvas {
  width: 100%; /* Ensure the map takes up the full width */
  height: 100vh; /* Maintain the height */
  position: relative; /* Ensure proper stacking context */
  z-index: 1; /* Ensure the map canvas is below the search box and info window */
}

body {
  margin: 0;
}

/* ~~ Top Navigation Bar ~~ */
.navigation-container {
  width: 100%;
  height: 60px;
}

.navigation-bar {
  background-color: #004080;
  height: 60px;
  width: 100%;
  position: fixed; /* Fix the navigation bar at the top */
  top: 0;
  left: 0;
  z-index: 1000; /* Ensure it stays above other elements */
}

.logo {
  width: 45px;
  padding: 10px;
}

/* Search Box */
#search {
  position: absolute;
  top: 70px;
  left: 10px;
  width: calc(100% - 20px); /* Make the search bar responsive */
  max-width: 500px; /* Limit the maximum width for larger screens */
  height: calc(1.5em + .75rem + 2px);
  padding: .375rem .75rem;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: #495057;
  background-color: #fff;
  border: 1px solid #ced4da;
  z-index: 1000; /* Ensure it stays above the map but below the info window */
}

#search:focus {
  outline: 3px solid #80BDFF;
}

/* Legend style */
.map-legend {
  display: block;
  position: absolute; /* Position it relative to the map */
  left: 10px;
  bottom: 25px;
  padding: 10px;
  background-color: rgba(255, 255, 255, 0.9); /* Add a semi-transparent background */
  border-radius: 5px;
  font-size: 14px;
  font-family: 'Barlow', sans-serif;
  z-index: 1000; /* Ensure it stays above the map */
}

/* Colors for Legend */
.bg-planned {
  background-color: #05d5ff;
}

.bg-inprogress {
  background-color: #03ff9a;
}

.bg-ready {
  background-color: #ffb784;
}

/* Infowindow pictures */
.info {
  display: block;
  margin: auto;
  width: 80px;
  height: 80px;
  font-family: 'Barlow', sans-serif;
  font-size: 1.5rem;
}

.infoTextH1,
.infoTextH2,
.infoText,
.infoAddress {
  font-family: 'Barlow', sans-serif;
  text-align: center;
  font-size: 16px;
}

.infoTextH1 {
  font-weight: bold;
}

.infoTextH2 {
  font-weight: bold;
  color: #004080;
}

.infoAddress {
  font-weight: bold;
}

/* Modern Button */
.modern-button {
  font-family: Arial, sans-serif;
  padding: 12px 25px;
  font-size: 16px;
  font-weight: bold;
  color: #fff;
  background-color: #004080;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  text-align: center;
  transition: background-color 0.3s, border-color 0.3s;
  box-sizing: border-box;
}

.modern-button:hover {
  background-color: #5FECFF;
  color: #000;
  border: 2px solid #5FECFF;
}

.modern-button:focus {
  outline: none;
  border: 2px solid #5FECFF;
}

.modern-button:active {
  background-color: #4AD9E4;
  border: 2px solid #4AD9E4;
}

/* Custom Map Control Button */
.custom-map-control-button {
  border: 2px solid #004080;
  border-radius: 5px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  margin: 10px;
  padding: 8px 16px;
  font-size: 14px;
  font-family: Arial, sans-serif;
  font-weight: bold;
  background-color: #004080;
  color: #fff;
  transition: background-color 0.3s, color 0.3s;
}

.custom-map-control-button:hover {
  color: #004080;
  background-color: #fff;
}

/* General styles for map control icons */
.custom-map-control-icon {
  width: 40px;
  height: 40px;
  background-color: #fff;
  border: 1px solid #004080;
  border-radius: 5px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  position: fixed; /* Fixed positioning for consistent placement */
  z-index: 1101; /* Ensure icons are above the map but below other UI elements */
}

.custom-map-control-icon:hover {
  background-color: #004080;
  border-color: #5FECFF;
}

/* Locate button styles */
.custom-locate-icon {
  position: fixed;
  top: 300px; /* Position below the Layers button */
  right: 20px;
  width: 40px;
  height: 40px;
  background-color: #fff;
  border: 1px solid #ccc;
  border-radius: 5px;
  background-image: url("/pictures/locate.png");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  cursor: pointer;
  z-index: 1101;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.custom-locate-icon:hover {
  background-color: #f0f0f0;
}

/* Layers button styles */
.custom-layer-icon {
  position: fixed;
  top: 200px; /* Position below the Sites button */
  right: 20px;
  width: 40px;
  height: 40px;
  background-color: #fff;
  border: 1px solid #ccc;
  border-radius: 5px;
  background-image: url("/pictures/layers.png");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  cursor: pointer;
  z-index: 1101;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.custom-layer-icon:hover {
  background-color: #f0f0f0;
}

/* Sites button styles */
.custom-sites-icon {
  position: fixed;
  top: 100px; /* Position above the Layers button */
  right: 20px;
  width: 40px;
  height: 40px;
  background-color: #fff; /* Set background to white */
  border: 1px solid #ccc; /* Add a border for better visibility */
  border-radius: 5px; /* Rounded corners */
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1101; /* Ensure it stays above the map but below other UI elements */
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3); /* Add a subtle shadow */
}

.custom-sites-icon img.custom-icon {
  width: 30px; /* Adjust the size of the logo */
  height: auto;
}

.custom-sites-icon:hover {
  background-color: #f0f0f0; /* Light gray background on hover */
}

/* Modernize the site list */
#polygon-list {
  font-family: 'Barlow', sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

#polygon-list div {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

#polygon-list input[type="checkbox"] {
  margin-right: 10px;
  width: 16px;
  height: 16px;
  cursor: pointer;
}

#polygon-list label {
  cursor: pointer;
  flex-grow: 1;
}

/* Hover text for buttons */
.hover-text {
  position: absolute;
  bottom: 120%;
  left: 50%;
  transform: translateX(-50%);
  background-color: #004080;
  color: #fff;
  padding: 5px 15px;
  border-radius: 5px;
  font-size: 14px;
  white-space: nowrap;
  z-index: 1200;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease-in-out, visibility 0.2s ease-in-out;
}

.custom-map-control-icon:hover .hover-text {
  opacity: 1;
  visibility: visible;
}

/* Info window styles */
.gm-style-iw {
  z-index: 2000 !important; /* Ensure the info window is above the search box */
  overflow: visible; /* Prevent clipping of content */
}

/* Adjust styles for mobile devices */
@media (max-width: 768px) {
  #search {
    width: calc(100% - 50px);
    left: 5px;
    top: 70px;
  }

  .custom-map-control-icon {
    width: 30px;
    height: 30px;
  }

  .custom-layer-icon {
    bottom: 450px;
    right: 10px;
  }

  .custom-locate-icon {
    bottom: 380px;
    right: 10px;
  }
  .custom-sites-icon {
    bottom: 480px;
    right: 10px;
  }
  body {
    margin: 0;
    padding: 0;
    overflow: hidden;
  }
}

/* Customize the form container */
/* Center the signup form */
#splynx-signup-widget-frame {
  display: block;
  margin: 0 auto; /* Center horizontally */
  max-width: 800px; /* Optional: Limit the maximum width */
  min-height: 800px; /* Set a minimum height */
  border: 2px solid #004080; /* Optional: Add a border for styling */
  border-radius: 10px; /* Optional: Add rounded corners */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Optional: Add a shadow */
}

/* Customize the form fields */
iframe[data-widget-type="embedded"] {
  background-color: #f9f9f9; /* Light background */
  padding: 10px; /* Add padding inside the form */
}

/* Customize the buttons */
iframe[data-widget-type="embedded"] button {
  background-color: #004080; /* Change button color */
  color: #fff; /* White text */
  border: none; /* Remove border */
  border-radius: 5px; /* Rounded corners */
  padding: 10px 10px; /* Add padding */
  font-size: 16px; /* Increase font size */
  cursor: pointer; /* Pointer cursor */
}

iframe[data-widget-type="embedded"] button:hover {
  background-color: #003060; /* Darker blue on hover */
}

/* Customize the form title */
iframe[data-widget-type="embedded"] h1,
iframe[data-widget-type="embedded"] h2 {
  color: #004080; /* Change title color */
  font-family: 'Arial', sans-serif; /* Change font */
  text-align: center; /* Center align */
}

/* Customize input fields */
iframe[data-widget-type="embedded"] input[type="text"],
iframe[data-widget-type="embedded"] input[type="email"],
iframe[data-widget-type="embedded"] input[type="tel"] {
  border: 1px solid #ccc; /* Add a border */
  border-radius: 5px; /* Rounded corners */
  padding: 10px; /* Add padding */
  width: 100%; /* Full width */
  margin-bottom: 15px; /* Add spacing */
}

/* Customize labels */
iframe[data-widget-type="embedded"] label {
  font-weight: bold; /* Bold text */
  color: #333; /* Darker text color */
  display: block; /* Ensure labels are above inputs */
}

/* Form container layout */
.form-container {
  display: flex;
  align-items: stretch; /* Ensure both the image and form stretch to the same height */
  justify-content: center;
  max-width: 1400px; /* Increase the container width */
  margin: 50px auto;
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  height: 800px; /* Make the container take up the full viewport height */
}

/* Left side image */
.form-image {
  flex: 1;
  background-image: url('https://milanifibre.co.za/wp-content/uploads/2024/09/pexels-andres-ayrton-6578805-EDIT-02-1-1.jpg');
  background-size: cover;
  background-position: center;
  height: 100%; /* Ensure the image takes up the full height of the container */
}

/* Right side form */
.form-content {
  flex: 1.5; /* Make the form section larger */
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center; /* Center the form vertically */
  overflow: hidden; /* Remove the scrollbar */
  height: 800px; /* Make the container take up the full viewport height */

}

/* Splynx iframe */
#splynx-signup-widget-frame {
  display: block;
  width: 100%;
  border: none;
}