/* Export menu, opened from the top bar. */

.export-menu {
  position: fixed;
  z-index: 50;
  min-width: 190px;
  padding: 3px 0;
  background: var(--bg2);
  border: 1px solid var(--line2);
}
.export-menu.hidden { display: none; }
.export-menu .item {
  display: block;
  width: 100%;
  height: var(--row);
  padding: 0 12px;
  text-align: left;
  background: transparent;
  border: 0;
  white-space: nowrap;
}
.export-menu .item:hover { background: var(--bg3); color: var(--text-hi); }
.export-form {
  display: grid;
  gap: 4px;
  width: min(300px, calc(100vw - 8px));
  padding: 4px 8px 6px;
}
.export-form .title { color: var(--text-hi); }
.export-form input[type="text"] { width: 100%; font-family: var(--mono); }
.export-form .files {
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 11px;
  white-space: pre;
  overflow: hidden;
  text-overflow: ellipsis;
}
.export-form .buttons { display: flex; gap: 4px; justify-content: flex-end; margin-top: 2px; }

/* Render dialog, opened from the top bar Render button. */

.render-dialog {
  position: fixed;
  z-index: 50;
  display: flex;
  flex-direction: column;
  width: min(640px, calc(100vw - 8px));
  background: var(--bg1);
  border: 1px solid var(--line2);
  overflow: hidden;
}
.render-dialog.hidden { display: none; }

.rd-presets {
  display: flex;
  gap: 4px;
  padding: 4px 6px;
  background: var(--bg2);
  border-bottom: 1px solid var(--line);
}

.rd-body { overflow: auto; padding: 2px 8px 6px; }

.rd-section { border-bottom: 1px solid var(--line); padding: 6px 0; }
.rd-section:last-child { border-bottom: 0; }
.rd-section .shead {
  color: var(--text-dim);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}

.rd-row { display: flex; align-items: center; gap: 6px; min-height: 20px; margin: 2px 0; }
.rd-row input[type="text"] { flex: 1; font-family: var(--mono); min-width: 0; }
.rd-row input[type="number"] { width: 64px; }
.rd-row .dim { white-space: nowrap; }

.rd-layers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 12px;
  row-gap: 2px;
}
.rd-check { display: flex; align-items: center; gap: 6px; height: 20px; cursor: default; }
.rd-check.off { color: var(--text-faint); }

.rd-ghostlist {
  max-height: 140px;
  overflow: auto;
  border: 1px solid var(--line);
  margin: 2px 0 2px 0;
  padding: 2px 6px;
  display: flex;
  flex-direction: column;
}
.rd-ghostlist.hidden { display: none; }
.rd-ghostlist .rd-check { height: 18px; }

.rd-estimate { color: var(--text-dim); margin: 6px 0; }

.rd-buttons { display: flex; gap: 4px; justify-content: flex-end; }

.rd-progress {
  padding: 6px 8px;
  border-top: 1px solid var(--line);
  background: var(--bg2);
}
.rd-progress.hidden { display: none; }
.rd-stage { color: var(--text-hi); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rd-bar { height: 6px; background: var(--bg0); border: 1px solid var(--line2); margin: 4px 0; }
.rd-bar .fill { height: 100%; background: var(--accent); width: 0%; }
.rd-meta { color: var(--text-dim); display: flex; gap: 12px; flex-wrap: wrap; font-family: var(--mono); font-size: 11px; }

.rd-results {
  padding: 6px 8px;
  border-top: 1px solid var(--line);
}
.rd-results.hidden { display: none; }
.rd-results .files {
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 11px;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 100px;
  overflow: auto;
}
