/* Mint outline Export Excel — matches Generate PDF on contracts. */

#exportExcelHeaderBtn,
#exportExcelHeaderBtn.btn,
#exportExcelHeaderBtn.btn-success,
#exportExcelHeaderBtn.btn-sm,
#exportExcelHeaderBtn.dropdown-toggle,
.buttons-excel,
.buttons-excel.btn,
.buttons-excel.btn-success,
.buttons-excel.btn-secondary,
.dt-button.buttons-excel,
.dt-button.buttons-excel.buttons-html5,
a.crm-export-excel-btn,
a.btn.crm-export-excel-btn,
a.btn[href*="export_excel"],
a.export-btn[href*="type=excel"],
.btn-modern-export {
  color: #34d399 !important;
  background: rgba(16, 185, 129, 0.08) !important;
  background-image: none !important;
  border: 1px solid #34d399 !important;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.22) !important;
  font-weight: 500 !important;
  font-size: 0.9rem !important;
  line-height: 1.2 !important;
  height: 36px !important;
  min-height: 36px !important;
  padding: 6px 12px !important;
  white-space: nowrap !important;
}

#exportExcelHeaderBtn:hover,
#exportExcelHeaderBtn.btn:hover,
#exportExcelHeaderBtn.btn-success:hover,
.buttons-excel:hover,
.buttons-excel.btn:hover,
.buttons-excel.btn-success:hover,
.buttons-excel.btn-secondary:hover,
.dt-button.buttons-excel:hover,
.dt-button.buttons-excel.buttons-html5:hover,
a.crm-export-excel-btn:hover,
a.btn.crm-export-excel-btn:hover,
a.btn[href*="export_excel"]:hover,
a.export-btn[href*="type=excel"]:hover,
.btn-modern-export:hover {
  color: #052e1f !important;
  background-color: #34d399 !important;
  background-image: none !important;
  border-color: #34d399 !important;
  text-decoration: none !important;
  box-shadow:
    0 0 20px rgba(16, 185, 129, 0.45),
    0 0 40px rgba(16, 185, 129, 0.2) !important;
}

[data-bs-theme="light"] #exportExcelHeaderBtn,
[data-bs-theme="light"] .buttons-excel,
[data-bs-theme="light"] .dt-button.buttons-excel,
[data-bs-theme="light"] a.crm-export-excel-btn,
[data-bs-theme="light"] a.btn[href*="export_excel"],
[data-bs-theme="light"] a.export-btn[href*="type=excel"],
[data-bs-theme="light"] .btn-modern-export {
  color: #047857 !important;
  background: rgba(16, 185, 129, 0.08) !important;
  border-color: #059669 !important;
}

[data-bs-theme="light"] #exportExcelHeaderBtn:hover,
[data-bs-theme="light"] .buttons-excel:hover,
[data-bs-theme="light"] .dt-button.buttons-excel:hover,
[data-bs-theme="light"] a.crm-export-excel-btn:hover,
[data-bs-theme="light"] a.btn[href*="export_excel"]:hover,
[data-bs-theme="light"] a.export-btn[href*="type=excel"]:hover,
[data-bs-theme="light"] .btn-modern-export:hover {
  color: #fff !important;
  background-color: #059669 !important;
  border-color: #059669 !important;
}

/* Excel export sits above the table card, not inside it. */
.crm-table-excel-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 0.75rem;
}

.crm-table-excel-bar .dt-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
  float: none !important;
  margin: 0 !important;
}

.dataTables_wrapper > .row.crm-dt-excel-row,
.dataTables_wrapper > .row:has(> [class*="col"] > .dt-buttons):not(:has(.dataTables_length)):not(:has(.dataTables_filter)),
.dataTables_wrapper .dt-buttons.crm-dt-buttons-empty {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
  height: 0 !important;
  min-height: 0 !important;
  overflow: hidden !important;
  border: 0 !important;
}

.hr-export-excel-dropdown {
  display: inline-flex;
}

.hr-export-excel-menu,
.payroll-export-excel-menu {
  min-width: 8rem;
  padding: 0.35rem 0;
  z-index: 1080;
}

[data-bs-theme="dark"] .hr-export-excel-menu,
[data-bs-theme="dark"] .payroll-export-excel-menu {
  background: #172635;
  border-color: rgba(52, 211, 153, 0.28);
}

[data-bs-theme="dark"] .hr-export-excel-menu .dropdown-item,
[data-bs-theme="dark"] .payroll-export-excel-menu .dropdown-item {
  color: #e8f1f6;
}

[data-bs-theme="dark"] .hr-export-excel-menu .dropdown-item:hover,
[data-bs-theme="dark"] .hr-export-excel-menu .dropdown-item:focus,
[data-bs-theme="dark"] .payroll-export-excel-menu .dropdown-item:hover,
[data-bs-theme="dark"] .payroll-export-excel-menu .dropdown-item:focus {
  background: rgba(52, 211, 153, 0.16);
  color: #34d399;
}
