/* OmniVenta V63.28.32 R389
   Global action/button readability + toolbar wrapping polish.
   Goal: long labels must stay readable across accounting, reports, tables and shared module toolbars.
*/

/* Universal button readability */
.btn,
a.btn,
button.btn,
input.btn,
.manage_buttons .buttons-list a,
.manage_buttons .buttons-list .btn,
.table_buttons .btn,
.accounting-nav .btn {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  min-height:36px;
  padding:8px 14px;
  line-height:1.25;
  white-space:normal;
  text-align:center;
  vertical-align:middle;
  text-decoration:none;
  font-weight:600;
}

.btn i,
a.btn i,
button.btn i {
  line-height:1;
}

/* Neutral buttons must remain visible on light themes */
.btn-default,
.btn-default:not(.active),
.btn-white,
.btn-white:not(.active),
.manage_buttons .buttons_list .dropdown-toggle,
.table_buttons .dropdown-toggle,
.manage_buttons .buttons_list .expand-collapse,
.table_buttons .expand-collapse,
.manage_buttons .buttons_list .edit_action,
.table_buttons .edit_action,
.manage_buttons .buttons-list .btn-more,
.manage_buttons .buttons-list .dropdown-toggle {
  background:#ffffff !important;
  border:1px solid #cfd7e3 !important;
  color:#243044 !important;
  box-shadow:none !important;
}

.btn-default:hover,
.btn-default:focus,
.btn-default:not(.active):hover,
.btn-default:not(.active):focus,
.btn-white:hover,
.btn-white:focus,
.manage_buttons .buttons_list .dropdown-toggle:hover,
.table_buttons .dropdown-toggle:hover,
.manage_buttons .buttons_list .expand-collapse:hover,
.table_buttons .expand-collapse:hover,
.manage_buttons .buttons_list .edit_action:hover,
.table_buttons .edit_action:hover,
.manage_buttons .buttons-list .btn-more:hover,
.manage_buttons .buttons-list .dropdown-toggle:hover {
  background:#f6f8fc !important;
  border-color:#b7c2d2 !important;
  color:#182232 !important;
}

/* Strong/filled buttons: always bright text and no faded icons */
.btn-primary,
.btn-success,
.btn-info,
.btn-warning,
.btn-danger,
.btn-green,
.btn-orange,
.btn-red,
.btn-black,
.btn-gray,
.accounting-nav .btn-primary,
.accounting-nav .btn-success,
.accounting-nav .btn-info,
.accounting-nav .btn-warning,
.accounting-nav .btn-auto-dgii,
.accounting-nav .btn-dgii-direct {
  color:#ffffff !important;
  font-weight:700 !important;
}

.btn-primary *,
.btn-success *,
.btn-info *,
.btn-warning *,
.btn-danger *,
.btn-green *,
.btn-orange *,
.btn-red *,
.btn-black *,
.btn-gray *,
.accounting-nav .btn-primary *,
.accounting-nav .btn-success *,
.accounting-nav .btn-info *,
.accounting-nav .btn-warning *,
.accounting-nav .btn-auto-dgii *,
.accounting-nav .btn-dgii-direct * {
  color:inherit !important;
  opacity:1 !important;
}

/* Shared toolbars / button rows: wrap cleanly instead of overlapping or clipping */
.manage_buttons .buttons-list,
.manage_buttons .buttons_list,
.table_buttons,
.accounting-nav,
.action-buttons,
.header-buttons,
.module-actions,
.report-actions,
.filter-actions,
.inline-actions,
.toolbar-actions,
.top-action-buttons,
.card-actions,
.summary-actions {
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
}

.manage_buttons .buttons-list .pull-right-btn,
.manage_buttons .buttons_list .pull-right-btn {
  display:flex;
  flex-wrap:wrap;
  justify-content:flex-end;
  align-items:center;
  gap:8px;
}

.manage_buttons .buttons-list a,
.manage_buttons .buttons-list .btn,
.manage_buttons .buttons_list a,
.manage_buttons .buttons_list .btn,
.table_buttons .btn,
.accounting-nav .btn {
  margin:0 !important;
}

/* Accounting/DGII toolbar: allow long labels without squeezing text */
.accounting-nav {
  margin:10px 0 18px;
}

.accounting-nav .btn {
  flex:0 1 auto;
  max-width:100%;
  border-radius:8px;
  padding:9px 14px;
}

/* Small icon-only controls should stay compact */
.btn.btn-xs,
.btn-xs,
.btn-icon,
button.btn.btn-xs {
  min-height:28px;
  padding:5px 8px;
  white-space:nowrap;
}

/* Disabled must stay legible enough to understand the label */
.btn.disabled,
.btn[disabled],
fieldset[disabled] .btn,
a.btn.disabled {
  opacity:.72 !important;
  filter:none !important;
}

/* Extra space for module action bars so buttons do not collide with card borders */
.manage_buttons .buttons-list,
.manage_buttons .buttons_list {
  padding:10px 12px !important;
}

/* Responsive polish */
@media (max-width: 991px) {
  .btn,
  a.btn,
  button.btn,
  input.btn,
  .manage_buttons .buttons-list a,
  .manage_buttons .buttons-list .btn,
  .table_buttons .btn,
  .accounting-nav .btn {
    min-height:38px;
    font-size:13px !important;
  }
}

@media (max-width: 640px) {
  .accounting-nav .btn,
  .manage_buttons .buttons-list a,
  .manage_buttons .buttons-list .btn,
  .manage_buttons .buttons_list a,
  .manage_buttons .buttons_list .btn,
  .table_buttons .btn {
    width:100%;
    justify-content:center;
  }

  .manage_buttons .buttons-list .pull-right-btn,
  .manage_buttons .buttons_list .pull-right-btn {
    justify-content:stretch;
  }
}
