/* Ensure box-sizing includes padding and borders */
* {
  box-sizing: border-box;
}

svg {
  display: block;
  width: 100%;
}

#states .on {
  fill: #4aaccc6e;
}

#states .state:hover {
  cursor: pointer;
  fill: #4aaccc6e;
}

.popup {
  display: none;
  position: absolute;
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 10px;
  border-radius: 5px;
  pointer-events: none;
  z-index: 10;
  font-size: 14px;
  max-width: 200px;
}

.btn-cta {
  width: 120px;
  display: block;
  margin: 0 auto;
  text-align: center;
  text-transform: uppercase;
  font-size: 20px;
  padding: 10px;
  background: #ccc;
  color: #555;
  text-decoration: none;
  transition: all 0.2s ease-in-out;
  cursor: pointer;
}

.btn-cta:hover {
  background: #bbb;
  color: #222;
  transform: scale(1.05);
}

.overlay {
  position: absolute;
  height: 100%;
  width: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  margin-top: -10%;
  justify-content: center;
  align-items: center;
  pointer-events: none;
  opacity: 0;
  transition: all 0.5s cubic-bezier(0.59, -0.17, 0.3, 1.67);
}

.overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

/* Main container to center the modal */
.main-contact-container {
  display: flex;
  justify-content: center;
 /*  align-items: center; removed djt 260629*/
  height: 100vh;
  max-height: 750px;
  width: 100%;
  margin: 0;
  padding: 0; 
}

/* Modal styles */
.modal {
  display: flex;
  justify-content: center;
  align-items: center;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  background-color: #ddd;
  color: #231D23;
  padding: 30px;
  z-index: 9999;
  height: auto;
  width: 180%;
  max-width: none !important;
  border-radius: 10px;
  overflow: visible;
  margin-left: -10%;
}

/* Map container inside the modal */
.modal .map {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  overflow: visible;
  position: relative;
}

/* Adjust SVG inside the map */
.modal .map svg {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: contain;
}

@media (max-width: 768px) {
  .modal {
    width: 96%;
    padding: 25px 15px 20px 15px;
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    margin: 40px auto 0 auto;
    height: auto;
    box-sizing: border-box;
    overflow: visible;
  }

  .modal .map {
    width: 100%;
    height: auto;
    padding-top: 10px;
  }

  .modal .map svg {
    width: 100%;
    height: auto;
    display: block;
  }
}



#contact-info-popup {
  position: absolute;
  background-color: white;
  border: 1px solid #ccc;
  padding: 10px;
  display: none;
  z-index: 1000;
  max-width: 300px;
  font-family: Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

.svg-states {
  width: 100%;
  max-width: 5000px;
  height: auto;
}

/* Prevent overflow in the row container */
.row {
  width: 100%;
  overflow: hidden;
}

.map-description {
  text-align: center;
  font-size: 1.2rem;
  margin-top: 20px;
  color: #333;
}

@media only screen and (max-width: 768px) {
  .main-contact-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    height: auto;
    margin: 0 auto;
  }

  .modal {
    width: 90%;
    max-width: 100%;
    padding: 20px 15px 15px 15px;
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    margin: 40px auto 0 auto;
    height: auto;
    overflow: visible;
    box-sizing: border-box;
  }

  .modal .map {
    width: 100%;
    height: auto;
    padding-top: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .modal .map svg {
    width: 100%;
    height: auto;
    display: block;
  }

  .svg-states {
    width: 100%;
    max-width: 100%;
    height: auto;
  }

  .map-description,
  h3,
  h4.map-description {
    text-align: center;
    padding: 0 10px;
    font-size: 1.1rem;
    margin-top: 20px;
    color: #333;
  }

  .map {
    width: 100%;
    padding: 0 10px;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
  }

  .wrapper .inner {
    padding-top: 0;
    margin-top: 0;
  }

  .content {
    margin: 0 auto;
    padding: 10px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  form {
    margin: 0 auto;
    width: 100%;
    max-width: 100%;
    padding: 10px;
    box-sizing: border-box;
  }

  form input,
  form select,
  form textarea {
    width: 100%;
    margin-bottom: 15px;
    padding: 10px;
    font-size: 16px;
  }

  .btn-cta,
  input[type="submit"],
  input[type="reset"] {
    width: 100%;
    padding: 12px;
    font-size: 18px;
    margin-top: 10px;
  }

  #ex10.modal {
    padding: 15px;
    width: 100% !important;
    justify-content: center; /* Center vertically */
    align-items: center;     /* Center horizontally */
    max-width: 100%;
    margin: 0 auto;
  }  
}
