/* Dropdown menu styling */
.dropdown-menu {
  display: none;
  position: absolute;
  z-index: 10000;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  overflow-y: auto !important;
  padding: 0;
  text-align: left;
  /* width: 200px; */
  /* min-width: 200px; */
  /* max-width: 200px; */
}

/* Dropdown item styling for all devices */
.dropdown-item {
  /* width: 100%; */
  padding: 14px 18px;
  font-size: 16px;
  border-bottom: 1px solid var(--grey);
  background: var(--baseColor);
  border-left: none;
  border-right: none;
  border-top: none;
  text-align: left !important;
  cursor: pointer;
  text-decoration: none;
  color: #333;
  font-weight: 500;
  margin: 0;
  white-space: normal;
  line-height: 1.3;
  display: flex;
  position: relative !important;
  left: 0 !important;
  width: 100%;
  align-items: center;
  justify-content: space-between;
}

.dropdown-item:hover {
  background-color: #f5f5f5;
}

/* My Notes Dropdown States */
.dropdown-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  color: #666;
  font-size: 14px;
  gap: 8px;
}

.dropdown-loading i {
  font-size: 16px;
}

.dropdown-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 16px;
  color: #666;
  text-align: center;
}

.dropdown-empty i {
  font-size: 24px;
  margin-bottom: 8px;
  color: #ccc;
}

.dropdown-empty span {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 4px;
}

.dropdown-empty small {
  font-size: 12px;
  color: #999;
}

.dropdown-divider {
  height: 1px;
  background-color: #e0e0e0;
  margin: 8px 0;
}

.template-builder-link {
  color: #4285f4 !important;
  font-weight: 500;
}

.template-builder-link:hover {
  background-color: rgba(66, 133, 244, 0.1) !important;
}

.js-dropdown-container {
  position: relative;
  display: flex;
  height: fit-content;
  margin-left: 0; /* Remove the margin to ensure even spacing */
  flex-shrink: 0;
  flex-grow: 0;
}

.dropdown-header-back {
  padding: 0.5rem;
  /* padding-left: 0.5rem; */
  /* padding-bottom: 0.5rem; */
}

.dropdown-header-back:hover {
  background-color: var(--baseColorHover);
}
.dropdown-header-back:active {
  background-color: var(--baseColorActive);
}

.span-note-generation > i {
  margin-right: 0.5rem;
}

/* Override any styles from styles.css that could be affecting container widths */
@media (max-width: 768px) {
  .js-dropdown-container {
    z-index: 9999;
    position: absolute;
    bottom: 1rem;
    right: 1rem;
  }

  /* Dropdown menu positioning and styling */
  .dropdown-menu {
    flex-direction: column;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100vw !important;
    height: 100vh;
    z-index: 999999;
    /* background-color: var(--baseColor); */
    background-color: transparent;
    /* border-radius: 8px; */
    border-radius: 0;
    /* box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2); */
    box-shadow: none;
    overflow-y: hidden;
  }

  .dropdown-header-mobile {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
  }

  .dropdown-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Dimmed background */
    backdrop-filter: blur(2px); /* Optional: slight blur effect */
    z-index: 1; /* Behind the sheet */
  }

  .dropdown-sheet {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60vh;
    background-color: var(--baseColor);
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
    z-index: 999999999; /* On top of overlay */
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .dropdown-header-mobile > span {
    font-size: 1.2rem;
    font-weight: 700;
    color: #333;
  }

  .dropdown-header-mobile > button {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #555;
    padding: 5px;
  }

  .dropdown-item {
    padding: 16px 18px;
    text-align: left;
    font-weight: 500;
    font-size: 16px;
    color: var(--primaryText);
    line-height: 1.3;
    white-space: normal;
    min-height: 52px;
    border-radius: 0.5rem;
    border: 1px solid var(--grey);
    margin-bottom: 0.5rem;
    margin-left: 2rem;
    margin-right: 2rem;
    width: calc(100% - 4rem);
  }

  .btn-template-mobile {
    width: 4rem;
    height: 4rem;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 4rem;
  }
  .btn-template-mobile > span {
    font-size: 24px;
    line-height: 24px;
  }
  .dropdown-header,
  .mobile-section-header {
    color: var(--secondaryText);
    margin: 1rem;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
  }

  .btn-template-builder-mobile {
    justify-content: center;
    align-items: center;
    margin-top: 2rem;
    border: 2px dashed var(--blue);
    color: var(--blue);
    background-color: var(--primaryAccentLight);
  }
  .btn-template-builder-mobile > i {
    margin-right: 0.5rem;
  }
  .mobile-scroll-content {
    padding-bottom: 5rem;
    overflow-y: auto;
  }
}
