/* P01 V2.28 candidate — daily workspace efficiency refinements. */
.vf-asset-row.is-selected,.vf-asset-card.is-selected,.vf-watch-card.is-selected{background:var(--ws-teal-soft);box-shadow:inset 3px 0 0 var(--ws-teal)}
.vf-watch-card.is-selected{border-color:#b7dcd7}
.vf-bulkbar strong{font-variant-numeric:tabular-nums}
.vf-bulkbar .vf-bulk-clear{color:var(--ws-muted)}
.vf-bulkbar button:disabled,.vf-bulkbar select:disabled{opacity:.5;cursor:wait}
.vf-surface-filter-summary{white-space:nowrap;color:var(--ws-muted);font-size:11.5px}
.vf-status-label{font-style:normal;color:var(--ws-muted);font-size:11px}
@media(max-width:760px){
  .vf-bulkbar{left:10px;right:10px;bottom:74px;transform:none;overflow:visible;flex-wrap:wrap;gap:5px;padding:7px 8px;max-width:none}
  .vf-bulkbar strong{flex:1 1 120px;margin-right:0}
  .vf-bulkbar select{flex:1 1 132px;min-width:0;max-width:calc(50% - 3px)}
  .vf-bulkbar button{flex:0 0 auto;padding-left:7px;padding-right:7px}
}

/* P01 L2 · Add/Edit drawer hierarchy and mobile action reachability · 2026-08-31 */
.vf-add-dialog,.vf-detail-drawer{overscroll-behavior:contain}
.vf-detail-drawer{width:min(480px,100vw)}
.vf-workspace-dialog>header,.vf-detail-head{position:sticky;top:0;z-index:6;background:color-mix(in srgb,var(--ws-panel) 96%,transparent);backdrop-filter:blur(10px)}
.vf-detail-head>a{padding:6px 8px;border-radius:6px;background:var(--ws-teal-soft);color:var(--ws-teal);font-weight:650}
.vf-detail-head>a:hover{background:color-mix(in srgb,var(--ws-teal-soft) 72%,var(--ws-teal) 8%)}
.vf-add-dialog .vf-workspace-form,.vf-detail-drawer .vf-workspace-form{align-content:start;gap:10px 12px;padding-top:16px}
.vf-workspace-form input[name="url"],.vf-workspace-form input[name="title"]{height:40px;font-size:13.5px}
.vf-workspace-form input[name="title"]{color:var(--ws-strong);font-weight:650}
.vf-workspace-form [data-html-field],.vf-workspace-form .vf-cover-field{padding:10px;border:1px solid var(--ws-line);border-radius:8px;background:var(--ws-soft)}
.vf-workspace-form .vf-cover-preview[hidden]{display:none!important}
.vf-workspace-form>.vf-check{min-height:34px;padding:0 9px;border:1px solid var(--ws-line);border-radius:7px;background:var(--ws-soft);color:var(--ws-text)}
.vf-add-dialog .vf-workspace-form footer,.vf-detail-drawer .vf-workspace-form footer{position:sticky;bottom:-14px;z-index:5;margin:6px -14px -14px;padding:12px 14px calc(12px + env(safe-area-inset-bottom));background:color-mix(in srgb,var(--ws-panel) 96%,transparent);backdrop-filter:blur(10px);box-shadow:0 -1px 0 var(--ws-line),0 -10px 22px color-mix(in srgb,var(--ws-bg) 82%,transparent)}
.vf-workspace-form footer [data-close-panel]{margin-right:auto}
.vf-workspace-form footer .vf-primary-button{min-width:96px;min-height:38px}
.vf-add-dialog footer [data-add-continue]{min-height:38px}

@media(max-width:520px){
  .vf-workspace-dialog.vf-add-dialog{top:0;left:0;width:100%;height:100dvh;max-height:100dvh;transform:none;border:0;border-radius:0}
  .vf-detail-drawer{height:100dvh}
  .vf-workspace-dialog>header,.vf-detail-head{min-height:58px;padding:10px 12px}
  .vf-add-dialog .vf-workspace-form,.vf-detail-drawer .vf-workspace-form{padding:12px 12px 0;gap:9px}
  .vf-workspace-form input[name="url"],.vf-workspace-form input[name="title"]{height:39px}
  .vf-workspace-form .vf-field textarea{min-height:64px}
  .vf-workspace-form [data-html-field],.vf-workspace-form .vf-cover-field{padding:8px}
  .vf-add-dialog .vf-workspace-form footer,.vf-detail-drawer .vf-workspace-form footer{bottom:0;margin:6px -12px 0;padding:10px 12px calc(10px + env(safe-area-inset-bottom));gap:6px}
  .vf-workspace-form footer .vf-secondary-button,.vf-workspace-form footer .vf-primary-button{min-height:40px}
}

@media(max-width:340px){
  .vf-add-dialog .vf-workspace-form footer{gap:5px}
  .vf-add-dialog footer .vf-secondary-button,.vf-add-dialog footer .vf-primary-button{padding-left:8px;padding-right:8px;font-size:11.5px}
}

/* P01 L2 · mid-width workspace composition after sidebar productization · 2026-08-31 */
@media(min-width:761px) and (max-width:1160px){
  .vf-functional-workspace.surface-channels .vf-workspace-list{grid-template-columns:1fr}
}
@media(min-width:761px) and (max-width:1050px){
  .vf-functional-workspace .vf-app-topbar.vf-domain-subbar .vf-global-search{width:auto;min-width:0;flex:1 1 auto}
  .vf-functional-workspace .vf-app-topbar.vf-domain-subbar .vf-top-actions{flex:0 0 auto}
  .vf-functional-workspace .vf-app-topbar.vf-domain-subbar .vf-new-action{white-space:nowrap}
}

/* P01 L2 · feedback surface coherence after domain-nav migration · 2026-08-31 */
.vf-functional-workspace .vf-workspace-toasts{
  top:calc(var(--ws-domain-nav,38px) + var(--ws-topbar,62px) + 10px);
  right:18px;
  gap:8px;
  /* Passive notices never block the underlying page. A confirmation/undo
     contains real buttons and must opt back in to pointer hit-testing. */
  pointer-events:none;
}
.vf-functional-workspace .vf-workspace-toast.vf-workspace-confirm,
.vf-functional-workspace .vf-workspace-toast.undo{
  pointer-events:auto;
}
.vf-functional-workspace .vf-workspace-toast{
  position:relative;
  min-width:220px;
  max-width:min(380px,calc(100vw - 36px));
  min-height:42px;
  padding:10px 12px 10px 38px;
  border-color:color-mix(in srgb,var(--ws-teal) 28%,var(--ws-line));
  border-left:3px solid var(--ws-teal);
  border-radius:9px;
  background:color-mix(in srgb,var(--ws-teal-soft) 46%,var(--ws-panel));
  color:var(--ws-text);
  line-height:1.45;
  box-shadow:0 10px 28px rgba(15,23,42,.12);
}
.vf-functional-workspace .vf-workspace-toast::before{
  content:"✓";
  position:absolute;
  top:10px;
  left:11px;
  width:18px;
  height:18px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:var(--ws-teal-soft);
  color:var(--ws-teal);
  font-size:11px;
  font-weight:800;
}
.vf-functional-workspace .vf-workspace-toast.error{
  border-color:color-mix(in srgb,var(--ws-danger) 30%,var(--ws-line));
  border-left-color:var(--ws-danger);
  background:color-mix(in srgb,var(--ws-danger) 8%,var(--ws-panel));
  color:var(--ws-text);
}
.vf-functional-workspace .vf-workspace-toast.error::before{
  content:"!";
  background:color-mix(in srgb,var(--ws-danger) 12%,var(--ws-panel));
  color:var(--ws-danger);
}
.vf-functional-workspace .vf-inline-notice.success{
  border-color:color-mix(in srgb,var(--ws-teal) 28%,var(--ws-line));
  background:color-mix(in srgb,var(--ws-teal-soft) 60%,var(--ws-panel));
  color:var(--ws-teal);
}
.vf-functional-workspace .vf-inline-notice.danger{
  border-color:color-mix(in srgb,var(--ws-danger) 28%,var(--ws-line));
  background:color-mix(in srgb,var(--ws-danger) 8%,var(--ws-panel));
  color:var(--ws-danger);
}
.vf-functional-workspace .vf-workspace-empty{
  min-height:180px;
  padding:48px 24px;
  display:grid;
  place-content:center;
}
.vf-functional-workspace .vf-workspace-empty strong{font-size:14.5px}
.vf-functional-workspace .vf-workspace-empty p{max-width:420px;margin:7px auto 0;line-height:1.6}
@media(max-width:760px){
  .vf-functional-workspace .vf-workspace-toasts{
    top:calc(var(--ws-domain-nav,40px) + 10px);
    right:10px;
    left:10px;
  }
  .vf-functional-workspace .vf-workspace-toast{
    min-width:0;
    max-width:none;
  }
  .vf-functional-workspace .vf-workspace-empty{min-height:150px;padding:36px 18px}
}
@media(max-width:520px){
  body.vf-functional-workspace.vf-overlay-open .vf-workspace-toasts{top:66px}
}

/* P01 L2 · dark-mode state cleanup for Watch and favorite affordances · 2026-08-31 */
html[data-theme=dark] .vf-functional-workspace .vf-watch-poster{
  background:var(--ws-soft-2);
}
html[data-theme=dark] .vf-functional-workspace .vf-icon-button.active{
  color:color-mix(in srgb,var(--ws-warning) 55%,var(--ws-strong));
  background:color-mix(in srgb,var(--ws-warning) 14%,var(--ws-panel));
}

/* P01 L2 · private means protected, not warning/error · 2026-08-31 */
body.vf-surface-app.vf-functional-workspace .vf-context-chip.private,
body.vf-surface-app.vf-functional-workspace .vf-chip.private,
body.vf-surface-app.vf-functional-workspace .vf-status-label.private{
  border-color:color-mix(in srgb,var(--ws-teal) 24%,var(--ws-line));
  background:var(--ws-teal-soft);
  color:var(--ws-teal);
}
body.vf-surface-app.vf-functional-workspace.surface-watch .vf-watch-copy .vf-status-label.private{
  width:max-content;
  max-width:100%;
  padding:2px 6px;
  display:inline-flex;
  align-items:center;
  border:1px solid color-mix(in srgb,var(--ws-teal) 24%,var(--ws-line));
  border-radius:999px;
  line-height:1.2;
}

/* P01 L2 · mobile command hierarchy: Pending is utility, Add is primary · 2026-08-31 */
@media(max-width:760px){
  .vf-functional-workspace .vf-mobile-command-row .vf-mobile-pending-action{
    height:38px;
    flex:0 0 auto;
    padding:0 9px;
    border:1px solid var(--ws-line-strong);
    border-radius:8px;
    background:var(--ws-panel);
    color:var(--ws-text);
    font-size:11.5px;
    font-weight:650;
    cursor:pointer;
    white-space:nowrap;
  }
  .vf-functional-workspace .vf-mobile-command-row .vf-mobile-pending-action:hover,
  .vf-functional-workspace .vf-mobile-command-row .vf-mobile-pending-action:focus-visible{
    border-color:color-mix(in srgb,var(--ws-teal) 34%,var(--ws-line-strong));
    background:var(--ws-soft);
    color:var(--ws-teal);
  }
}
@media(max-width:340px){
  .vf-functional-workspace .vf-mobile-command-row .vf-mobile-pending-action{padding-inline:7px;font-size:11px}
  .vf-functional-workspace .vf-mobile-command-row .vf-mobile-command-add{padding-inline:8px}
}

/* P01 L2 · desktop bulkbar composition after visibility control expansion · 2026-08-31 */
@media(min-width:761px){
  .vf-functional-workspace .vf-bulkbar{
    width:min(940px,calc(100vw - var(--ws-sidebar) - 40px));
    max-width:calc(100vw - var(--ws-sidebar) - 40px);
    flex-wrap:nowrap;
    justify-content:flex-start;
  }
  .vf-functional-workspace .vf-bulkbar strong{
    flex:0 0 auto;
    min-width:max-content;
    margin-right:4px;
    white-space:nowrap;
  }
  .vf-functional-workspace .vf-bulkbar select,
  .vf-functional-workspace .vf-bulkbar button{
    flex:0 0 auto;
    white-space:nowrap;
  }
  .vf-functional-workspace .vf-bulkbar [data-bulk-category]{min-width:132px;max-width:180px}
}
@media(min-width:761px) and (max-width:1100px){
  .vf-functional-workspace .vf-bulkbar{
    width:calc(100vw - var(--ws-sidebar) - 28px);
    flex-wrap:wrap;
    row-gap:5px;
    padding:8px 9px;
  }
  .vf-functional-workspace .vf-bulkbar strong{
    flex:1 1 100%;
    margin:0;
  }
}
