/* UI designer: the "data" part's own styles (docs/designer/README.md). Only the layout inside its dialogs
   (version history, Recently deleted, storage and privacy, conflict questions) and a hidden file input. The look
   of buttons, lists and rows (including hover and selected), sections, cards, badges, empty states and fields
   comes from the shell's dz-* primitives in designer.css; nothing here restyles them. */

/* A file input or download link the user never sees (opened from code, in a click). */
.dz-data-hidden-input {
  position: fixed;
  left: -9999px;
  top: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.dz-data-dialog {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.dz-data-dialog p {
  margin: 0;
}

.dz-data-dialog a {
  color: var(--accent-ink, var(--accent));
}

.dz-data-dialog a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- lists (versions, Recently deleted) ---------- */

.dz-data-list-host {
  min-width: 0;
}

/* The scroll area around the list (the rows themselves are the shell's dz-row). */
.dz-data-list {
  max-height: min(46vh, 420px);
  margin: 0;
  padding: 2px;
  overflow-y: auto;
  list-style: none;
}

.dz-data-list:focus-visible {
  outline: 2px solid var(--accent-line);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.dz-data-row {
  cursor: var(--nc-hand, pointer);
}

.dz-data-row-main {
  flex: 1;
  display: grid;
  gap: 2px;
  min-width: 0;
}

.dz-data-row-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.dz-data-row-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

.dz-data-row-title .dz-badge {
  flex: none;
}

.dz-data-row-meta {
  margin: 0;
  color: var(--text-3);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.dz-data-row-tools,
.dz-data-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.dz-data-grow {
  flex: 1 1 180px;
  min-width: 0;
}

/* Announcements for screen readers (and a short visible note). */
.dz-data-live {
  min-height: 1.2em;
  color: var(--text-2);
  font-size: 12px;
}

/* ---------- two copies side by side ---------- */

.dz-data-compare {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 4px;
}

.dz-data-side {
  display: grid;
  align-content: start;
  gap: 4px;
  min-width: 0;
  padding: 12px 14px;
}

.dz-data-side-title {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 700;
}

.dz-data-side-line {
  margin: 0;
  color: var(--text-2);
  font-size: 12px;
}

/* ---------- storage and privacy ---------- */

.dz-data-section {
  min-width: 0;
}

.dz-data-facts {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-left: 18px;
  color: var(--text-2);
}

@media (max-width: 560px) {
  .dz-data-compare {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Bigger targets for fingers. */
@media (pointer: coarse) {
  .dz-data-row {
    min-height: 44px;
  }
}
