.glue-dropdown {
  position: absolute;
  top: -5px;
  left: calc(100% + 10px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  width: 280px !important;
  min-width: 140px;
  padding: 0 !important;
  margin: 0 !important;
  display: none;
  z-index: 9999;
  max-height: 464px;
  min-height: 464px;
  height: auto !important;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #666666 transparent;
  display: flex !important;
  flex-direction: column;
  font-weight: 500;
  margin-bottom: 8px;
  border-bottom: none;
  background: #ffcf25;
  border-radius: 16px;
  overflow: hidden;
}

/* Background shapes container */
#glueDropdownShapesGrid {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  border-radius: 16px;
}

#glueDropdownShapesGrid svg.shape {
  position: absolute;
  pointer-events: none;
}

/* Ensure all dropdown content appears above shapes */
.glue-dropdown > *:not(#glueDropdownShapesGrid) {
  position: relative;
  z-index: 1;
}

.glue-dropdown::-webkit-scrollbar {
  width: 2px;
}

.glue-dropdown::-webkit-scrollbar-track {
  background: transparent;
  margin: 4px 0;
}

.glue-dropdown::-webkit-scrollbar-thumb {
  background: #666666;
  border-radius: 1px;
}

.glue-dropdown::-webkit-scrollbar-button {
  display: none;
}

.glue-dropdown-item {
  padding: 16px 24px;
  color: #454554;
  cursor: pointer;
  transition: background-color 0.3s ease;
  display: flex;
  align-items: center;
  gap: 7px;
  position: relative;
  border-radius: 6px;
  margin: 0 4px;
  font-size: 15px;
  padding-right: 64px;
}

.glue-dropdown-item:hover {
  background-color: rgba(255, 255, 255, 0.3);
}

.glue-dropdown-item.selected {
  background-color: #90773c;
  color: white;
}

.glue-dropdown-item::before {
  display: none;
}

.glue-dropdown-item:hover::before {
  display: none;
}

.glue-dropdown-content {
  flex: 1;
  overflow-y: auto;
  padding-bottom: 0px;
  margin-bottom: 0px;
  padding-top: 6px;
}

.glue-dropdown-item .item-content {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.glue-dropdown-item .mini-glue-button {
  padding: 0;
  background: #39b54a;
  border: none;
  border-radius: 8px;
  color: white;
  font-size: 11px;
  font-weight: bold;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s;
  width: 50px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  box-sizing: border-box;
}

.glue-dropdown-item .mini-glue-button:hover {
  opacity: 0.8;
}

.glue-dropdown-item:hover .mini-glue-button {
  opacity: 1;
  visibility: visible;
}

.glue-dropdown-item.glued .mini-glue-button {
  display: none;
}

.glue-dropdown-item .glue-status {
  padding: 0;
  background: #39b54a;
  border: none;
  border-radius: 8px;
  color: white;
  font-size: 11px;
  font-weight: bold;
  cursor: pointer;
  width: 50px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0;
  box-sizing: border-box;
}

.glue-dropdown-item.glued .glue-status {
  opacity: 1;
}

.glue-dropdown-item .glue-status:hover {
  background: #ff7bac;
  width: 58px;
}

.glue-dropdown-item .glue-status::before {
  content: "GLUED";
  transition: content 0.3s ease;
}

.glue-dropdown-item .glue-status:hover::before {
  content: "UNGLUE";
}

.glue-preview-rect {
  width: 29px;
  height: 29px;
  background: rgba(245, 222, 36, 0.9);
  border-radius: 5px;
  flex-shrink: 0;
  display: grid;
  grid-template: repeat(2, 1fr) / repeat(2, 1fr);
  padding: 2px;
  gap: 2px;
  margin-left: -10px;
}

.glue-preview-favicon {
  width: 12px;
  height: 12px;
  object-fit: cover;
  border-radius: 2px;
}

.glue-preview-empty {
  background: rgba(255, 244, 90, 0.3);
  border-radius: 2px;
}

.glue-search-container {
  padding: 14px;
  position: sticky;
  top: 0;
  background: transparent;
  z-index: 1;
  height: 53px;
  box-sizing: border-box;
  width: 100%;
  display: flex;
  justify-content: center;
  flex-shrink: 0;
}

.glue-search-input {
  width: 66%;
  padding: 13px 24px;
  border: none;
  border-radius: 24px;
  background: rgba(245, 222, 36, 0.9) !important;
  font-size: 13px;
  color: #666666;
  box-sizing: border-box;
  transition: background-color 0.3s ease;
}

.glue-search-input:focus {
  background: white !important;
  outline: none;
  font-size: 13px;
}

.glue-search-input::placeholder {
  color: #666666;
  opacity: 0.7;
  font-size: 13px;
}

.create-glubler-section {
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  background: #ffcf25;
  border-top: none;
  border-radius: 0 0 16px 16px;
  z-index: 999;
  padding: 12px 20px;
  padding-top: 8px;
  padding-bottom: 44px;
  box-sizing: border-box;
  flex-direction: column;
  height: auto;
  gap: 10px;
  align-items: center;
  justify-content: center;
  max-height: 0;
  opacity: 0;
  overflow: visible;
  pointer-events: none;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.9s;
  display: flex;
}

.create-glubler-section.active {
  max-height: 222px;
  opacity: 1;
  pointer-events: auto;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0s;
}

.create-new-button {
  position: absolute !important;
  bottom: 8px !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  height: 36px !important;
  background: rgba(245, 222, 36, 0.95);
  z-index: 10;
  opacity: 1;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  font-size: 14px;
  font-weight: bold;
  color: #90773c;
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
  margin: 0;
  border-radius: 0 0 16px 16px;
}

.glue-dropdown-item.subglubler-item {
  background: none;
  padding: 0;
  margin: 5px 15px;
  position: relative;
}

.glue-dropdown-item.subglubler-item .item-content {
  background-color: inherit;
  padding: 8px 4px 8px 15px;
  border-radius: 6px;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background-color 0.3s ease;
  padding-right: 64px;
  font-size: 12px;
  color: white;
}

.glue-dropdown-item.subglubler-item:hover .item-content {
  background-color: rgba(255, 255, 255, 0.3);
  border-radius: 8px;
}

.glue-dropdown-item.subglubler-item.selected .item-content {
  background-color: #90773c;
  color: white;
  border-radius: 8px;
}

.create-glubler-button {
  position: sticky;
  bottom: 0;
  width: 100%;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: #454554;
  cursor: pointer;
  font-size: 11px;
  transition: background-color 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.create-glubler-button:hover {
  background: rgba(255, 255, 255, 0.3);
}

.create-glubler-button .plus-icon {
  width: 13px;
  height: 13px;
  background: #454554;
  border-radius: 3px;
  position: relative;
}

.create-glubler-button .plus-icon::before,
.create-glubler-button .plus-icon::after {
  content: "";
  position: absolute;
  background: #ffe725;
}

.create-glubler-button .plus-icon::before {
  width: 6px;
  height: 2px;
  top: 6px;
  left: 3px;
}

.create-glubler-button .plus-icon::after {
  width: 2px;
  height: 6px;
  top: 3px;
  left: 6px;
}

.glued-list {
  list-style: none;
  padding: 0 12px;
  margin: 0;
  max-height: 200px;
  overflow-y: auto;
}

.glued-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.glued-item:last-child {
  border-bottom: none;
}

.glued-favicon {
  width: 13px;
  height: 13px;
  min-width: 13px;
}

.glued-url {
  color: white;
  text-decoration: none;
  font-size: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.glued-url:hover {
  text-decoration: underline;
}
