html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: sans-serif;
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
  /* background-color: rgb(224, 224, 224); */
}

@media (max-width: 768px) {
  body {
    overflow-x: hidden;
    overflow-y: auto;
    height: 100vh;
  }

  #header-parent-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    background: #fff;
    width: 100%;
  }

  .container {
    margin-top: 120px; /* Account for fixed header */
  }
}


.map-background {
  flex-grow: 1;
  margin-top: 1vw;
  margin-right: 1vw;
}

/* overriding map style */
.bn-container .map{
  border-radius: 12px;
}

.custom-mouse-position{
  top:.5em;
  color: blue;
  font-size: 12px;
  left: .5em;
}
/* ===================== */

.container {
  position: relative;
  display: flex;
  flex-direction: row;
  gap: 1vw;
  background-color: white;
  padding-bottom: 1vw;
  /* height: 100%; */
}

@media (max-width: 768px) {
  .container {
    flex-direction: column;
    gap: 0;
    padding-bottom: 0;
    height: calc(100vh - 120px); /* Account for header and footer */
  }

  #sidebar-parent-container {
    margin-left: 0;
    margin-top: 0;
    position: relative;
    z-index: 1000;
  }

  #mapView {
    margin-top: 0;
    margin-right: 0;
    flex: 1;
    min-height: 60vh;
  }
}

#sidebar-parent-container {
margin-left: 2vw;
margin-top: 1vw;
}

@media (max-width: 768px) {
  #sidebar-parent-container {
    margin-left: 0;
    margin-top: 0;
  }
}

#menu-parent-container {
  position: absolute;
  right: 0;
  top: 15%;
  right: 2%;
}

@media (max-width: 768px) {
  #menu-parent-container {
    position: fixed;
    top: auto;
    bottom: 80px;
    right: 10px;
    left: auto;
    z-index: 1001;
  }
}

/* General modal styling */
.small-modal,
.centered-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;

  z-index: 99999999; /* Higher than mobile filters footer */
}

.modal-content {
  background: white;
  border-radius: 8px;
  /* text-align: center; */
}

#centered-modal .modal-content {
  background: white;
  border-radius: 12px;
  /* text-align: center; */
  width: 35vw;
}

/* Centered modal positioning */
#centered-modal .modal-content {
  position: absolute;
  top: 54%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.small-modal .modal-content .view-container {
  display: flex;
  gap: 8px;
  padding: 20px;
  align-items: center;
  cursor: pointer;
}

.small-modal .modal-content .view-container .image-container {
  display: flex;
  align-items: center;
}

.small-modal .modal-content .view-container .image-container img {
  width: 24.492px;
  height: 24.492px;
}

.small-modal .modal-content .view-container .text {
  color: #3333ff;
  font-family: Quicksand;
  font-size: 14px;
  font-style: normal;
  font-weight: 700;
}

.small-modal .modal-content .plot-container {
  border-bottom: 1px solid #ced4da;
  padding: 15px;
}

.small-modal .modal-content .plot-container .text .sub-text {
  color: var(--Dark-text, #1b1b1e);
  font-family: "DM Sans";
  font-size: 14px;
  font-style: normal;
  font-weight: 600;
}

.small-modal .modal-content .plot-container .text {
  color: var(--Dark-text, #1b1b1e);
  font-family: "DM Sans";
  font-size: 12px;
  font-style: normal;
  font-weight: 500;
  margin: 0 0 0 5px;
}

.modal-content .modal-header {
  display: flex;
  justify-content: space-between;
  padding: 13px 24px;
  border-bottom: 1px solid #ced4da;
}

.modal-content .modal-header .text {
  color: var(--Dark-text, #1b1b1e);
  font-family: "DM Sans";
  font-size: 20px;
  font-style: normal;
  font-weight: 700;
}

.modal-content .modal-header img {
  width: 24px;
  height: 24px;
  translate: transform 0.3s ease;
  cursor: pointer;
}

.modal-content .modal-header img:hover {
  transform: scale(1.03);
}

.modal-content .table-container {
  display: flex;
  flex-direction: column;
  padding: 24px;
  height: 48vh;
  overflow: auto;
}

.modal-content .table-container .row-container {
  border-bottom: 2px dashed #ced4da;
  display: flex;
  justify-content: space-between;
  padding: 14px 0px;
}

.modal-content .table-container .row-container:nth-of-type(4) {
  border-bottom: none;
  display: flex;
  justify-content: space-between;
  padding: 14px 0px;
}

.modal-content .table-container .row-container .title {
  color: var(--Dark-text, #1b1b1e);
  font-family: "DM Sans";
  font-size: 12px;
  font-style: normal;
  font-weight: 500;
}

.modal-content .table-container .row-container .value {
  color: var(--light-text, #6c757d);
  text-align: right;
  font-family: "DM Sans";
  font-size: 14px;
  font-style: normal;
  font-weight: 500;
}

.modal-content .submit-container {
  border: 1.02px solid #ced4da;
  background: #fff;
  box-shadow: 0px 0px 22.655px 0px rgba(0, 0, 0, 0.18);
  display: flex;
  justify-content: right;
  align-items: center;
  padding: 18px 24px;
  gap: 8px;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
  cursor: pointer;
}

.modal-content .submit-container .image-container {
  display: flex;
  align-items: center;
}

.modal-content .submit-container .image-container img {
  width: 24.492px;
  height: 24.492px;
}

.modal-content .submit-container .text {
  color: #3333ff;
  font-family: "DM Sans";
  font-size: 14px;
  font-style: normal;
  font-weight: 700;
}

@media (max-width: 768px) {
  #sidebar-parent-container,
  #menu-parent-container {
    position: fixed;
    top: 80px;
    left: 10px;
    right: 10px;
    width: auto;
    display: flex;
    justify-content: space-between;
    z-index: 1000;
  }

  #menu-parent-container {
    justify-content: flex-end;
  }

  /* Ensure mobile filters footer is visible */
  #mobile-filters-footer {
    display: flex !important;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999999;
  }

  /* Adjust map container for mobile */
  #mapView {
    height: calc(100vh - 200px);
    margin-bottom: 80px; /* Space for mobile filters footer */
  }

  /* Modals full width */
  #centered-modal .modal-content {
    top: auto;
    bottom: 0;
    left: 0;
    transform: none;
    width: 100%;
    border-radius: 24px 24px 0 0;
    max-height: 90vh;
    overflow-y: auto;
}

  .modal-content .modal-header {
    padding: 15px;
    flex-wrap: wrap;
  }

  .modal-content .table-container {
    padding: 10px;
  }

  .modal-content .submit-container {
    flex-direction: column;
    align-items: center;
    padding: 10px;
  }

  .modal-content .table-container .row-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  #centered-modal .modal-content {
    top: auto;
    bottom: 0;
    left: 0;
    transform: none;
    width: 100%;
    border-radius: 12px 12px 0 0;
    max-height: 90vh;
    overflow-y: hidden;
    height: 70vh;
    display: flex;
    flex-direction: column;
}


#centered-modal .modal-content .table-container {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

  #centered-modal .modal-content button {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    font-family: "DM Sans";
    font-weight: 700;
    background: #3333ff;
    color: #fff;
    border: none;
    border-radius: 0 0 12px 12px;
    cursor: pointer;
  }

  #centered-modal .modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
  }
  #centered-modal .modal-content button:hover {
    background: #5fb3f0;
  }

  .centered-modal .modal-content .table-container .row-container {
    border-bottom: 2px dashed #ced4da;
    display: flex;
    justify-content: space-between;
    padding: 14px 0px;
    flex-direction: row;
  }

  .centered-modal .modal-content .submit-container {
    border: 1.02px solid #ced4da;
    background: #fff;
    box-shadow: 0px 0px 22.655px 0px rgba(0, 0, 0, 0.18);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 18px 24px;
    gap: 8px;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    cursor: pointer;
    flex-direction: row;
  }

  .centered-modal .modal-content .submit-container .image-container {
    display: flex;
    align-items: center;
  }

  .centered-modal .modal-content .submit-container .image-container img {
    width: 24.492px;
    height: 24.492px;
  }

  .centered-modal .modal-content .submit-container .text {
    color: #3333ff;
    font-family: "DM Sans";
    font-size: 14px;
    font-style: normal;
    font-weight: 700;
  }

  #mobile-land-info-footer {
    flex-direction: column;
    width: 100%;
    background: #fff;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.15);
    padding: 16px;
  }

  #mobile-land-info-footer .land-info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #ced4da;
    padding-bottom: 10px;
    margin-bottom: 16px;
  }

  #mobile-land-info-footer .land-info-header .left-heading {
    font-size: 20px;
    font-weight: 700;
    color: var(--Dark-text, #1b1b1e);
    font-family: "DM Sans";
  }

  #mobile-land-info-footer .land-info-header .close-icon {
    cursor: pointer;
  }

  #mobile-land-info-footer .land-info-header .close-icon img {
    width: 24px;
    height: 24px;
  }


  #mobile-land-info-footer .land-info-body {
    font-size: 14px;
    color: #212529;
    font-family: "DM Sans";
  }

  .small-modal .modal-content {
    width: 60vw!important;
    left: 5%;
    right: 5%;
  }

  .small-modal .modal-content .view-container {
    padding: 10px;
    justify-content: center;
  }

}

@media (max-width: 480px) {
  .small-modal .modal-content {
    width: 90vw;
    left: 5%;
    right: 5%;
  }

  .small-modal .modal-content .view-container {
    padding: 10px;
  }
}


.footer-container {
  position: relative;
  bottom: 0;
  background-color: #3333ff;
  width: 100%;
  padding: 9px;
}

.footer-container .text {
  color: white;
  font-family: "DM Sans";
  font-size: 14px;
  font-style: normal;
  font-weight: 500;
  text-align: center;
}

td {
  vertical-align: top;
}

/* Ensure mobile filters footer is completely hidden on desktop */
@media (min-width: 769px) {
  #mobile-filters-footer {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }
}

@media (max-width: 768px) {
  .footer-container {
    display: none !important;
  }
}


#__bn-right-panel #overlaytable tbody tr td {
  vertical-align: middle;
  font-size: 12px;
}