/* docs-exchange page/module styles. Moved from styles.css for easier maintenance. */
.attachment-document-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-right: 8px;
  font: inherit;
}

.attachment-document-link .doc-file-icon {
  text-decoration: none;
}

.doc-empty {
  color: #b7bec5;
}

.email-viewer {
  display: grid;
  gap: 16px;
  color: #001b38;
  font-size: 14px;
}

.email-viewer-meta,
.email-viewer-subject {
  border-bottom: 1px solid var(--line);
  padding: 0 0 14px;
}

.email-viewer-meta p {
  margin: 0 0 4px;
}

.email-viewer-body {
  min-height: 560px;
  font-size: 18px;
  line-height: 1.35;
  white-space: normal;
}

.document-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 10px;
}

.document-actions-row > div {
  display: flex;
  align-items: center;
  gap: 6px;
}

.document-actions-row .primary {
  min-width: 0;
  min-height: 30px;
  padding: 7px 12px;
  border-radius: 3px;
}

.doc-file-icon {
  display: inline-flex;
  margin-left: 4px;
  padding: 1px 4px;
  border: 1px solid color-mix(in srgb, var(--accent) 60%, var(--line));
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
}

.document-link {
  display: inline-block;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
}

.doc-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.doc-workbench {
  display: grid;
  gap: 14px;
  min-height: 0;
}

.doc-panel {
  min-height: 0;
  max-width: 100%;
  overflow: hidden;
}

.doc-panel h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.doc-panel .table-panel {
  max-width: 100%;
  overflow: hidden;
}

.doc-panel .table-wrap {
  max-width: 100%;
  overflow-x: auto;
}

.doc-panel .doc-arrow {
  width: 24px;
  height: 24px;
  border: 0;
  background: transparent;
  position: relative;
}

.doc-panel .doc-arrow::before {
  content: "";
  position: absolute;
  inset: 7px 8px;
  border-left: 2px solid #26323b;
  border-bottom: 2px solid #26323b;
  transform: rotate(45deg);
}

.compact-doc-fields {
  margin-top: 12px;
}

.board > .docs-exchange-table > .table-wrap {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: auto;
  overflow-y: auto;
}

.board > .docs-exchange-table > .table-pager {
  flex: 0 0 auto;
  align-items: center;
  margin-top: 0;
  padding: 12px 4px;
}

.docs-exchange-table table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.docs-exchange-table th:nth-child(1),
.docs-exchange-table td:nth-child(1) { width: 90px; }

.docs-exchange-table th:nth-child(2),
.docs-exchange-table td:nth-child(2) { width: 180px; }

.docs-exchange-table th:nth-child(3),
.docs-exchange-table td:nth-child(3) { width: 145px; }

.docs-exchange-table th:nth-child(5),
.docs-exchange-table td:nth-child(5) { width: 110px; }

.docs-exchange-table th:nth-child(6),
.docs-exchange-table td:nth-child(6) { width: 95px; }

.docs-exchange-table table.has-actions-column th.actions-col,
.docs-exchange-table table.has-actions-column td.actions {
  width: 152px;
  min-width: 152px;
  max-width: 152px;
}

.docs-exchange-table td.actions {
  min-width: 0;
  overflow: visible;
  padding-inline: 4px;
  white-space: nowrap;
}

.docs-exchange-table td.actions .icon-action {
  width: 26px;
  min-width: 26px;
  height: 26px;
  min-height: 26px;
  margin-right: 2px;
  padding: 0;
}

.docs-exchange-table td:nth-child(4),
.docs-exchange-table td:nth-child(7) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.doc-attachment-link {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}
