/* Site Management - SWAT CRA Assignment */

/* Stat Panels */
.stat-panels-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 0;
}

.stat-panel {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  padding: 1rem !important;
  gap: 10px;
  width: 100%;
  background: #FFFFFF;
  box-shadow: 0px 0px 4px 0px #00000020 !important;
  border-radius: 5px !important;
  margin: 0 !important;
}

.stat-panel.awaiting-assignment {
  padding: 1rem !important;
}

.stat-panel-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 0px;
  gap: 2px;
  width: 100%;
  flex: none;
  flex-grow: 1;
}

.stat-panel-content.tall {
  height: 87px;
}

.stat-panel-content.standard {
  height: 66px;
}

.stat-panel-number {
  font-family: 'Segoe UI';
  font-style: normal;
  font-weight: 600;
  font-size: 32px;
  line-height: 43px;
  letter-spacing: -0.04em;
  color: #000000;
  flex: none;
  flex-grow: 0;
}

.stat-panel-number.overdue {
  color: rgba(220, 20, 60, 0.75);
}

.stat-panel-label {
  width: 100%;
  font-family: 'Segoe UI';
  font-style: normal;
  font-weight: 600;
  font-size: 16px;
  line-height: 21px;
  text-align: center;
  letter-spacing: -0.04em;
  color: #000000;
  flex: none;
  align-self: center;
  flex-grow: 0;
}

.stat-panel-label.multiline {
  height: 42px;
}

.stat-panel-label.single-line {
  height: 21px;
}

.swat-cra-container {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: 1.25rem;
  row-gap: 1.25rem;
  padding: 0 0.5rem;
  align-items: stretch;
  min-height: calc(100vh - 220px);
}

.swat-cra-left-column {
  grid-column: 1 / 3;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Apply standard panel styles to swat-cra-panel */
.swat-cra-panel {
  background-color: #fff !important;
  border-radius: 5px !important;
  padding: 1rem !important;
  margin: 0 !important;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0px 0px 4px 0px #00000020 !important;
}

.swat-cra-left-panel {
  display: flex;
  flex-direction: column;
}

.swat-cra-right-panel {
  grid-column: 3 / 13;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
  height: 78vh;
  flex: 1;
}

/* Match panel-title styling */
.swat-cra-panel-title,
.sites-table-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: inherit;
  margin: 0 1rem 0 0;
  padding: 0;
}

/* Add header wrapper for SWAT CRA panel title - matches panel-title styling */
.swat-cra-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  border-bottom: 1px solid #dcdcdc;
  padding-bottom: 0.30rem;
  margin-bottom: 0.75rem;
}

.swat-cra-form-group {
  margin-bottom: 1.25rem;
}

.swat-cra-form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: #444;
  margin-bottom: 0.25rem;
}

.swat-cra-form-group select {
  width: 100%;
  min-width: 100%;
  max-width: 100%;
  padding: 8px 12px;
  border: 1px solid #8c8c8c;
  border-radius: 5px;
  font-size: 0.9rem;
  color: inherit;
  background-color: #fff;
  font-family: inherit;
  cursor: pointer;
}

.swat-cra-form-group select:focus {
  border-color: #861557;
  outline: 3px solid #A4507E;
}

.swat-cra-checkbox-group {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

.swat-cra-checkbox-group label {
  font-size: 0.875rem;
  color: inherit;
  margin: 0;
  margin-left: -4px;
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  padding: 0;
}

.swat-cra-checkbox-group input[type="checkbox"] {
  width: auto !important;
  cursor: pointer;
  margin-right: 8px;
}

/* Select2 dropdown styling */
.swat-cra-form-group .select2-container {
  width: 100% !important;
  min-width: 100% !important;
  max-width: 100% !important;
}

.swat-cra-form-group .select2-container .select2-selection {
  width: 100% !important;
  min-width: 100% !important;
}

.swat-cra-button-group {
  display: flex;
  gap: 0.75rem;
  margin-top: 0;
  justify-content: space-between;
  align-items: center;
}

.swat-cra-btn {
  padding: 8px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  font-family: inherit;
}

.swat-cra-btn-reset {
  background: transparent;
  border: none;
  color: #871553;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: underline;
  padding: 0;
  cursor: pointer;
}

.swat-cra-btn-reset:hover {
  color: #6b1142;
  background: transparent;
}

.swat-cra-btn-save {
  background-color: #861557;
  color: #fff;
  border: none;
}

.swat-cra-btn-save:hover,
.swat-cra-btn-save:focus {
  background-color: #861557;
}

/* Match panel-title styling for sites table header */
.sites-table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  border-bottom: 1px solid #dcdcdc;
  padding-bottom: 0.30rem;
  margin-bottom: 0.30rem;
}

.sites-table-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: inherit;
  margin: 0 1rem 0 0;
}

.sites-table-timestamp {
  font-size: 0.75rem;
  color: #666;
}

.sites-table-wrapper {
  flex: 1 1 0%;
  min-height: 0;
  max-height: 100%;
  overflow-x: auto;
  overflow-y: auto;
  border-radius: 5px;
}

/* Freeze first 5 columns - header */
/* Sticky header row for all columns */
.sites-data-table thead tr th {
  position: sticky;
  top: 0;
  z-index: 10;
  background-color: #861557;
}

/* First column (checkbox) - sticky */
.sites-data-table thead tr th:nth-child(1),
.sites-data-table tbody tr td:nth-child(1) {
  position: sticky;
  left: 0;
  background-color: #fff;
  box-shadow: 2px 0 2px -1px rgba(0, 0, 0, 0.1);
  min-width: 50px;
  max-width: 50px;
  width: 50px;
}

.sites-data-table thead tr th:nth-child(1) {
  z-index: 20;
  background-color: #861557;
}

.sites-data-table tbody tr td:nth-child(1) {
  z-index: 5;
}

.sites-data-table tbody tr:nth-child(even) td:nth-child(1) {
  background-color: #E6E6E6;
}

.sites-data-table tbody tr:nth-child(odd) td:nth-child(1) {
  background-color: #FFFFFF;
}

.sites-data-table tbody tr.selected td:nth-child(1) {
  background-color: #f1dce7 !important
}

/* Second column (Project Number) - sticky */
.sites-data-table thead tr th:nth-child(2),
.sites-data-table tbody tr td:nth-child(2) {
  position: sticky;
  left: 50px;
  background-color: #fff;
  box-shadow: 2px 0 2px -1px rgba(0, 0, 0, 0.1);
  min-width: 150px;
  max-width: 200px;
  /*width: 200px;*/
}

.sites-data-table thead tr th:nth-child(2) {
  z-index: 20;
  background-color: #861557;
}

.sites-data-table tbody tr td:nth-child(2) {
  z-index: 5;
}

.sites-data-table tbody tr:nth-child(even) td:nth-child(2) {
  background-color: #E6E6E6;
}

.sites-data-table tbody tr:nth-child(odd) td:nth-child(2) {
  background-color: #FFFFFF;
}

.sites-data-table tbody tr.selected td:nth-child(2) {
  background-color: #f1dce7 !important
}

/* Third column (Survey Name) - sticky */
.sites-data-table thead tr th:nth-child(3),
.sites-data-table tbody tr td:nth-child(3) {
  position: sticky;
  left: 200px;
  background-color: #fff;
  box-shadow: 2px 0 2px -1px rgba(0, 0, 0, 0.1);
  min-width: 180px;
  max-width: 180px;
  /*width: 180px;*/
}

.sites-data-table thead tr th:nth-child(3) {
  z-index: 20;
  background-color: #861557;
}

.sites-data-table tbody tr td:nth-child(3) {
  z-index: 5;
}

.sites-data-table tbody tr:nth-child(even) td:nth-child(3) {
  background-color: #E6E6E6;
}

.sites-data-table tbody tr:nth-child(odd) td:nth-child(3) {
  background-color: #FFFFFF;
}

.sites-data-table tbody tr.selected td:nth-child(3) {
  background-color: #f1dce7 !important
}

/* Fourth column (Sponsor) - sticky */
.sites-data-table thead tr th:nth-child(4),
.sites-data-table tbody tr td:nth-child(4) {
  position: sticky;
  left: 380px;
  background-color: #fff;
  box-shadow: 2px 0 2px -1px rgba(0, 0, 0, 0.1);
  min-width: 150px;
  max-width: 150px;
  /*width: 150px;*/
}

.sites-data-table thead tr th:nth-child(4) {
  z-index: 20;
  background-color: #861557;
}

.sites-data-table tbody tr td:nth-child(4) {
  z-index: 5;
}

.sites-data-table tbody tr:nth-child(even) td:nth-child(4) {
  background-color: #E6E6E6;
}

.sites-data-table tbody tr:nth-child(odd) td:nth-child(4) {
  background-color: #FFFFFF;
}

.sites-data-table tbody tr.selected td:nth-child(4) {
  background-color: #f1dce7 !important;
}

/* Fifth column (First Name) - sticky */
.sites-data-table thead tr th:nth-child(5),
.sites-data-table tbody tr td:nth-child(5) {
  position: sticky;
  left: 530px;
  background-color: #fff;
  box-shadow: 2px 0 2px -1px rgba(0, 0, 0, 0.1);
  min-width: 150px;
  max-width: 250px;
  /*width: 250px; */
}

.sites-data-table thead tr th:nth-child(5) {
  z-index: 20;
  background-color: #861557;
}

.sites-data-table tbody tr td:nth-child(5) {
  z-index: 5;
}

.sites-data-table tbody tr:nth-child(even) td:nth-child(5) {
  background-color: #E6E6E6;
}

.sites-data-table tbody tr:nth-child(odd) td:nth-child(5) {
  background-color: #FFFFFF;
}

.sites-data-table tbody tr.selected td:nth-child(5) {
  background-color: #f1dce7 !important;
}

/* Sixth column (Last Name) - sticky */
.sites-data-table thead tr th:nth-child(6),
.sites-data-table tbody tr td:nth-child(6) {
  position: sticky;
  left: 680px;
  background-color: #fff;
  box-shadow: 2px 0 2px -1px rgba(0, 0, 0, 0.1);
  max-width: 300px;
  /*width: 300px; */
}

.sites-data-table thead tr th:nth-child(6) {
  z-index: 20;
  background-color: #861557;
}

.sites-data-table tbody tr td:nth-child(6) {
  z-index: 5;
}

.sites-data-table tbody tr:nth-child(even) td:nth-child(6) {
  background-color: #E6E6E6;
}

.sites-data-table tbody tr:nth-child(odd) td:nth-child(6) {
  background-color: #FFFFFF;
}

.sites-data-table tbody tr.selected td:nth-child(6) {
  background-color: #f1dce7 !important
}

/* Parexel Comments column - wider for better readability */
.sites-data-table thead tr th:nth-child(36),
.sites-data-table tbody tr td:nth-child(36) {
  min-width: 250px;
  max-width: 250px;
  /*width: 250px; */
}

.site-management-unassigned-cra-filter {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 200px;
  height: 19px;
  
  /* labels */
  font-family: 'Segoe UI';
  font-style: normal;
  font-weight: 600 !important;
  font-size: 14px;
  line-height: 19px;
  
  letter-spacing: -0.04em;
  
  color: #464646;
  
  cursor: pointer;
  user-select: none;
    
  flex: none;
  order: 1;
  flex-grow: 0;
    
}

.swat-cra-form-group textarea.site-management-text-area-comments {
  box-sizing: border-box;
  width: 100%;
  min-width: 100%;
  max-width: 100%;
  min-height: 60px;
  padding: 8px;
  background: #FFFFFF;
  border: 1px solid #8C8C8C;
  border-radius: 5px;
  font-size: 0.9rem;
  color: inherit;
  font-family: inherit;
  resize: vertical;
}

.swat-cra-form-group textarea.site-management-text-area-comments:focus {
  border-color: #861557;
  outline: 3px solid #A4507E;
}

.site-management-unassigned-cra-filter input[type="checkbox"] {
  cursor: pointer;
  width: 20px;
  height: 20px;
  margin: 0;
}

/* DataTable sticky columns for filters - Columns 1-6 */
/* Column 1 (Checkbox) - sticky header */
#siteManagementTable.dataTable thead tr th:nth-child(1) {
  position: sticky !important;
  left: 0 !important;
  background-color: #861557 !important;
  z-index: 25 !important;
}

/* Column 1 (Checkbox) - sticky body */
#siteManagementTable.dataTable tbody tr td:nth-child(1) {
  position: sticky !important;
  left: 0 !important;
  z-index: 5 !important;
}

/* Column 2 (Project Number) - sticky header */
#siteManagementTable.dataTable thead tr th:nth-child(2) {
  position: sticky !important;
  left: 50px !important;
  background-color: #861557 !important;
  z-index: 25 !important;
}

/* Column 2 (Project Number) - sticky body */
#siteManagementTable.dataTable tbody tr td:nth-child(2) {
  position: sticky !important;
  left: 50px !important;
  z-index: 5 !important;
}

/* Column 3 (Survey Name) - sticky header */
#siteManagementTable.dataTable thead tr th:nth-child(3) {
  position: sticky !important;
  left: 200px !important;
  background-color: #861557 !important;
  z-index: 25 !important;
}

/* Column 3 (Survey Name) - sticky body */
#siteManagementTable.dataTable tbody tr td:nth-child(3) {
  position: sticky !important;
  left: 200px !important;
  z-index: 5 !important;
}

/* Column 4 (Sponsor) - sticky header */
#siteManagementTable.dataTable thead tr th:nth-child(4) {
  position: sticky !important;
  left: 380px !important;
  background-color: #861557 !important;
  z-index: 25 !important;
}

/* Column 4 (Sponsor) - sticky body */
#siteManagementTable.dataTable tbody tr td:nth-child(4) {
  position: sticky !important;
  left: 380px !important;
  z-index: 5 !important;
}

/* Column 5 (First Name) - sticky header */
#siteManagementTable.dataTable thead tr th:nth-child(5) {
  position: sticky !important;
  left: 530px !important;
  background-color: #861557 !important;
  z-index: 25 !important;
}

/* Column 5 (First Name) - sticky body */
#siteManagementTable.dataTable tbody tr td:nth-child(5) {
  position: sticky !important;
  left: 530px !important;
  z-index: 5 !important;
}

/* Column 6 (Last Name) - sticky header */
#siteManagementTable.dataTable thead tr th:nth-child(6) {
  position: sticky !important;
  left: 680px !important;
  background-color: #861557 !important;
  z-index: 25 !important;
}

/* Column 6 (Last Name) - sticky body */
#siteManagementTable.dataTable tbody tr td:nth-child(6) {
  position: sticky !important;
  left: 680px !important;
  z-index: 5 !important;
}

/* Make filter elements visible on sticky purple background - shared styles for columns 2-6 */
#siteManagementTable thead tr th:nth-child(2) .column-filter-container,
#siteManagementTable thead tr th:nth-child(3) .column-filter-container,
#siteManagementTable thead tr th:nth-child(4) .column-filter-container,
#siteManagementTable thead tr th:nth-child(5) .column-filter-container,
#siteManagementTable thead tr th:nth-child(6) .column-filter-container {
  position: relative;
  z-index: 30;
}

#siteManagementTable thead tr th:nth-child(2) .column-filter-icon,
#siteManagementTable thead tr th:nth-child(3) .column-filter-icon,
#siteManagementTable thead tr th:nth-child(4) .column-filter-icon,
#siteManagementTable thead tr th:nth-child(5) .column-filter-icon,
#siteManagementTable thead tr th:nth-child(6) .column-filter-icon {
  color: white !important;
  text-shadow: 0 0 3px rgba(0,0,0,0.5);
  font-size: 14px;
}

#siteManagementTable thead tr th:nth-child(2) .column-filter-icon:hover,
#siteManagementTable thead tr th:nth-child(3) .column-filter-icon:hover,
#siteManagementTable thead tr th:nth-child(4) .column-filter-icon:hover,
#siteManagementTable thead tr th:nth-child(5) .column-filter-icon:hover,
#siteManagementTable thead tr th:nth-child(6) .column-filter-icon:hover {
  color: #ffeb3b !important;
}

#siteManagementTable thead tr th:nth-child(2) .column-filter-dropdown,
#siteManagementTable thead tr th:nth-child(3) .column-filter-dropdown,
#siteManagementTable thead tr th:nth-child(4) .column-filter-dropdown,
#siteManagementTable thead tr th:nth-child(5) .column-filter-dropdown,
#siteManagementTable thead tr th:nth-child(6) .column-filter-dropdown {
  z-index: 9999;
}

