/* Compatibility styling for the existing MPB revision markup, without JS changes. */
.project-mobile-card-table .sod-rev-file {
  min-width: 0;
  max-width: 420px;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
}

.sod-rev-file .sod-revision-package {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-2, 8px);
  min-width: 0;
  margin-top: 6px;
}

.sod-rev-file .sod-revision-package button {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 36px;
  box-sizing: border-box;
  padding: 6px 8px;
  border: 1px solid var(--color-border-subtle, #e2e8f0);
  border-radius: var(--radius-sm, 6px);
  background: transparent;
  color: var(--color-primary, #2563eb);
  font: inherit;
  line-height: 1.5;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
  cursor: pointer;
}

.sod-rev-file .sod-revision-package button > i { margin-right: 6px; }
.sod-rev-file .sod-revision-package button:hover { background: var(--color-surface-2, #f8fafc); }
.sod-rev-file .sod-revision-package button:focus-visible {
  outline: 2px solid var(--color-primary, #2563eb);
  outline-offset: 2px;
}

@media (max-width: 768px) {
  table.project-mobile-card-table:has(.sod-rev-file) {
    display: block;
    width: 100%;
    min-width: 0;
    background: transparent;
  }
  table.project-mobile-card-table:has(.sod-rev-file) > thead { display: none; }
  table.project-mobile-card-table:has(.sod-rev-file) > tbody {
    display: grid;
    gap: 10px;
    width: 100%;
  }
  table.project-mobile-card-table:has(.sod-rev-file) > tbody > tr {
    display: block;
    width: 100%;
    background: var(--color-surface-2);
    border: 1px solid var(--color-border-subtle);
    border-radius: var(--radius-md);
  }
  table.project-mobile-card-table:has(.sod-rev-file) > tbody > tr > td[data-label] {
    display: block;
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    padding: 8px 11px;
    border: 0;
    border-bottom: 1px solid var(--color-border-subtle);
    text-align: left;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  table.project-mobile-card-table:has(.sod-rev-file) > tbody > tr > td[data-label]::before {
    display: block;
    content: attr(data-label);
    margin-bottom: 4px;
    color: var(--color-text-muted);
    font-size: 0.68rem;
    font-weight: var(--fw-semibold);
    line-height: 1.35;
    text-transform: uppercase;
    letter-spacing: 0.035em;
  }
  table.project-mobile-card-table:has(.sod-rev-file) > tbody > tr > td[data-label]:last-child { border-bottom: 0; }
}
