/* Menu-specific styles */

/* Prevent navbar from wrapping */
.navbar-nav {
  flex-wrap: nowrap !important;
  white-space: nowrap;
}

.navbar-nav .nav-link,
.navbar-nav .nav-item {
  white-space: nowrap;
}

/* Compress nav link spacing for compact menu */
.navbar-nav .nav-link {
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

/* Red strike-through for "No Account" and similar indicators */
.fa-red-strike {
  position: relative;
}

.fa-red-strike:after {
  position: absolute;
  content: "X";
  color: red;
  font-weight: 300;
  font-size: 1.7em;
  left: 0px;
  top: -10px;
}

/* Long Dropdown Menus - Scrollable */
/* All navbar dropdown menus with .scrollable-dropdown class will scroll */
.scrollable-dropdown {
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: 20px;
}

/* Keep dropdown items on single line for proper width */
.scrollable-dropdown .dropdown-item {
  white-space: nowrap;
}

/* Fix iOS Safari double-tap issue on dropdown items.
   iOS Safari treats the first tap as a hover event when :hover styles exist,
   requiring a second tap to actually navigate. cursor:pointer and
   touch-action:manipulation tell iOS to treat taps as clicks immediately. */
.dropdown-menu .dropdown-item {
  cursor: pointer;
  touch-action: manipulation;
}

/* Mobile: submenus display inline */
@media (max-width: 991.98px) {
  .dropdown-menu .dropdown-menu.show {
    position: static !important;
    max-height: none !important;
    overflow: visible !important;
    margin-left: 1rem;
    border: none;
    box-shadow: none;
    background-color: transparent;
  }
}

/* CPA Menu Section Headers */
.cpa-menu-header {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.4rem 0.8rem;
  margin: 0.25rem 0.5rem;
  border-radius: 6px;
  text-align: center;
}

.cpa-menu-header-invoices {
  background: linear-gradient(135deg, #28a745 0%, #218838 100%);
  color: white;
}

.cpa-menu-header-estimates {
  background: linear-gradient(135deg, #6f42c1 0%, #5a32a3 100%);
  color: white;
}

.cpa-menu-header-revisions {
  background: linear-gradient(135deg, #fd9b00 0%, #e08800 100%);
  color: white;
}

/* CPA Menu Action Links */
.cpa-menu-link-green {
  color: #5a9a68 !important;
  font-weight: 500;
}

.cpa-menu-link-green:hover {
  color: #3d7a4a !important;
  background-color: rgba(90, 154, 104, 0.1);
}

/* Navbar search-button keyboard hint (⌘K / Ctrl K).
   Soften Bootstrap's default dark <kbd> to a light-grey pill so it reads as a
   subtle hint rather than a harsh black badge. */
#commandPaletteHint {
  background-color: #e9ecef;
  color: #495057;
  border: 1px solid #dee2e6;
  border-radius: 0.25rem;
  padding: 0.1rem 0.35rem;
  font-size: 0.75rem;
  box-shadow: none;
}

[data-bs-theme="dark"] #commandPaletteHint {
  background-color: #343a40;
  color: #ced4da;
  border-color: #495057;
}
