/*
 * =============================================================================
 * FILE: base.css
 * =============================================================================
 * PURPOSE: Staff menu navigation styles for desktop and mobile layouts
 * 
 * RELATIONSHIPS:
 *   Template:   templates/base.html (primary)
 *   CSS:       style.css (shares navbar and button styles)
 *   JS:        static/js/base.js (navbar icon interactions)
 *   Inherits:  Bootstrap framework via base.html
 * 
 * SCOPE:
 *   - Staff menu icon swap (hover/focus states)
 *   - Mobile button background fixes
 *   - Desktop dropdown positioning (>=992px)
 * =============================================================================
 */

/* -----------------------------------------------------------------------------
 * Staff Menu - Desktop and Mobile
 * Contains icon swap logic and mobile button fixes
 * -----------------------------------------------------------------------------
 */

/* Default state: hide hover icon and show normal icon */
#staffMenuDropdownLarge .icon-hover,
#staffMenuDropdownSmall .icon-hover {
  display: none !important;
}

#staffMenuDropdownLarge .icon-default,
#staffMenuDropdownSmall .icon-default {
  display: inline-block !important;
}

/* Mobile button fix: prevent white background on tap/hover/focus */
.navbar .btn-outline-light:hover,
.navbar .btn-outline-light:focus,
.navbar .btn-outline-light:active {
  background-color: transparent !important;
  color: #fff !important;
  border-color: #fff !important;
  box-shadow: none !important;
}

/* -----------------------------------------------------------------------------
 * Desktop View (>=992px)
 * Icon swap on hover/focus and dropdown positioning
 * -----------------------------------------------------------------------------
 */
@media (min-width: 992px) {
  /* Swap icons on hover/focus for staff menu */
  #staffMenuDropdownLarge:hover .icon-default,
  #staffMenuDropdownLarge:focus .icon-default {
    display: none !important;
  }

  #staffMenuDropdownLarge:hover .icon-hover,
  #staffMenuDropdownLarge:focus .icon-hover {
    display: inline-block !important;
  }

  /* Maintain transparent background on all staff menu states */
  .navbar .btn-outline-light#staffMenuDropdownLarge,
  .navbar .btn-outline-light#staffMenuDropdownLarge:hover,
  .navbar .btn-outline-light#staffMenuDropdownLarge:focus,
  .navbar .btn-outline-light#staffMenuDropdownLarge:active {
    background-color: transparent !important;
    color: #fff !important;
    border-color: #fff !important;
    box-shadow: none !important;
  }

  /* Dropdown alignment: shift menu to the right to prevent overflow */
  #staffMenuDropdownLarge + .dropdown-menu {
    right: -92px !important;
    left: auto !important;
    transform: none !important;
    max-width: calc(100vw - 16px) !important;
    overflow-x: hidden !important;
  }
}

/* -----------------------------------------------------------------------------
 * User Menu - Entity Titles
 * Styling for entity section headers in the user dropdown
 * -----------------------------------------------------------------------------
 */

/* Target entity titles (dropdown headers) specifically within the user, staff, and config menus */
#userMenuDropdownSmall + .dropdown-menu .dropdown-header,
#userMenuDropdownLarge + .dropdown-menu .dropdown-header,
#staffMenuDropdownSmall + .dropdown-menu .dropdown-header,
#staffMenuDropdownLarge + .dropdown-menu .dropdown-header,
#configMenuDropdownSmall + .dropdown-menu .dropdown-header,
#configMenuDropdownLarge + .dropdown-menu .dropdown-header {
    color: #000000 !important;
    font-weight: bold !important;
    text-decoration: underline !important;
    font-size: 0.9rem !important;
    opacity: 1 !important;
}

/* Reduce font size and padding for dropdown items to compact long menus */
.navbar .dropdown-menu {
    max-height: 80vh !important;
    overflow-y: auto !important;
}

.navbar .dropdown-menu .dropdown-item {
    font-size: 0.82rem !important;
    padding: 0.25rem 0.85rem !important;
}

.navbar .dropdown-menu .dropdown-header {
    padding: 0.35rem 0.85rem !important;
}

