.popup-menu {  
  background: var(--gm3-sys-color-surface-container-high, #e9eef6);
  border-radius: 28px;
  border: none;
  box-shadow: 0 4px 8px 3px rgba(0,0,0,.15), 0 1px 3px rgba(0,0,0,.3);
  box-sizing: border-box;
  top: 60px; /* Adjusted for closer top alignment */
  right: 20px;
  width: 330px;
  display: none;
  position: fixed;
  overflow: hidden;
  margin: 3px auto;
  overflow-y: auto;
  max-height: 600px;
  padding-right: 3px;
  padding-left: 8px;
  padding-bottom: 0px;
  padding-top: 8px;
  z-index: 1000; /* Ensures the menu is on top of other content */
}

.icon-lists {
  height: 100%;
  overflow: visible;
}

.icon-list {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, .2);
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* Adjust this as needed */
  gap: 16px; /* Adjust the gap to manage space between icons */
  padding: 16px; /* Adjust the padding for space around the grid */
  align-items: center; /* Vertically centers the content in each cell */
  justify-items: center; /* Horizontally centers the content in each cell */
 border-top: 20px solid transparent; /* Creates space at the top inside the scrollable area */
  border-bottom: 20px solid transparent; /* Creates space at the bottom inside the scrollable area */

}
.icon-lists::after {
  content: '';
  display: block;
  height: 1px;
  margin-right: -10px; /* Offset for scrollbar width */
}

.top {
  border-top-left-radius: 28px;
  border-top-right-radius: 28px;
}

.bottom {
  border-bottom-left-radius: 28px;
  border-bottom-right-radius: 28px;
}

.divider {
  height: 4px;
  background: #e9eef6;
}

/* Icon and text styling */
.icon-list > div {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: rgba(0, 0, 0, .87);
  font-family: Roboto, RobotoDraft, Helvetica, Arial, sans-serif;
  text-align: center;
}
.icon-link {
 display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none; /* This removes the underline from links */
  color: rgba(0, 0, 0, .87); /* Sets the text color */
  font-family: 'Roboto', sans-serif; /* Sets the font */
  font-size: 14px; /* Sets the size of the font */
}

.icon {
  width: 42px; /* Icon size */
  height: 42px; /* Maintain aspect ratio */
background-color: #ffffff;
  margin: 0 auto; /* Centers the icon horizontally */
	display: flex; /* Ensures the icon container uses flexbox */
  align-items: center; /* Center content vertically */
  justify-content: center; /* Center content horizontally */
}

.icon-link span {
  font-family: inherit;
  color: inherit;
  text-decoration: inherit;
}
.icon + span {
 margin-top: 10px;/* Space between icon and text */
  display: block; /* Ensure span takes its own line */
}
.icon-lists {
overflow-y: auto;
  max-height: 400px; /* Adjust to your preference */
  overflow-y: scroll;
  overflow-x: hidden;
}
.icon-list.top {
  padding-top: 20px; /* Adjust the value to create more space at the top */
}

.icon-list.bottom {
  padding-bottom: 20px; /* Adjust the value to create more space at the bottom */
}

.icon-lists::-webkit-scrollbar {
  width: 5px;
}

.icon-lists::-webkit-scrollbar-track {
  background: transparent;
  
}

.icon-lists::-webkit-scrollbar-thumb {
  background-color: rgba(31, 31, 31, .16);
  border-radius: 0;
  border: 2px solid transparent;
}
