/* REVISIONS selector: green title, layout toggle, table view */

.client-portal-display-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.client-portal-revisions-layout-toggle {
  min-width: 64px;
  height: 30px;
  padding: 0 10px;
  flex: 0 0 auto;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: #f2f5f8;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  cursor: pointer;
}

.client-portal-revisions-layout-toggle:hover {
  background: rgba(91, 158, 118, 0.4);
}

.client-portal-revisions-layout-toggle[hidden] {
  display: none !important;
}

.client-portal-display-head h2 span.cp-display-title-revision-select,
#client-portal-display-title.cp-display-title-revision-select {
  display: inline-block;
  background: #5b9e76;
  color: #f4fff8;
  padding: 4px 10px;
  border-radius: 4px;
  font-weight: 800;
  letter-spacing: 0.4px;
}

.cp-revisions-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow: visible;
}

.cp-revisions-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0 6px;
  font-size: 11px;
}

.cp-revisions-table th,
.cp-revisions-table td {
  padding: 8px 8px;
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
  overflow: hidden;
}

.cp-revisions-table thead th {
  position: sticky;
  top: 0;
  z-index: 4;
  font-weight: 800;
  letter-spacing: 0.3px;
  color: #ffffff;
  background: #12151a;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 6px 0 #12151a;
}

.cp-revisions-table thead th:first-child {
  border-left: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px 0 0 8px;
}

.cp-revisions-table thead th:last-child {
  border-right: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 0 8px 8px 0;
}

.cp-revisions-table-row {
  cursor: pointer;
}

.cp-revisions-table-row td {
  background: rgba(255, 255, 255, 0.035);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  transition: background 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}

.cp-revisions-table-row td:first-child {
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px 0 0 8px;
}

.cp-revisions-table-row td:last-child {
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0 8px 8px 0;
}

.cp-revisions-table-row:hover td,
.cp-revisions-table-row:focus td,
.cp-revisions-table-row:focus-visible td {
  background: rgba(255, 255, 255, 0.11);
  border-color: rgba(255, 255, 255, 0.32);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
}

.cp-revisions-table-row:focus,
.cp-revisions-table-row:focus-visible {
  outline: none;
}

.cp-revisions-table td[data-revisions-col="status"] span {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #22262a;
  font-weight: 800;
}

.cp-revisions-table td[data-revisions-col="status"] span[data-status="new"] {
  background: #ffd76b;
  color: #4a3a05;
}

.cp-revisions-table td[data-revisions-col="status"] span[data-status="unassigned"] {
  background: #ffb4b4;
  color: #571414;
}

.cp-revisions-table td[data-revisions-col="status"] span[data-status="working-on"] {
  background: #9fd7ef;
  color: #12394a;
}

.cp-revisions-table td[data-revisions-col="status"] span[data-status="sent"] {
  background: #7ee3a4;
  color: #0d3b22;
}

.cp-revisions-table-draft-yes {
  color: #e09b4a;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.cp-revisions-table-draft-no {
  color: rgba(242, 245, 248, 0.55);
}

.client-portal-list-pager {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  white-space: nowrap;
}

.client-portal-list-pager[hidden] {
  display: none !important;
}

.client-portal-list-pager-size {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: rgba(242, 245, 248, 0.7);
}

.client-portal-list-pager-sort select {
  min-width: 148px;
}

.client-portal-list-pager-size select[data-list-page-size],
.client-portal-list-pager-size select[data-eds-page-size] {
  min-width: 88px;
  width: max-content;
}

@media (max-width: 760px) {
  .client-portal-list-pager {
    white-space: normal;
    flex-wrap: wrap;
    justify-content: flex-end;
    max-width: 100%;
    row-gap: 6px;
  }

  .client-portal-display-head-actions:has([data-list-page-size]),
  .client-portal-display-head-actions:has([data-eds-page-size]) {
    max-width: 100%;
    min-width: 0;
  }
}

.client-portal-list-pager-size select {
  height: 30px;
  min-width: 58px;
  padding: 0 6px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: #2a2e33;
  color: #f2f5f8;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  color-scheme: dark;
}

.client-portal-list-pager-size select option {
  background-color: #2a2e33;
  color: #f2f5f8;
}

.client-portal-list-pager-btn {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: #f2f5f8;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.client-portal-list-pager-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.16);
}

.client-portal-list-pager-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.client-portal-list-pager-status {
  min-width: 42px;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: rgba(242, 245, 248, 0.82);
}

/* REVISIONS selector table only. Reports/VIEW MORE keeps its own rules in portal.css.
   border-spacing and the 6px header shadow sit above the sticky header and jump on scroll. */
.cp-all-projects[data-all-projects-mode="request-revision-selection"] .cp-all-projects-scroll > .cp-revisions-table-wrap .cp-revisions-table {
  min-width: 1180px;
  border-spacing: 0;
}

.cp-all-projects[data-all-projects-mode="request-revision-selection"] .cp-all-projects-scroll > .cp-revisions-table-wrap .cp-revisions-table thead,
.cp-all-projects[data-all-projects-mode="request-revision-selection"] .cp-all-projects-scroll > .cp-revisions-table-wrap .cp-revisions-table thead tr {
  background: #12151a;
}

.cp-all-projects[data-all-projects-mode="request-revision-selection"] .cp-all-projects-scroll > .cp-revisions-table-wrap .cp-revisions-table thead th,
.cp-all-projects[data-all-projects-mode="request-revision-selection"] .cp-all-projects-scroll > .cp-revisions-table-wrap .cp-revisions-table thead th:first-child,
.cp-all-projects[data-all-projects-mode="request-revision-selection"] .cp-all-projects-scroll > .cp-revisions-table-wrap .cp-revisions-table thead th:last-child {
  position: sticky;
  top: 0;
  z-index: 4;
  border-radius: 0;
  box-shadow: none;
  background: #12151a;
}

.cp-all-projects[data-all-projects-mode="request-revision-selection"] .cp-all-projects-scroll > .cp-revisions-table-wrap .cp-revisions-table tbody tr + tr td {
  border-top: 6px solid transparent;
  background-clip: padding-box;
}
