/* The File menu: it hangs from the left of the project bar, where the settings
   menu hangs from the right, and its dialogs list projects and templates. */
.file-menu .menu-panel { left: 0; right: auto; min-width: 15rem; }
#file-menu-button { display: inline-flex; align-items: center; gap: .35rem; }

dialog.file-dialog { width: min(92vw, 620px); }
.file-dialog-scroll { max-height: min(56vh, 460px); overflow-y: auto; margin-top: .8rem; padding-right: .2rem; }
.file-dialog input[type="search"] { width: 100%; margin-top: .4rem; }
.file-list { display: flex; flex-direction: column; gap: .25rem; margin: 0; padding: 0; list-style: none; }
.file-row {
  display: flex;
  flex-direction: column;
  gap: .12rem;
  width: 100%;
  padding: .5rem .65rem;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.file-row:hover { background: var(--orange-soft); }
.file-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.file-row.is-locked { opacity: .62; }
.file-row-title { font-size: .92rem; font-weight: 650; overflow-wrap: anywhere; }
/* Delete beside each of Open's rows (owner, 19 Nov 2026), asking first in
   the row itself: Delete and Keep after a line that says what goes. */
.file-row-item { display: flex; align-items: center; gap: .3rem; }
.file-row-item > .file-row { flex: 1 1 auto; min-width: 0; }
.file-row-delete, .file-row-keep {
  flex: 0 0 auto;
  padding: .35rem .6rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: .8rem;
  cursor: pointer;
}
.file-row-delete:hover { border-color: var(--danger); color: var(--danger); }
.file-row-delete.danger { border-color: var(--danger); background: var(--danger); color: #fff; }
.file-row-keep:hover { background: var(--orange-soft); color: var(--text); }
.file-row-delete:focus-visible, .file-row-keep:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.file-row-delete:disabled, .file-row-keep:disabled { opacity: .55; cursor: default; }
.file-row-confirm { display: flex; flex: 1 1 auto; align-items: center; gap: .4rem; padding: .45rem .65rem; border-radius: 8px; background: var(--orange-soft); }
.file-row-confirm > .file-row-note { flex: 1 1 auto; min-width: 0; color: var(--text); }
.file-row-note { color: var(--muted); font-size: .8rem; line-height: 1.35; }
.file-group + .file-group { margin-top: 1rem; }

/* Where (owner, 12 Nov 2026): this computer or the robot, two of the board
   dialog's cards side by side in Save, Save as and Open. A robot that cannot
   be used is a greyed card that says why in its own line. The firmware
   prompt's Core-or-Pro choice (#firmware-prompt-robots) is the same pair. */
.file-where { grid-template-columns: 1fr 1fr; max-height: none; overflow: visible; margin: .8rem 0 .4rem; }
.file-where .board-choice { min-width: 0; }
.file-where .board-choice-blurb { overflow-wrap: anywhere; }
/* The robot's picture over its name (owner, 12 Nov 2026): the Robots page's
   wide picture, drawn for a short strip, shown whole at the card's width
   rather than shrunk into the board dialog's 92px box. */
#firmware-prompt-robots .board-choice-picture { height: auto; aspect-ratio: 880 / 400; padding: 0; object-fit: cover; }
#file-open-robot .file-dialog-scroll { margin-top: .4rem; }
@media (max-width: 420px) { .file-where { grid-template-columns: 1fr; } }
.file-group h3 { margin: 0 0 .3rem; padding: 0 .65rem; color: var(--muted); font-size: .76rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
