/* Approvals page: cards, tags, selection bar and the undo corner. Colours come from the app's tokens (light and dark). */
.ap-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin:4px 0 14px}
.ap-toolbar .search{flex:1 1 200px;min-width:160px;max-width:340px}
.ap-toolbar select{width:auto;min-width:150px}
.ap-seg{display:inline-flex;border:1px solid var(--line);border-radius:11px;overflow:hidden;background:var(--surface)}
.ap-seg button{border:0;background:none;color:var(--ink);padding:8px 13px;font-size:var(--text-control);display:inline-flex;gap:6px;align-items:center}
.ap-seg button+button{border-inline-start:1px solid var(--line)}
.ap-seg button b{font-size:var(--text-sm);background:var(--surface-3);border-radius:99px;padding:1px 7px;color:var(--muted)}
.ap-seg button.active{background:var(--teal-soft);color:var(--teal-2);font-weight:700}
.ap-seg button.active b{background:var(--teal);color:#fff}
.ap-toolbar [aria-pressed=true]{background:var(--teal-soft);border-color:var(--teal);color:var(--teal-2)}
.ap-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(262px,1fr));gap:14px;align-items:start}
.ap-card{background:var(--surface);border:1px solid var(--line);border-radius:14px;overflow:hidden;display:flex;flex-direction:column;box-shadow:0 8px 24px rgba(21,59,69,.05);transition:opacity .25s,transform .25s,box-shadow .15s}
.ap-card.selected{border-color:var(--teal);box-shadow:0 0 0 2px var(--teal-soft),0 8px 24px rgba(21,59,69,.08)}
.ap-card.leaving{opacity:0;transform:scale(.95)}
.ap-media{position:relative;background:var(--surface-3)}
.ap-media .car{border-radius:0}
.ap-nomedia{all:unset;box-sizing:border-box;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;width:100%;aspect-ratio:4/3;cursor:pointer;color:var(--muted);font-size:var(--text-sm);background:var(--surface-3)}
.ap-nomedia:focus-visible{outline:3px solid var(--teal);outline-offset:-3px}
.ap-fmt{position:absolute;inset-inline-start:8px;bottom:8px;background:rgba(11,29,36,.72);color:#fff;border-radius:7px;padding:2px 8px;font-size:12px;font-weight:600;pointer-events:none;z-index:2}
.ap-pick{position:absolute;inset-inline-start:8px;top:8px;z-index:3;background:var(--surface);border-radius:8px;padding:5px;line-height:0;box-shadow:0 1px 6px #0003;cursor:pointer}
.ap-pick input{width:22px;height:22px;min-height:0;margin:0;accent-color:var(--teal)}
.ap-body{padding:12px 14px 6px;display:grid;gap:6px;min-width:0}
.ap-body h3{margin:0;font-size:var(--text-body);line-height:1.3}
.ap-body h3 .link-btn{text-align:start;overflow-wrap:anywhere}
.ap-meta{margin:0;font-size:var(--text-sm);color:var(--muted)}
.ap-chips{margin:0;display:flex;flex-wrap:wrap;gap:5px;align-items:center}
.ap-chips .rv-chip{margin:0}
.ap-lang{font-size:11px;font-weight:700;letter-spacing:.04em;padding:2px 6px;border-radius:6px;background:var(--surface-3);color:var(--muted)}
.ap-tags{display:flex;flex-wrap:wrap;gap:5px;min-height:4px}
.rv-tag.auto{background:#e6f1ff;color:#1f5aa6}
.rv-tag.team{background:var(--surface-3);color:var(--muted)}
body.dark .rv-tag.auto{background:#1c3350;color:#a9cdfa}
.ap-actions{display:flex;gap:8px;padding:10px 14px 14px;margin-top:auto}
.ap-btn{width:42px;height:42px;border-radius:50%;border:1px solid var(--line);background:var(--surface);color:var(--ink);display:grid;place-items:center;padding:0;cursor:pointer;transition:background .12s,transform .08s}
.ap-btn:hover:not(:disabled){background:var(--surface-2);transform:translateY(-1px)}
.ap-btn:focus-visible{outline:3px solid var(--teal);outline-offset:2px}
.ap-btn:disabled{opacity:.4;cursor:not-allowed}
.ap-btn.ok{background:var(--teal);border-color:var(--teal);color:#fff}
.ap-btn.ok:hover:not(:disabled){background:var(--teal-2)}
.ap-btn.edit{background:#fff1d6;border-color:#f0cf93;color:#8a5200}
body.dark .ap-btn.edit{background:#4a3818;border-color:#6d5324;color:#ffd699}
.ap-selbar{position:sticky;top:76px;z-index:6;display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:0 0 14px;padding:10px 14px;background:var(--surface);border:1px solid var(--teal);border-radius:12px;box-shadow:0 8px 24px rgba(21,59,69,.12)}
.ap-selbar .primary{margin-inline-start:auto;display:inline-flex;gap:6px;align-items:center}
.ap-selbar .primary:disabled{opacity:.45;cursor:not-allowed}
/* the undo corner */
.ap-undo-stack{position:fixed;inset-inline-end:22px;bottom:84px;z-index:95;display:flex;flex-direction:column;gap:8px;align-items:flex-end;pointer-events:none;max-width:calc(100vw - 32px)}
.ap-undo-item{position:relative;overflow:hidden;pointer-events:auto;display:flex;align-items:center;gap:12px;background:#0b2f3d;color:#fff;border-radius:12px;padding:11px 14px;box-shadow:0 10px 30px rgba(0,0,0,.28);min-width:260px;max-width:440px;animation:apIn .18s ease-out}
.ap-undo-item.error{background:#8d1632}
.ap-undo-text{display:inline-flex;align-items:center;gap:7px;flex:1;min-width:0;overflow-wrap:anywhere;font-size:var(--text-control)}
.ap-undo-btn{display:inline-flex;align-items:center;gap:5px;background:rgba(255,255,255,.14);color:#fff;border:1px solid rgba(255,255,255,.4);border-radius:9px;padding:6px 11px;font-weight:700;flex:none}
.ap-undo-btn:hover{background:rgba(255,255,255,.28)}
.ap-undo-btn:focus-visible,.ap-undo-close:focus-visible{outline:3px solid #8bd8d5;outline-offset:2px}
.ap-undo-close{background:none;border:0;color:#fff;padding:2px;display:grid;place-items:center}
.ap-undo-bar{position:absolute;inset-inline:0;bottom:0;height:3px;background:#5fe0da;transform-origin:left;animation:apBar linear forwards}
[dir=rtl] .ap-undo-bar{transform-origin:right}
.ap-undo-item.sending{opacity:.9}
@keyframes apBar{from{transform:scaleX(1)}to{transform:scaleX(0)}}
@keyframes apIn{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
@media(prefers-reduced-motion:reduce){.ap-undo-item{animation:none}.ap-card{transition:none}}
@media(max-width:600px){.ap-grid{grid-template-columns:1fr}.ap-undo-stack{inset-inline:12px;bottom:76px;align-items:stretch}.ap-undo-item{max-width:none}.ap-seg{flex-wrap:wrap}.ap-selbar{top:70px}}
