/* Text Marking Context Menu Styles */

/* Text Marking Context Menu Styles */
#textMarkingContextMenu {
  position: absolute;
  bottom: calc(55px + 5px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 1001;
  display: none;
  background: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: 0.375rem;
  padding: 0.5rem;
  gap: 0.25rem;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  opacity: 0;
  /* Default transition for appearing: fast bottom, slow opacity */
  transition: opacity 0.4s ease-in-out, bottom 0.4s ease-in-out;
}

/* When text marking context menu is active, show and adjust bottom position */
#textMarkingContextMenu.show {
  display: flex !important;
  bottom: calc(55px + 13px);
  opacity: 1;
  /* Transition for disappearing: fast opacity, slow bottom */
  /* transition: opacity 0.1s ease-in-out, bottom 0.4s ease-in-out; */
}

/* Responsive button text - only show text on large screens and up */
#textMarkingContextMenu .btn .d-none.d-lg-inline {
  display: none !important;
}

@media (min-width: 992px) {
  #textMarkingContextMenu .btn .d-none.d-lg-inline {
    display: inline !important;
  }
}

/* Mobile Responsive */
@media (max-width: 768px) {
  #textMarkingContextMenu {
    position: fixed;
    bottom: 70px;
    left: 1rem;
    right: 1rem;
    transform: none;
  }

  #textMarkingContextMenu.show {
    display: flex !important;
    bottom: 70px;
    opacity: 1;
  }
}

#textMarkingContextMenu.show {
  opacity: 1;
}

/* Text Highlighting Styles */
/* Only apply selection highlighting for authenticated users */
.regulation-content.authenticated-user::selection {
  background-color: var(--bs-primary-hover);
}

/* Tooltip button styles - ensure text is visible */
.regulation-tooltip-custom .btn-primary {
  color: white !important;
  background-color: var(--bs-primary) !important;
  border-color: var(--bs-primary) !important;
}

.regulation-tooltip-custom .btn-primary:hover {
  color: white !important;
  background-color: var(--bs-primary-hover) !important;
  border-color: var(--bs-primary-hover) !important;
}
