/* dw3-media.css — DW3 B2: the Media-side pieces (DW3-08 voice notes in
 * project Media; §C C-3 Timeline upload door + item ⋯; §C C-7 360 job
 * filter + overlay Copy link; §C C-2 Quick Measure flag pill). Loaded
 * after every shared sheet (index.html, B2 marker). */

/* voice notes under the project's Library */
body.skin-billdr #app .dw3-voice { margin-top: var(--ds-s6); }
body.skin-billdr #app .dw3-voice .mod-h { display: flex; align-items: center; gap: 8px; }
body.skin-billdr #app .dw3-vn-note { margin: 0 0 10px; font-size: var(--ds-fs-sm); }
body.skin-billdr #app .dw3-vn { align-items: center; gap: 14px; }
body.skin-billdr #app .dw3-vn .kind-ico { color: var(--ds-muted); }
body.skin-billdr #app .dw3-vn-tx { margin: 6px 0 0; font-size: var(--ds-fs-sm); color: var(--ds-ink); line-height: 1.5; white-space: pre-wrap; }
body.skin-billdr #app .dw3-vn-play audio { width: 240px; height: 36px; }
body.skin-billdr #app .dw3-vn-menu { width: 34px; height: 34px; padding: 0; justify-content: center; }
@media (max-width: 760px) {
  body.skin-billdr #app .dw3-vn { flex-wrap: wrap; }
  body.skin-billdr #app .dw3-vn-play audio { width: 100%; }
}

/* the Timeline's upload door */
body.skin-billdr #app .dw3-tlup { margin: 0 0 var(--ds-s3); border: 1.5px dashed transparent; border-radius: var(--ds-r); transition: border-color .12s, background-color .12s; }
body.skin-billdr #app .dw3-tlup.dragover { border-color: var(--ds-gold); background: var(--ds-gold-tint); }
body.skin-billdr #app .dw3-tlup-bar { align-items: center; gap: 10px; flex-wrap: wrap; }
body.skin-billdr #app .dw3-tlup-pick { min-width: 220px; height: var(--ds-ctl); padding: 0 34px 0 12px; }

/* the Timeline cell's ⋯ (same seat as the Library's) */
body.skin-billdr #app .tl-cell .ph { position: relative; }
body.skin-billdr #app .tl-menu-chip {
  position: absolute; bottom: 6px; right: 6px; z-index: 2; width: 30px; height: 30px; border-radius: 50%; border: 0;
  display: flex; align-items: center; justify-content: center; background: rgba(11, 34, 53, .82); color: #fff;
  cursor: pointer; opacity: 0; transition: opacity .12s;
}
body.skin-billdr #app .tl-cell .ph:hover .tl-menu-chip, body.skin-billdr #app .tl-menu-chip:focus-visible { opacity: 1; }
@media (hover: none), (max-width: 760px) { body.skin-billdr #app .tl-menu-chip { opacity: .92; width: 38px; height: 38px; } }

/* 360 page job filter */
body.skin-billdr #app .pano-filterbar { margin: 0 0 var(--ds-s3); }

/* Quick Measures: the flagged pill */
body.skin-billdr #app .qm-flagpill { background: var(--ds-orange-bg); color: var(--ds-orange-ink); display: inline-flex; align-items: center; gap: 4px; }

/* FIX-3 B4 (2026-10-20): the shared file picker (uploads.js upPickerHtml —
   the PO editor's Attachments and every caller of the picker). It lives
   here, beside the Timeline upload door, because the uploads sheet isn't
   one of the package's stylesheets; scoped the same way. Drag-over is
   navy tint, not gold — gold stays on the main action. */
body.skin-billdr #app .up-pick { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
body.skin-billdr #app .up-pick-zone {
  display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap;
  min-height: 72px; padding: 14px 16px; border: 1.5px dashed var(--ds-line-strong); border-radius: var(--ds-r);
  background: var(--ds-card); text-align: center; transition: border-color .12s, background-color .12s;
}
body.skin-billdr #app .up-pick-zone.dragover { border-color: var(--ds-navy); background: var(--ds-tint); }
body.skin-billdr #app .up-pick-hint { color: var(--ds-muted); font-size: var(--ds-fs-sm); }
body.skin-billdr #app .up-pick-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
body.skin-billdr #app .up-pick-list:empty { display: none; }
body.skin-billdr #app .up-pick-row {
  display: flex; align-items: center; gap: 10px; min-width: 0; padding: 6px 6px 6px 12px;
  border: 1px solid var(--ds-line); border-radius: var(--ds-r-sm); background: var(--ds-card);
}
body.skin-billdr #app .up-pick-row .up-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ds-ink); font-size: var(--ds-fs-sm); }
body.skin-billdr #app .up-pick-row .up-pick-size { flex: none; font-size: var(--ds-fs-xs); }
body.skin-billdr #app .up-pick-note { margin: 0; font-size: var(--ds-fs-xs); }

/* wave599-lightboxnav (2026-11-11): the shared lightbox's set
 * navigation — arrows riding the media box's edges, the counter
 * centred under the picture, arrows dimmed at the set's ends.
 * .lb-media lives outside #app, so these rules are unscoped. The
 * media box is postitioned so the arrows anchor to IT, not the
 * panel; .lb-media gains position:relative so the arrows anchor
 * to IT, not the panel. */
.lb-media { position: relative; }
.lb-nav.hidden { display: none; }
.lb-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, .14); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
}
.lb-arrow:hover { background: rgba(255, 255, 255, .28); }
.lb-arrow:disabled { opacity: .28; cursor: default; }
.lb-arrow:disabled:hover { background: rgba(255, 255, 255, .14); }
.lb-prev { left: 10px; }
.lb-next { right: 10px; }
.lb-arrow .lb-arrow-ico { width: 22px; height: 22px; }
.lb-arrow .lb-arrow-ico.flip { transform: scaleX(-1); }
.lb-count {
  position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); z-index: 3;
  color: #fff; background: rgba(10, 15, 25, .55); border-radius: 999px;
  padding: 2px 12px; font-size: 13px; letter-spacing: .02em;
}

/* (fix 2026-11-12) a STABLE stage: the media box holds one fixed
 * height and every picture fits INSIDE it (contain), whatever its
 * shape — before this, the box took each photo's own height, so
 * stepping through a set resized the whole viewer on every click
 * and tall portraits pushed the details off the panel (owner's
 * recording: "gittery… picture doesn't seem to fit"). styles.css
 * loads first; these rules win at equal specificity. The picture
 * keeps its full frame — contain letterboxes, never crops. */
.lb-media { height: min(66vh, 720px); }
.lb-media img, .lb-media video { width: 100%; height: 100%; max-height: none; object-fit: contain; }

/* wave601-viewertools (2026-11-11): the lightbox's Create row
 * (Mark up / Measure) reuses the Manage row's flex dress — parity10's
 * .lb-manage rule carries the layout for any dd.lb-manage. This row
 * sits above Manage in the same info panel and needs no further
 * geometry of its own: the buttons are the house ghost buttons, and
 * the Measure button is simply absent (never rendered disabled)
 * when the shown photo carries no depth or no measure door is in
 * the page. No wave601 CSS rules are required beyond this note. */

/* wave639-lbcalm (2026-11-13): the owner, on the photo viewer:
 * "still jumpy between each picture" and "doesn't look as nice as
 * the rest of the program". The wave629 fixed stage stopped the
 * picture box resizing, but the PANEL still resized: it is centred
 * with a variable height (stage + however many detail rows this
 * photo has + comments), so every step moved the whole viewer.
 * Now the panel is ONE fixed-height card; on desktop the details
 * ride a right rail that scrolls inside itself, on phones the
 * details scroll under a fixed stage — stepping changes only the
 * picture inside the stage, never the geometry around it. The
 * dress takes the program's navy + gold card language (rounded
 * card, hairlines, gold title rule) in place of the plain box. */
.lb-panel {
  height: min(94dvh, 1020px); max-height: 94dvh; overflow: hidden;
  border-radius: 18px; border: 1px solid rgba(148, 170, 200, .18);
  box-shadow: 0 30px 80px rgba(2, 6, 14, .55); background: #0d1622;
}
.lb-media { background: #04070b; }
.lb-x {
  background: rgba(8, 13, 22, .55); border: 1px solid rgba(255, 255, 255, .16);
  backdrop-filter: blur(4px); font-size: 22px; line-height: 1;
}
.lb-x:hover { border-color: rgba(205, 174, 114, .7); color: #CDAE72; }
.lb-arrow {
  background: rgba(8, 13, 22, .55); border: 1px solid rgba(255, 255, 255, .16);
  backdrop-filter: blur(4px);
}
.lb-arrow:hover { background: rgba(8, 13, 22, .75); border-color: rgba(205, 174, 114, .7); color: #CDAE72; }
.lb-arrow:disabled:hover { background: rgba(8, 13, 22, .55); border-color: rgba(255, 255, 255, .16); color: #fff; }
.lb-count { border: 1px solid rgba(255, 255, 255, .14); font-weight: 600; }
.lb-info h3 {
  font-size: 17px; font-weight: 650; letter-spacing: .01em; color: #fff;
  padding-bottom: 10px; border-bottom: 2px solid #CDAE72; margin: 0 0 6px;
}
.lb-info dl { grid-template-columns: 104px 1fr; gap: 0 12px; }
.lb-info dt {
  padding: 7px 0; font-size: 11.5px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .06em; border-top: 1px solid rgba(148, 170, 200, .10);
}
.lb-info dd { padding: 7px 0; margin: 0; border-top: 1px solid rgba(148, 170, 200, .10); }
.lb-info dl > dt:first-child, .lb-info dl > dd:nth-child(2) { border-top: 0; }
@media (min-width: 900px) {
  .lb-panel {
    display: grid; width: min(1180px, 96vw);
    grid-template-columns: minmax(0, 1fr) 352px;
    grid-template-rows: minmax(0, 1fr) auto;
  }
  .lb-media { grid-column: 1; grid-row: 1 / span 2; height: auto; min-height: 0; }
  .lb-info {
    grid-column: 2; grid-row: 1; min-height: 0; overflow-y: auto;
    padding: 18px 20px 20px; background: #111c2b;
    border-left: 1px solid rgba(148, 170, 200, .14);
  }
  .lb-comments {
    grid-column: 2; grid-row: 2; max-height: 40dvh; overflow-y: auto;
    background: #111c2b; border-left: 1px solid rgba(148, 170, 200, .14);
    border-top: 1px solid rgba(148, 170, 200, .14);
  }
}
@media (max-width: 899px) {
  .lb-media { flex: 0 0 auto; height: min(52dvh, 560px); }
  .lb-info { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 16px 18px 18px; background: #111c2b; }
  .lb-comments { flex: 0 1 auto; max-height: 34dvh; overflow-y: auto; background: #111c2b; }
}
