/* Open / Save As with the Places Bar (INVENTORY DL3) — positions in client coordinates measured on
   win2k-pro_dialog_open.png (a sizing frame: client origin (4, 23), client 555×320 at the default size), anchored to
   the right/bottom edges the way comdlg32 moves its controls when the dialog is resized (knowledge). Built by
   js/components/filedialog.js. */
.w2k-filedlg { position: relative; flex: 1; font: var(--font-dialog); color: var(--sys-btn-text); }
.w2k-filedlg > * { position: absolute; }
.w2k-filedlg > label { white-space: pre; }
.w2k-filedlg__lookin-label { left: 54px; top: 11px; }
.w2k-filedlg__lookin { left: 99px; top: 7px; right: 195px; width: auto; }
.w2k-filedlg__list { left: 99px; top: 36px; right: 6px; bottom: 66px; box-sizing: border-box; }
.w2k-filedlg__name-label { left: 101px; top: calc(100% - 52px); }
.w2k-filedlg__name { left: 195px; right: 114px; bottom: 35px; width: auto; height: var(--metric-comboex-height); }
.w2k-filedlg__type-label { left: 101px; top: calc(100% - 26px); }
/* The 22px File name combo has its edit line 5px below the top (2px lower than in Run's 21px combo — measured). */
.w2k-filedlg__name > .w2k-combo__edit { top: 5px; }
.w2k-filedlg__type { left: 195px; right: 114px; bottom: 8px; width: auto; }
.w2k-filedlg__ok, .w2k-filedlg__cancel { right: 6px; }
.w2k-filedlg__ok { top: calc(100% - 57px); }
.w2k-filedlg__cancel { top: calc(100% - 31px); }

/* The folder toolbar: 23×22 flat buttons with 16×16 images 3px in; the View Menu button (BTNS_WHOLEDROPDOWN) has its
   5×3 arrow 21px in (measured); its width is knowledge. */
.w2k-filedlg__toolbar { left: calc(100% - 183px); top: 7px; display: flex; height: var(--metric-toolbar-button-height); }
.w2k-filedlg__toolbar > .w2k-toolbar__button { width: 23px; padding: 0; }
.w2k-filedlg__toolbar > .w2k-toolbar__button > img { position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; }
.w2k-filedlg__toolbar > .w2k-toolbar__button:disabled > img { filter: none; }   /* the disabled image is its own bitmap */
.w2k-filedlg__toolbar > [data-wholedropdown] { width: 31px; }
.w2k-filedlg__toolbar > [data-wholedropdown]::after {
  content: "";
  position: absolute;
  left: 21px;
  top: 10px;
  width: 5px;
  height: 3px;
  background:   /* the 5-3-1 pixel arrow, drawn crisp */
    linear-gradient(var(--sys-btn-text), var(--sys-btn-text)) 0 0 / 5px 1px no-repeat,
    linear-gradient(var(--sys-btn-text), var(--sys-btn-text)) 1px 1px / 3px 1px no-repeat,
    linear-gradient(var(--sys-btn-text), var(--sys-btn-text)) 2px 2px / 1px 1px no-repeat;
}

/* Places Bar: a client edge around ButtonShadow; 83×52 buttons with the 32px image at (25, 3) and the white label
   centred at floor in a 75px box at x 4 (cut with "..." — js/components/filedialog.js), its line 35px down. The current place is checked: DkShadow top-left,
   ButtonHilight bottom-right, contents 1px down-right. Hot: the reverse edge (knowledge). */
.w2k-places {
  left: 6px; top: 36px; width: 87px; height: 273px;
  box-sizing: border-box;
  padding: 2px;
  display: flex;
  flex-direction: column;
  background: var(--sys-btn-shadow);
  box-shadow: var(--edge-sunken);
}
.w2k-places__button {
  position: relative;
  flex: none;
  width: 83px;
  height: 52px;
  margin: 0;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--sys-btn-hilight);
  font: inherit;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.w2k-places__button > img { position: absolute; left: 25px; top: 3px; width: 32px; height: 32px; }
.w2k-places__text { position: absolute; left: var(--text-left, 3px); top: 36px; white-space: pre; line-height: var(--line-height-ui); }
.w2k-places__button[aria-pressed="true"] { box-shadow: inset -1px -1px var(--sys-btn-hilight), inset 1px 1px var(--sys-btn-dk-shadow); }   /* hilight owns both far corners */
.w2k-places__button[aria-pressed="true"] > * { transform: translate(1px, 1px); }
.w2k-places__button:not([aria-pressed="true"]):hover { box-shadow: inset -1px -1px var(--sys-btn-dk-shadow), inset 1px 1px var(--sys-btn-hilight); }

.w2k-filedlg__grip { position: absolute; right: 0; bottom: 0; }   /* first in z-order: Cancel's corner lies over it */
