.sidebar-container {
  border-radius: 12px;
  border: 1px solid var(--Stroke, #ced4da);
  background: #fff;
  box-shadow: 0px 0px 30px 0px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  width: 20vw;
  padding: 4px;
}

.sidebar-container .header-container {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid #ced4da;
  padding: 7px 20px;
}

.sidebar-container .header-container .image-container {
  display: flex;
  align-items: center;
}

.sidebar-container .header-container .image-container img {
  width: 25px;
  height: 23px;
}

.sidebar-container .header-container .text {
  color: #000;
  font-family: "DM Sans";
  font-size: 18px;
  font-style: normal;
  font-weight: 700;
}

.form-content {
  padding: 1vw;
  height: auto;
  overflow-y: auto;
  overflow-x: hidden;
}


.ol-unselectable ol-overlay slide-right menu-right ol-visible{
width:40%!important;
}

@media (max-width: 768px) {

.ol-unselectable .ol-overlay slide-right .menu-right ol-visible{
width:40%!important;
}


.ol-overlay.menu-right {
width:40%!important;

}




  .form-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px 16px 48px 16px; /* Significantly increased bottom padding */
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    overscroll-behavior-y: contain;
    overscroll-behavior-x: none;
    contain: layout style paint;
    min-height: 0; /* Important for flex child to be scrollable */
    height: calc(95vh - var(--mobile-footer-height) - var(--mobile-header-height)); /* Dynamic calculation */
    max-height: calc(95vh - var(--mobile-footer-height) - var(--mobile-header-height)); /* Dynamic calculation */
  }
}



.filter-form-container .form-group {
  margin-bottom: 12px;
}

@media (max-width: 768px) {
  .filter-form-container .form-group:last-child {
    margin-bottom: 40px; /* Significantly increased margin for last filter */
  }
}

label {
  font-family: "DM Sans";
  font-size: 14px;
  font-weight: 700;
  color: #212529;
  display: flex;
  align-items: center;
}

.info-icon {
  position: relative;
  display: inline-block;
  margin-left: 8px;
  cursor: pointer;
}

.info-icon img {
  width: 16px;
  height: 16px;
}

.tooltip {
  visibility: hidden;
  width: max-content;
  background-color: black;
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 6px 10px;
  position: absolute;
  z-index: 10;
  top: 50%;
  left: 130%;
  transform: translateY(-50%);
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
  white-space: nowrap;
}

.tooltip::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 100%;
  transform: translateY(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: transparent black transparent transparent;
}

.info-icon:hover .tooltip {
  visibility: visible;
  opacity: 1;
}

select {
  width: 100%;
  padding: 10px;
  margin-top: 5px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 14px;
  font-family: "DM Sans";
  box-sizing: border-box;
  color: #b5b5b5;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='black' stroke-width='0.6'><path d='M5 7l5 6 5-6'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 18px;
  padding-right: 40px;
}

select.valid-selection {
  color: #212529;
}

.error {
  color: red;
  font-size: 12px;
  margin-top: 4px;
  display: none;
}

select.valid-selection {
  color: #212529 !important;
}

select {
  color: black !important;
  background-color: transparent;
}

select option[value=""] {
  color: #b5b5b5;
}

select option:not([value=""]) {
  color: #212529;
}

.mobile-sidebar-header {
  display: none;
}

.mobile-filters-footer {
  display: none;
}

/* 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;
  }
}


/* Mobile only */
@media (max-width: 768px) {
  :root {
    --mobile-footer-height: 30vh; /* Significantly increased footer height */
    --mobile-header-height: 8vh;  /* Dynamic header height as % of viewport */
  }
}

/* Small mobile devices */
@media (max-width: 480px) {
  :root {
    --mobile-footer-height: 35vh; /* Much larger footer on smaller screens */
    --mobile-header-height: 10vh; /* Larger header on smaller screens */
  }
}

/* Large mobile devices */
@media (min-width: 481px) and (max-width: 768px) {
  :root {
    --mobile-footer-height: 28vh; /* Significantly increased footer on larger mobile screens */
    --mobile-header-height: 6vh;  /* Smaller header on larger mobile screens */
  }
}

@media (max-width: 768px) {

.locate-me-btn{
    bottom:65%!important;
}

.ol-zoom{
    top:40%!important;
}

.ol-full-screen{
top:16%!important;
}

#mobile-filters-footer{
    z-index:0 !important;
}

  .sidebar-container {
    position: fixed;
    bottom: -100%;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
    height: calc(90vh - var(--mobile-footer-height)); /* Dynamic height calculation */
    max-height: calc(95vh - var(--mobile-footer-height));
    background: #fff;
    border-radius: 12px 12px 0 0;
    transition: bottom 0.3s ease-in-out;
    z-index: 9999; /* Keep original z-index */
    overflow: hidden;
    padding: 0;
    box-shadow: 0px -2px 20px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    overscroll-behavior-y: contain;
    overscroll-behavior-x: none;
    contain: layout style paint;
  }


  .sidebar-container.open {
    bottom: 0;
  }

  /* Prevent body scroll when sidebar is open */
  body.sidebar-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
  }

  .sidebar-container .header-container {
    display: none;
  }



  .mobile-filters-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100vw;
    background: #fff;
    border-radius: 12px 12px 0 0;
    z-index: 9999999;
    box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.15);
    padding: 10px 16px 20px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    box-sizing: border-box;
    /* Ensure visibility on mobile */
    visibility: visible;
    opacity: 1;
  }


  .mobile-filters-footer .mobile-selected-filters-summary {
    width: 100%;
    max-height: 120px;
    overflow-y: auto;
    padding: 10px;
    border: none;
    border-radius: 8px;
    font-family: "DM Sans";
    font-size: 14px;
    color: #212529;
    display: none;
    box-shadow: none;
    background: rgba(255, 255, 255, 0.9);
  }

  .mobile-filters-footer .mobile-selected-filters-summary.active {
    display: block;
  }

  .mobile-filters-footer .mobile-selected-filters-summary .summary-items-container {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: nowrap;
  }

  .summary-item {
    flex: 1 1 50%;
    border: 1px solid #ced4da;
    padding: 8px;
    border-radius: 6px;
    text-align: center;
    background: #f9f9f9;
    font-size: 13px;
  }


  .mobile-filters-footer .mobile-filters-helper-text {
    text-align: center;
    color: var(--naksha-accent, #3333ff);
    font-family: "DM Sans";
    font-size: 11px;
    font-style: normal;
    font-weight: 700;
    width: 100%;
    padding: 6px 8px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.9);
  }

  .mobile-filters-footer .mobile-filters-helper-text.hidden {
    display: none;
  }

  .mobile-filters-footer .mobile-filter-toggle {
    width: 100%;
  }

  .mobile-filters-footer .mobile-filter-toggle button {
    width: 100%;
    max-width: 500px;
    padding: 14px;
    background: #3333ff;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-family: "DM Sans";
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.3s ease;
  }

  .mobile-filters-footer .mobile-filter-toggle button:hover {
    background: #5fb3f0;
  }

  .mobile-filters-footer .mobile-filter-toggle button.disabled {
    background: #ccc;
    cursor: not-allowed;
  }

  .mobile-filters-footer .mobile-filter-toggle button.disabled:hover {
    background: #ccc;
  }

  .mobile-filters-footer .mobile-filter-toggle button img {
    width: 16px;
    height: 18px;
    object-fit: contain;
  }


  .summary-item {
    flex: 1 1 50%;
    padding: 8px;
    text-align: center;
    font-size: 13px;
    border: none;
    background: none;
    position: relative;
  }


  .summary-item:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 10%;
    right: 0;
    height: 80%;
    border-right: 2px dashed #ced4da;
  }







  .mobile-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid #ced4da;
    background: #fff;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    height: var(--mobile-header-height); /* Dynamic header height */
    box-sizing: border-box;
  }

  .mobile-sidebar-header .left-content {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .mobile-sidebar-header .mobile-header-filter-icon {
    width: 33px;
    height: 33px;
    object-fit: contain;
  }


  .mobile-sidebar-header .text {
    color: var(--Dark-text, #1b1b1e);
    font-family: "DM Sans";
    font-size: 20px;
    font-style: normal;
    font-weight: 700;
  }

  .mobile-sidebar-header .close-icon {
    display: flex;
    align-items: center;
    cursor: pointer;
  }

  .mobile-sidebar-header .close-icon img {
    width: 24px;
    height: 24px;
  }


  .mobile-filter-toggle button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
  }

  .mobile-filter-toggle button img {
    width: 16px;
    height: 18px;
    object-fit: contain;
  }

  .mobile-filters-helper-text {

    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: center;
  }

  .mobile-filters-helper-text .mobile-info-icon {
    width: 15px;
    height: 14px;
    object-fit: contain;
  }
}

@media (max-width: 480px) {
  .sidebar-container .header-container .text {
    font-size: 18px;
  }

  label {
    font-size: 13px;
  }

  select {
    font-size: 13px;
    padding: 8px;
  }
}



