/* ACT V3.24 - global action button palette lock
   Loaded last on rendered first-party pages so local legacy blue styles cannot win. */
:root {
  --act-action: #16847c;
  --act-action-hover: #0f6f69;
  --act-action-active: #0b5b56;
  --act-action-text: #ffffff;
  --act-action-soft: #d9f0ee;
  --act-action-border: #16847c;
}

/* Normal/positive actions: one Tiffany palette everywhere. */
body.act-page .btn-primary,
body.act-page .btn-success,
body.act-page .btn-info,
body.act-page .btn-done,
body.act-page .btn-restore,
body.act-page .btn-reactivate,
body.act-page .btn-approve,
body.act-page .btn-confirm,
body.act-page .btn-registration-open,
body.act-page .btn-notice-publish,
body.act-page .search-btn,
body.act-page .clear-btn,
body.act-page .back-btn,
body.act-page .query-link,
body.act-page .guest-list-add-btn,
body.act-page .qr-btn,
body.act-page .copy-button,
body.act-page .main-button,
body.act-page .entry-main-button,
body.act-page .login-button,
body.act-page .act-global-nav-btn:not(.act-global-nav-logout),
body.act-page .manage-action-btn:not(.manage-action-danger),
body.act-page .links a,
body.act-page a.btn-primary,
body.act-page a.btn-success,
body.act-page a.btn-info,
body.act-page button.btn-primary,
body.act-page button.btn-success,
body.act-page button.btn-info,
body.act-page button[type="submit"]:not(.btn-danger):not(.btn-delete):not(.btn-reject):not(.btn-warning):not(.btn-suspend):not(.btn-cancel):not(.btn-logout):not(.admin-log-delete-btn):not(.admin-log-delete-selected-btn):not(.btn-notice-disable):not(.btn-registration-close),
body.act-page input[type="submit"]:not(.btn-danger):not(.btn-delete):not(.btn-reject):not(.btn-warning):not(.btn-suspend):not(.btn-cancel):not(.btn-logout) {
  background: var(--act-action) !important;
  background-color: var(--act-action) !important;
  border-color: var(--act-action-border) !important;
  color: var(--act-action-text) !important;
  text-decoration: none !important;
}

body.act-page .btn-primary:hover,
body.act-page .btn-success:hover,
body.act-page .btn-info:hover,
body.act-page .btn-done:hover,
body.act-page .btn-restore:hover,
body.act-page .btn-reactivate:hover,
body.act-page .btn-approve:hover,
body.act-page .btn-confirm:hover,
body.act-page .btn-registration-open:hover,
body.act-page .btn-notice-publish:hover,
body.act-page .search-btn:hover,
body.act-page .clear-btn:hover,
body.act-page .back-btn:hover,
body.act-page .query-link:hover,
body.act-page .guest-list-add-btn:hover,
body.act-page .qr-btn:hover,
body.act-page .copy-button:hover,
body.act-page .main-button:hover,
body.act-page .entry-main-button:hover,
body.act-page .login-button:hover,
body.act-page .act-global-nav-btn:not(.act-global-nav-logout):hover,
body.act-page .manage-action-btn:not(.manage-action-danger):hover,
body.act-page .links a:hover,
body.act-page button[type="submit"]:not(.btn-danger):not(.btn-delete):not(.btn-reject):not(.btn-warning):not(.btn-suspend):not(.btn-cancel):not(.btn-logout):not(.admin-log-delete-btn):not(.admin-log-delete-selected-btn):not(.btn-notice-disable):not(.btn-registration-close):hover,
body.act-page input[type="submit"]:not(.btn-danger):not(.btn-delete):not(.btn-reject):not(.btn-warning):not(.btn-suspend):not(.btn-cancel):not(.btn-logout):hover {
  background: var(--act-action-hover) !important;
  background-color: var(--act-action-hover) !important;
  border-color: var(--act-action-hover) !important;
  color: #ffffff !important;
}

body.act-page .btn-primary:active,
body.act-page .btn-success:active,
body.act-page .btn-info:active,
body.act-page .btn-done:active,
body.act-page .btn-restore:active,
body.act-page .btn-reactivate:active,
body.act-page .btn-approve:active,
body.act-page .search-btn:active,
body.act-page .back-btn:active,
body.act-page .query-link:active,
body.act-page .guest-list-add-btn:active,
body.act-page .act-global-nav-btn:not(.act-global-nav-logout):active,
body.act-page .manage-action-btn:not(.manage-action-danger):active {
  background: var(--act-action-active) !important;
  background-color: var(--act-action-active) !important;
  border-color: var(--act-action-active) !important;
  color: #ffffff !important;
}

/* Outline/secondary navigation buttons are also made visually consistent when they are normal actions. */
body.act-page .btn-secondary:not(.btn-cancel),
body.act-page .btn-outline:not(.btn-danger):not(.btn-warning),
body.act-page .btn-outline-primary {
  background: var(--act-action) !important;
  border-color: var(--act-action) !important;
  color: #ffffff !important;
}
body.act-page .btn-secondary:not(.btn-cancel):hover,
body.act-page .btn-outline:not(.btn-danger):not(.btn-warning):hover,
body.act-page .btn-outline-primary:hover {
  background: var(--act-action-hover) !important;
  border-color: var(--act-action-hover) !important;
  color: #ffffff !important;
}

/* Icon glyphs inside Tiffany buttons must stay white. */
body.act-page .btn-primary i,
body.act-page .btn-success i,
body.act-page .btn-info i,
body.act-page .btn-done i,
body.act-page .btn-restore i,
body.act-page .btn-reactivate i,
body.act-page .btn-approve i,
body.act-page .btn-confirm i,
body.act-page .search-btn i,
body.act-page .clear-btn i,
body.act-page .back-btn i,
body.act-page .query-link i,
body.act-page .guest-list-add-btn i,
body.act-page .qr-btn i,
body.act-page .copy-button i,
body.act-page .main-button i,
body.act-page .entry-main-button i,
body.act-page .login-button i,
body.act-page .act-global-nav-btn:not(.act-global-nav-logout) i,
body.act-page .manage-action-btn:not(.manage-action-danger) i,
body.act-page .links a i,
body.act-page .btn-secondary:not(.btn-cancel) i,
body.act-page .btn-outline:not(.btn-danger):not(.btn-warning) i,
body.act-page .btn-outline-primary i {
  color: #ffffff !important;
}

/* Keep semantic destructive/warning actions distinct. */
body.act-page .btn-danger,
body.act-page .btn-delete,
body.act-page .btn-reject,
body.act-page .btn-logout,
body.act-page .act-global-nav-logout,
body.act-page .manage-action-danger,
body.act-page .admin-log-delete-btn,
body.act-page .admin-log-delete-selected-btn,
body.act-page .btn-notice-disable,
body.act-page .btn-registration-close {
  color: #ffffff !important;
}

/* Inline-style legacy blue buttons: this last-loaded !important layer overrides non-important inline colors. */
body.act-page .btn[style*="#1976d2"],
body.act-page .btn[style*="#039be5"],
body.act-page .btn[style*="#29b6f6"],
body.act-page .btn[style*="#0277bd"],
body.act-page a[style*="#1976d2"],
body.act-page button[style*="#1976d2"] {
  background: var(--act-action) !important;
  background-color: var(--act-action) !important;
  border-color: var(--act-action) !important;
  color: #ffffff !important;
}

/* Preserve disabled affordance. */
body.act-page button:disabled,
body.act-page input[type="submit"]:disabled,
body.act-page .btn.disabled,
body.act-page .btn[aria-disabled="true"] {
  opacity: .58 !important;
  cursor: not-allowed !important;
  box-shadow: none !important;
}

/* V3.24 full-project legacy button catchers */
body.act-page .controls a,
body.act-page .controls button,
body.act-page .actions a,
body.act-page .page-btn:not(.current),
body.act-page .page-btn.current,
body.act-page .menu-btn:not(.admin),
body.act-page .menu-btn.admin,
body.act-page .btn-footer:not(.btn-logout),
body.act-page .btn-detail,
body.act-page .sort-btn-group .btn,
body.act-page .button-container .main-button {
  background: var(--act-action) !important;
  background-color: var(--act-action) !important;
  border-color: var(--act-action) !important;
  color: #ffffff !important;
}

body.act-page .controls a:hover,
body.act-page .controls button:hover,
body.act-page .actions a:hover,
body.act-page .page-btn:hover,
body.act-page .menu-btn:not(.admin):hover,
body.act-page .menu-btn.admin:hover,
body.act-page .btn-footer:not(.btn-logout):hover,
body.act-page .btn-detail:hover,
body.act-page .sort-btn-group .btn:hover,
body.act-page .button-container .main-button:hover {
  background: var(--act-action-hover) !important;
  background-color: var(--act-action-hover) !important;
  border-color: var(--act-action-hover) !important;
  color: #ffffff !important;
}

body.act-page .controls a i,
body.act-page .controls button i,
body.act-page .actions a i,
body.act-page .page-btn i,
body.act-page .menu-btn i,
body.act-page .btn-footer:not(.btn-logout) i,
body.act-page .btn-detail i,
body.act-page .sort-btn-group .btn i,
body.act-page .button-container .main-button i {
  color: #ffffff !important;
}

/* Legacy inline colors found in admin and unit pages. */
body.act-page .btn[style*="#17a2b8"],
body.act-page a[style*="#17a2b8"],
body.act-page button[style*="#17a2b8"],
body.act-page .btn[style*="#29b6f6"],
body.act-page a[style*="#29b6f6"],
body.act-page button[style*="#29b6f6"],
body.act-page .btn[style*="#039be5"],
body.act-page a[style*="#039be5"],
body.act-page button[style*="#039be5"],
body.act-page .btn[style*="#0277bd"],
body.act-page a[style*="#0277bd"],
body.act-page button[style*="#0277bd"] {
  background: var(--act-action) !important;
  background-color: var(--act-action) !important;
  border-color: var(--act-action) !important;
  color: #ffffff !important;
}

/* Destructive clean page remains destructive, not Tiffany. */
body.act-page-clean button[type="submit"] {
  background: #b4232f !important;
  background-color: #b4232f !important;
  border-color: #b4232f !important;
  color: #ffffff !important;
}
body.act-page-clean button[type="submit"]:hover {
  background: #92202a !important;
  background-color: #92202a !important;
  border-color: #92202a !important;
}

/* V3.24 unit_manage icon contrast repair
   Tiffany action buttons use white glyphs, so their icon holder must not remain a pale opaque tile. */
body.act-page-unit-manage .manage-action-btn:not(.manage-action-danger) .manage-action-icon {
  background: rgba(255, 255, 255, .18) !important;
  border: 1px solid rgba(255, 255, 255, .22) !important;
  color: #ffffff !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.10) !important;
}
body.act-page-unit-manage .manage-action-btn:not(.manage-action-danger) .manage-action-icon .bi,
body.act-page-unit-manage .manage-action-btn:not(.manage-action-danger) .manage-action-icon .bi::before {
  color: #ffffff !important;
  opacity: 1 !important;
}

/* Keep the destructive clear-list action semantically red and equally legible. */
body.act-page-unit-manage .manage-action-btn.manage-action-danger,
body.act-page-unit-manage button[type="submit"].manage-action-btn.manage-action-danger {
  background: #b4232f !important;
  background-color: #b4232f !important;
  border-color: #b4232f !important;
  color: #ffffff !important;
}
body.act-page-unit-manage .manage-action-btn.manage-action-danger:hover,
body.act-page-unit-manage button[type="submit"].manage-action-btn.manage-action-danger:hover {
  background: #91202c !important;
  background-color: #91202c !important;
  border-color: #91202c !important;
  color: #ffffff !important;
}
body.act-page-unit-manage .manage-action-btn.manage-action-danger .manage-action-icon {
  background: rgba(255, 255, 255, .18) !important;
  border: 1px solid rgba(255, 255, 255, .22) !important;
  color: #ffffff !important;
}
body.act-page-unit-manage .manage-action-btn.manage-action-danger .manage-action-icon .bi,
body.act-page-unit-manage .manage-action-btn.manage-action-danger .manage-action-icon .bi::before {
  color: #ffffff !important;
  opacity: 1 !important;
}


/* V3.24 global button contrast guard - 2026-10-18
   Prevent white text on white/pale buttons after theme overrides. */
:root {
  --act-cancel-bg: #ffffff;
  --act-cancel-text: #334155;
  --act-cancel-border: #cbd5e1;
  --act-cancel-hover-bg: #f1f5f9;
  --act-danger-bg: #b4232f;
  --act-danger-hover: #91202c;
  --act-warning-bg: #f8d56b;
  --act-warning-text: #5b4300;
}

/* Cancel / close / neutral modal actions must always have readable dark text. */
body.act-page .btn-cancel,
body.act-page a.btn-cancel,
body.act-page button.btn-cancel,
body.act-page .modal-footer .btn-secondary,
body.act-page .modal-actions .btn-secondary,
body.act-page .modal-footer .btn-dark,
body.act-page .modal-actions .btn-dark {
  background: var(--act-cancel-bg) !important;
  background-color: var(--act-cancel-bg) !important;
  color: var(--act-cancel-text) !important;
  border: 1px solid var(--act-cancel-border) !important;
  box-shadow: none !important;
}
body.act-page .btn-cancel:hover,
body.act-page a.btn-cancel:hover,
body.act-page button.btn-cancel:hover,
body.act-page .modal-footer .btn-secondary:hover,
body.act-page .modal-actions .btn-secondary:hover,
body.act-page .modal-footer .btn-dark:hover,
body.act-page .modal-actions .btn-dark:hover {
  background: var(--act-cancel-hover-bg) !important;
  background-color: var(--act-cancel-hover-bg) !important;
  color: #1f2937 !important;
  border-color: #94a3b8 !important;
}
body.act-page .btn-cancel i,
body.act-page .btn-cancel .bi,
body.act-page .btn-cancel .bi::before,
body.act-page .modal-footer .btn-secondary i,
body.act-page .modal-footer .btn-dark i {
  color: currentColor !important;
  opacity: 1 !important;
}

/* Destructive buttons are always solid red with white text. */
body.act-page .btn-danger,
body.act-page .btn-delete,
body.act-page .btn-reject,
body.act-page .btn-logout,
body.act-page .manage-action-danger,
body.act-page .admin-log-delete-btn,
body.act-page .admin-log-delete-selected-btn,
body.act-page .btn-notice-disable,
body.act-page .btn-registration-close {
  background: var(--act-danger-bg) !important;
  background-color: var(--act-danger-bg) !important;
  border-color: var(--act-danger-bg) !important;
  color: #ffffff !important;
}
body.act-page .btn-danger:hover,
body.act-page .btn-delete:hover,
body.act-page .btn-reject:hover,
body.act-page .btn-logout:hover,
body.act-page .manage-action-danger:hover,
body.act-page .admin-log-delete-btn:hover,
body.act-page .admin-log-delete-selected-btn:hover,
body.act-page .btn-notice-disable:hover,
body.act-page .btn-registration-close:hover {
  background: var(--act-danger-hover) !important;
  background-color: var(--act-danger-hover) !important;
  border-color: var(--act-danger-hover) !important;
  color: #ffffff !important;
}

/* Warning actions use dark text on a light warning background. */
body.act-page .btn-warning,
body.act-page .btn-suspend {
  background: var(--act-warning-bg) !important;
  background-color: var(--act-warning-bg) !important;
  border-color: #e4bd45 !important;
  color: var(--act-warning-text) !important;
}
body.act-page .btn-warning i,
body.act-page .btn-suspend i {
  color: currentColor !important;
}

/* V3.24 global top-nav contrast repair - 2026-10-18
   Logout previously inherited white text while legacy shared-nav kept a white background. */
body.act-page .act-global-nav-logout,
body.act-page a.act-global-nav-logout {
  background: var(--act-danger-bg, #b4232f) !important;
  background-color: var(--act-danger-bg, #b4232f) !important;
  border-color: var(--act-danger-bg, #b4232f) !important;
  color: #ffffff !important;
  box-shadow: 0 6px 14px rgba(180, 35, 47, .16) !important;
}
body.act-page .act-global-nav-logout:hover,
body.act-page .act-global-nav-logout:focus-visible,
body.act-page a.act-global-nav-logout:hover,
body.act-page a.act-global-nav-logout:focus-visible {
  background: var(--act-danger-hover, #91202c) !important;
  background-color: var(--act-danger-hover, #91202c) !important;
  border-color: var(--act-danger-hover, #91202c) !important;
  color: #ffffff !important;
}
body.act-page .act-global-nav-logout i,
body.act-page .act-global-nav-logout .bi,
body.act-page .act-global-nav-logout .bi::before {
  color: #ffffff !important;
  opacity: 1 !important;
}
