/* Approvals: the queue rows, request cards and the ask form, the captioner deck, the partner portal and
   the page an approval email opens. Everything else is app.css; these are only the shapes that are new here. */

/* ---- the queue ---- */
.aprow { align-items: flex-start; gap: 12px; padding: 10px 14px; }
.apthumb { flex: none; width: 96px; aspect-ratio: 16 / 9; border-radius: 3px; background: #111 center / contain no-repeat; position: relative;
  display: grid; place-items: center; color: #6b6b6b; }
.apthumb .ver { position: absolute; left: 4px; top: 4px; font: 500 10px/1 var(--font-mono); padding: 2px 4px; border-radius: 3px; background: rgba(10, 10, 10, .75); color: #fff; }
.apmain { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.apacts { flex: none; max-width: 46%; display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 6px; }
.apdetail { gap: 6px; }
.aptext { white-space: pre-wrap; overflow-wrap: anywhere; padding: 6px 10px; border-left: 2px solid var(--border-strong); background: var(--paper-warm); font-size: 13px; }
.apnote { font-size: 12.5px; color: var(--text-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.apwho { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--text-2); }
.apans { display: inline-flex; align-items: center; gap: 5px; }
.apans.approved > .ico { color: var(--ok); }
.apans.changes > .ico { color: var(--warn); }
.apsaid { font-size: 12.5px; color: var(--text-2); overflow-wrap: anywhere; }
.apsaid b { color: var(--text); font-weight: 600; }
.apvideo { width: 100%; max-height: 70vh; background: #000; border-radius: 4px; }

/* ---- risk, stages in order, and the deadline (overdue uses .stuck, in marker red) ---- */
.aprisk { padding: 2px; min-height: 0; }
.apriskslot { display: contents; }
.apstrip { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 3px; }
.apstrip > .ico { color: var(--text-3); }
.apstrip .chip.wait { --chip-fg: var(--text-3); }
.apstage { display: flex; align-items: baseline; gap: 10px; }
.apstage > .label { flex: none; min-width: 64px; }

/* ---- the piece drawer ---- */
.apcard { border: 1px solid var(--border); border-radius: 6px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.apask { background: var(--sunken); border-radius: 6px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.apask .field-row input, .apask .field-row select, .apask .field-row textarea { width: 100%; }
.apask .field-row button { justify-content: flex-start; overflow: hidden; text-overflow: ellipsis; }

/* ---- the captioner ---- */
.capstage { display: flex; align-items: flex-start; justify-content: center; gap: 16px; padding: 20px 18px 40px; }
.capcard { display: grid; grid-template-columns: minmax(200px, 300px) minmax(0, 480px); background: var(--panel); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.capmedia { background: #000; display: flex; align-items: center; justify-content: center; min-height: 360px; }
.capvideo { display: block; width: 100%; max-height: calc(100vh - 170px); aspect-ratio: 9 / 16; object-fit: contain; background: #000; }
.capnovideo { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 24px; text-align: center; font-size: 13px; color: #b4b4ae; }
.capbody { padding: 16px 18px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.captitle { font: 600 16px/1.3 var(--font-head); text-decoration: none; overflow-wrap: anywhere; }
.captitle:hover { text-decoration: underline; }
.capfield { display: flex; flex-direction: column; gap: 6px; }
.capfield input, .capfield textarea { width: 100%; }
.capcount { font: 500 11px/1 var(--font-mono); font-variant-numeric: tabular-nums; color: var(--text-3); }
.capcount.warn { color: var(--warn); }
.capcount.over { color: var(--alert); }
.capbtns { flex-wrap: wrap; border-top: 1px solid var(--border); padding-top: 12px; }
.cappeek { width: 170px; flex-direction: column; align-items: stretch; white-space: normal; text-align: left; gap: 8px; padding: 10px; border-radius: 8px; opacity: .6; }
.cappeek:hover { opacity: 1; }
.cappeek .apthumb { width: 100%; }

/* ---- the partner portal and the email's approval page: the customer's white label ---- */
.portal { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); }
.pthead { display: flex; align-items: center; gap: 12px; padding: 12px 24px; background: var(--panel); border-bottom: 1px solid var(--border); }
.ptlogo { height: 32px; max-width: 180px; object-fit: contain; }
.ptbrand { font: 600 16px/1.2 var(--font-head); letter-spacing: -.01em; }
.ptmain { flex: 1; width: min(880px, 100%); margin: 0 auto; padding: 28px 24px 48px; display: flex; flex-direction: column; gap: 16px; }
.ptitem { display: flex; gap: 16px; padding: 14px; background: var(--panel); border: 1px solid var(--border); border-radius: 6px; }
.ptitem h2 { font-size: 16px; }
.ptthumb, .ptthumb:hover { flex: none; width: 220px; aspect-ratio: 16 / 9; padding: 0; border: 0; border-radius: 4px; overflow: hidden; position: relative; background: #111; }
.ptimg { position: absolute; inset: 0; background: center / contain no-repeat; }
.ptplay { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; }
.ptplay .ico { width: 44px; height: 44px; border-radius: 50%; background: rgba(10, 10, 10, .55); }
.ptbody { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.pttext { white-space: pre-wrap; overflow-wrap: anywhere; padding: 8px 12px; border-left: 2px solid var(--border-strong); background: var(--paper-warm); font-size: 14px; }
.ptpowered { padding: 18px; text-align: center; font: 500 9.5px/1.3 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); }

@media (max-width: 820px) {
  .aprow { flex-wrap: wrap; }
  .apacts { max-width: none; justify-content: flex-start; }
  .apthumb { width: 72px; }
  .capcard { grid-template-columns: 1fr; }
  .capvideo { max-height: 60vh; }
  .cappeek { display: none; }
}
@media (max-width: 640px) {
  .pthead { padding: 12px 16px; }
  .ptmain { padding: 20px 16px 40px; }
  .ptitem { flex-direction: column; }
  .ptthumb, .ptthumb:hover { width: 100%; }
}
