/* board.css: a review board (shell/board.js) and its presentation, in both designs: Nick's (shell.css: white on
   black, square, words on the axis, nothing centered) and, under [data-design="henry"], Henry's (henry.css: panels,
   8 and 12 px rounding, the teal call to action). A tile is its frame, whole and unframed, with its configuration by
   name (codes quieter) and its version, status and frame under it. */

/* ---- the board: a shot's head, then its tiles in a grid from the axis ---- */
#boardFrameLine { color: var(--soft); }
#boardSections .tiles {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 24px 16px;
  margin: 16px 0 8px calc(var(--axis) - var(--m)); padding: 0; max-width: 1640px;
}
#boardSections .tile { margin: 0; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
#boardSections .tile button.pic {
  display: block; width: 100%; height: auto; padding: 0; border: 0; background: none; cursor: zoom-in;
  aspect-ratio: var(--aspect, 16 / 9); overflow: hidden;
}
#boardSections .tile button.pic:hover { background: none; }
#boardSections .tile button.pic img { display: block; width: 100%; height: 100%; object-fit: contain; object-position: left top; }
#boardSections .tile button.pic .none { display: block; padding: 8px; color: var(--off); text-align: left; }
#boardSections .tile figcaption { display: flex; flex-direction: column; font-size: 12px; line-height: 16px; min-width: 0; }
#boardSections .tile figcaption .line { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#boardSections .tile .foot { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-top: 4px; }
#boardSections .tile .foot .ver { font-weight: 700; }
#boardSections .tile .foot .st { color: var(--soft); }
#boardSections .tile .foot .st.s-approved, #boardSections .tile .foot .st.s-delivered { color: var(--ink); font-weight: 700; }
#boardSections .tile .foot .st.s-needs_work { color: var(--ink); }
#boardSections .tile .foot button.menu { font-size: 12px; line-height: 16px; }
/* a round's Board beside its Open */
table.list td.ctl button + button { margin-left: 8px; }
/* the vehicle's boards are the rework layout's; the original reaches a board from its rounds */
:root:not([data-layout="rework"]) #vBoardsSec, :root:not([data-layout="rework"]) .boardVehicle { display: none; }

/* ---- presented: the whole window, black, a page a shot ---- */
.present {
  position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; gap: 16px;
  padding: 16px var(--m); background: var(--ground); color: var(--ink);
}
.present .phead { flex: none; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 24px; border-top: 2px solid var(--ink); padding-top: 8px; }
.present .ptitle { font-weight: 700; }
.present .phead .small, .present .pfoot .small { color: var(--soft); }
.present .pstage { flex: 1 1 auto; min-height: 0; display: grid; gap: 16px; align-content: start; justify-content: start; overflow: hidden; }
.present .ptile {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px; height: auto; padding: 0; border: 0;
  background: none; text-align: left; white-space: normal; cursor: default; min-width: 0; overflow: hidden;
}
.present .ptile:hover { background: none; }
.present .pframe { display: block; overflow: hidden; }
.present .pframe img { display: block; width: 100%; height: 100%; object-fit: contain; object-position: left top; }
.present .pcap { display: block; max-width: 100%; font-size: 12px; line-height: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.present .pcap.dim { color: var(--soft); }
.present .pfoot { flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }

@media (max-width: 900px) {
  #boardSections .tiles { margin-left: 0; }
}
@media (max-width: 600px) {
  #boardSections .tiles { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 24px 12px; }
  #boardSections .tile .foot { row-gap: 16px; }
  /* the picture is the tile's own tap area, never the 44 px band a phone's other buttons get */
  #boardSections .tile button.pic::after { display: none; }
  .present .pfoot .group { row-gap: 16px; }
  :is(#vBoards) td.ctl { padding-top: 9px; padding-bottom: 9px; }
}

/* ---- Henry's design: each tile a panel, the frame inside its rounding, Present the teal call to action ---- */
[data-design="henry"] #boardSections .tile {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 8px; box-shadow: var(--shadow);
}
[data-design="henry"] #boardSections .tile button.pic { border-radius: var(--r-sm); background: var(--sunk); border: 0; }
[data-design="henry"] #boardSections .tile button.pic:hover { background: var(--sunk); }
[data-design="henry"] #boardSections .tile button.pic:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[data-design="henry"] #boardSections .tile figcaption { padding: 0 4px 4px; color: var(--text); }
[data-design="henry"] #boardSections .tile .foot .st { color: var(--dim); }
[data-design="henry"] #boardSections .tile .foot .st.s-approved, [data-design="henry"] #boardSections .tile .foot .st.s-delivered { color: var(--accent); font-weight: 600; }
[data-design="henry"] #boardSections .tile .foot .st.s-needs_work { color: var(--danger); }
[data-design="henry"] #boardSections .tile .foot button.menu { font-size: 12px; }
[data-design="henry"] #boardPresent { color: var(--on-fill); font-weight: 600; background: linear-gradient(var(--fill-top), var(--fill)); border-color: var(--fill-edge); }
[data-design="henry"] #boardPresent:hover { color: var(--on-fill); background: linear-gradient(var(--fill-hover-top), var(--fill-hover)); border-color: var(--accent); }
[data-design="henry"] #boardPresent:active { background: var(--fill-press); }
[data-design="henry"] #boardPresent:disabled { color: #6b8a86; background: #26403d; border-color: #33534f; }
[data-design="henry"] .present { background: var(--bg); font-family: var(--font); }
[data-design="henry"] .present .phead { border-top: 0; padding: 0 0 12px; border-bottom: 1px solid var(--line); }
[data-design="henry"] .present .ptitle { font: 600 20px/28px var(--display); }
[data-design="henry"] .present .pframe { border-radius: var(--r-sm); background: var(--sunk); }
[data-design="henry"] .present .ptile:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
