/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* Override DaisyUI dropdown menu to enable vertical scrolling and prevent layout interference */
.du-dropdown {
  position: relative !important;
}

.du-dropdown .du-dropdown-content.du-menu {
  position: absolute !important;
  max-height: 20rem !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  /* Let DaisyUI handle visibility, but ensure it doesn't take space when hidden */
  top: 100% !important;
  left: auto !important;
  right: 0 !important;
  /* Force single column layout */
  display: flex !important;
  flex-direction: column !important;
  flex-wrap: nowrap !important;
  width: 18rem !important;
  min-width: 18rem !important;
  max-width: 18rem !important;
  /* Disable interaction when closed */
  pointer-events: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
}

/* Enable interaction only when dropdown is open (focused) */
.du-dropdown:focus .du-dropdown-content.du-menu,
.du-dropdown:focus-within .du-dropdown-content.du-menu,
.du-dropdown.du-dropdown-open .du-dropdown-content.du-menu {
  pointer-events: auto !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.du-dropdown .du-dropdown-content.du-menu > li {
  width: 100% !important;
  flex-shrink: 0 !important;
}
