/* Page header buttons on the document pages (invoice, quotation, purchase order, memo and both vouchers):
   one main button, "New", and the rest in a print menu and a "More" menu.
   Phone rules for these classes are in mobile.css. */
.header-actions {
  gap: 8px;
}

.header-actions .header-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  white-space: nowrap;
}

.header-actions .header-action-btn i {
  font-size: 14px;
}

/* ledger.css (loaded by these pages) paints every .dropdown-toggle grey and removes its border. */
.header-actions .header-action-btn.dropdown-toggle {
  border: 1px solid #6c757d;
  background-color: transparent;
  font-size: 0.75rem;
}

.header-actions .header-action-btn:hover,
.header-actions .header-action-btn.show {
  border-color: #6c757d;
  background-color: #F3F4F6;
  color: #2C2C2C;
}

.header-menu .dropdown-menu {
  min-width: 200px;
  padding: 6px;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(16, 24, 40, 0.12);
}

.header-menu .dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  color: #2C2C2C;
  font-size: 13px;
  white-space: nowrap;
}

.header-menu .dropdown-item i {
  width: 16px;
  margin: 0 !important;
  color: #6B7280;
  font-size: 15px;
  text-align: center;
}

.header-menu .dropdown-item:hover,
.header-menu .dropdown-item:focus {
  background-color: #F3F4F6;
  color: #111827;
}

.header-menu .dropdown-item.text-danger,
.header-menu .dropdown-item.text-danger i {
  color: #DC2626 !important;
}

.header-menu .dropdown-item.text-danger:hover,
.header-menu .dropdown-item.text-danger:focus {
  background-color: #FEF2F2;
}

/* "Save as draft" with the draft alert attached to it. */
.header-save-group {
  display: inline-flex;
  align-items: stretch;
}

.header-save-group > .header-notify-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  font-size: 15px;
}

.header-save-group > .header-notify-btn .draft-notify-count {
  margin-inline-start: 0;
}

/* Without :has() support the two stay separate buttons next to each other. */
.header-save-group:has(> .header-notify-btn) > .header-save-btn {
  border-start-end-radius: 0;
  border-end-end-radius: 0;
}

.header-save-group:has(> .header-save-btn) > .header-notify-btn {
  margin-inline-start: 1px;
  border-start-start-radius: 0;
  border-end-start-radius: 0;
}

/* Automatic alerts: nothing to pick, the icon only says it will happen. */
.header-save-group > .header-notify-auto {
  border-radius: var(--btn-border-radius);
  background: linear-gradient(to right, #56d60031 -5%, #00960033 100%);
  color: #009600;
  cursor: help;
}
