/* CSP-compatible UI styles (Path A). Do not add CSP UI rules to site.css. */

/* --- Visibility (use with CspUi.setVisible / class toggles) --- */
.csp-hidden-important,
.hidden {
  display: none !important;
}

#tbl_ApprovalList thead th.csp-sortable,
#tblTopUsers thead th.csp-sortable {
  cursor: pointer;
}

/* --- Spinners --- */
.csp-spinner-wrap {
  display: flex;
  justify-content: center;
}

.csp-spinner-lg {
  width: 3rem;
  height: 3rem;
}

/* --- Tables --- */
.csp-table-full {
  width: 100% !important;
}

#tbl_ApprovalList th:nth-child(1) { width: 10%; }
#tbl_ApprovalList th:nth-child(2) { width: 28%; }
#tbl_ApprovalList th:nth-child(3) { width: 12%; }
#tbl_ApprovalList th:nth-child(4) { width: 22%; }
#tbl_ApprovalList th:nth-child(5) { width: 28%; }

#tblTopUsers th:nth-child(1) { width: 70%; }
#tblTopUsers th:nth-child(2) { width: 30%; }

/* DataTables wrapper (CspTable layout: datatables) */
.dataTables_wrapper .dataTables_filter input {
  margin-left: 0.5em;
}

.dataTables_wrapper .dt-buttons {
  display: inline-block;
  margin-left: 0.5em;
  vertical-align: middle;
}

.csp-table-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.csp-table-pager {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* --- Charts --- */
.csp-chart-wrap {
  position: relative;
  width: 100%;
  max-width: 100%;
}

.csp-chart-canvas {
  display: block;
  max-width: 100%;
}

#chartDepartmentWise {
  width: 100%;
  height: 400px;
}

#chartOrganizationWise {
  width: 100%;
  height: 260px;
}

/* --- Toasts (notify.js) --- */
.csp-toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1090;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 360px;
  pointer-events: none;
}

.csp-toast {
  pointer-events: auto;
  padding: 0.75rem 1rem;
  border-radius: 0.375rem;
  border: 1px solid transparent;
  box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.15);
  opacity: 0;
  transform: translateX(100%);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.csp-toast.csp-toast-visible {
  opacity: 1;
  transform: translateX(0);
}

.csp-toast-title {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.csp-toast--success {
  background-color: #d1e7dd;
  border-color: #badbcc;
  color: #0f5132;
}

.csp-toast--danger,
.csp-toast--error {
  background-color: #f8d7da;
  border-color: #f5c2c7;
  color: #842029;
}

.csp-toast--warning {
  background-color: #fff3cd;
  border-color: #ffecb5;
  color: #664d03;
}

.csp-toast--info {
  background-color: #cff4fc;
  border-color: #b6effb;
  color: #055160;
}

/* --- Modals (class-based, no Bootstrap Modal JS inline styles) --- */
.csp-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1040;
  background-color: rgba(0, 0, 0, 0.5);
}

.csp-modal-backdrop.csp-hidden-important {
  display: none !important;
}

.modal.csp-modal-open {
  display: block !important;
}

body.csp-modal-body-open {
  overflow: hidden;
}

#dvApprovalMdlSpinner.csp-hidden-important,
#dvApprovalForm.csp-hidden-important,
#valRemarks.csp-hidden-important {
  display: none !important;
}

/* --- Layout / branding (migrated from site.css) --- */
.csp-nav-item-padding {
  padding: 20px;
}

.csp-logo-img {
  width: 198px;
  height: 35px;
  margin-left: 10px;
}

.csp-icon-64 {
  font-size: 64px !important;
}

.csp-icon-32 {
  font-size: 32px;
}

.csp-icon-50 {
    font-size: 50px !important;
}

.csp-hr-dashed {
  border: 2px dashed;
}

.csp-error-heading {
  line-height: 6rem;
  font-size: 6rem;
}

.csp-error-wrapper {
  margin-left: 30%;
  margin-top: 5%;
}

.csp-signin-btn {
  padding: 10px;
  font-size: 19px;
}

.csp-signin-text {
  word-wrap: break-word;
}

/* --- MS Authenticator download page --- */
.msauth-download h1 {
  margin: 0;
  padding: 0;
  font-size: 14px;
  font-weight: bold;
}

.msauth-download p {
  font-size: 13px;
}

.msauth-download .link {
  background: #ecf5ff;
  border-top: 1px solid #fff;
  border: 1px solid #dfebf8;
  margin-top: 0.5em;
  padding: 0.3em;
}

.msauth-download .link a {
  text-decoration: none;
  font-size: 15px;
  display: block;
  color: #069;
  font-weight: 500;
}

.msauth-download .flex {
  display: flex;
  justify-content: center;
}

.msauth-download .flex-item {
  margin-left: 10px;
}
