/* Project navigation belongs to the workspace, below the main navigation. */
.project-bar{display:grid;grid-template-rows:1fr;border-bottom:var(--border-subtle);background:var(--color-surface)}
.project-bar-reveal{min-height:0;overflow:hidden}
.project-bar:not([hidden]){animation:project-bar-expand var(--duration-normal) var(--ease-standard) both}
.project-bar:not([hidden]) .project-bar-inner{animation:project-bar-enter var(--duration-normal) var(--ease-standard) both}
.project-bar-inner{--project-tab-width:208px;display:flex;align-items:center;gap:12px;width:min(100%,1440px);margin-inline:auto;padding:8px 32px 0;min-width:0}
.project-tabs{display:flex;align-items:stretch;gap:6px;flex:0 1 auto;min-width:0;overflow:clip}
.project-tab{position:relative;display:flex;align-items:center;gap:10px;width:100%;min-width:0;padding:11px 14px 13px;border:1px solid transparent;border-bottom:0;border-radius:10px 10px 0 0;background:transparent;color:var(--color-muted);text-align:left;cursor:pointer;transition:background var(--duration-fast),color var(--duration-fast)}
.project-tab:hover{background:var(--color-surface-soft);color:var(--color-navy)}
.project-tab[aria-selected="true"]{background:var(--color-background);border-color:var(--color-border);color:var(--color-navy)}
.project-tab[aria-selected="true"]::after{content:"";position:absolute;bottom:0;left:14px;right:14px;height:2px;background:var(--color-primary);border-radius:2px}
.project-tab-dot{width:6px;height:6px;flex:none;border-radius:50%;background:var(--color-border)}
.project-tab[aria-selected="true"] .project-tab-dot,.project-tab[data-status="results"] .project-tab-dot{background:var(--color-primary)}
.project-tab-copy{display:grid;gap:4px;min-width:0;flex:1}
.project-tab-name{font-size:var(--type-12);font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.project-tab-status{font-size:10px;font-weight:400;color:var(--color-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.project-add{display:flex;align-items:center;gap:7px;flex:none;align-self:center;margin-bottom:8px;padding:8px 10px;border:0;border-radius:var(--radius-control);background:transparent;color:var(--color-muted);font-size:var(--type-12);cursor:pointer}
.project-add:hover{color:var(--color-navy);background:var(--color-surface-soft)}
.project-add>span:first-child{font-size:20px;line-height:1}
.project-tab:focus-visible{outline-offset:-3px}
@media(max-width:600px){.project-bar-inner{--project-tab-width:180px;padding-inline:16px;gap:6px}.project-add>span:last-child{display:none}.project-add{width:36px;height:36px;justify-content:center}}

.project-tab-item{position:relative;flex:1 1 var(--project-tab-width);width:var(--project-tab-width);min-width:0;max-width:var(--project-tab-width);height:56px;container-type:inline-size;transition:flex-shrink var(--duration-normal) var(--ease-standard)}
.project-tab-item:has(.project-tab[aria-selected="true"]){flex-shrink:0}
.project-tab-item .project-tab{padding-right:40px;height:100%}
.project-tab-close{position:absolute;right:8px;top:12px;display:grid;place-items:center;width:26px;height:26px;padding:0;border:0;border-radius:var(--radius-control);background:transparent;color:var(--color-muted);font-size:18px;cursor:pointer}
.project-tab-close:hover{background:var(--color-border);color:var(--color-navy)}
/* Tabs share the available width instead of creating a horizontal scroller. */
@container(max-width:140px){
  .project-tab-item .project-tab{gap:6px;padding-left:10px;padding-right:34px}
  .project-tab-close{right:4px}
}
@container(max-width:110px){
  .project-tab-dot{display:none}
}
@container(max-width:70px){
  .project-tab-item .project-tab{align-items:flex-start;padding:10px 6px}
  .project-tab-status{display:none}
  .project-tab-close{opacity:0;pointer-events:none;top:auto;bottom:3px;right:2px;height:22px;background:transparent}
  .project-tab-item:hover .project-tab-close,.project-tab-close:focus-visible{opacity:1;pointer-events:auto}
}
.project-delete-dialog{width:min(440px,calc(100% - 32px));padding:32px;border:var(--border-subtle);border-radius:var(--radius-card);background:var(--color-surface);color:var(--color-navy);box-shadow:var(--shadow-preview)}
.project-delete-dialog::backdrop{background:rgb(248 249 251 / 75%);backdrop-filter:blur(5px)}
.project-delete-dialog h2{font-size:var(--type-24);letter-spacing:-.03em}
.project-delete-name{margin:18px 0 10px;font-size:var(--type-14);font-weight:600;overflow-wrap:anywhere}
.project-delete-dialog>p:last-of-type{color:var(--color-muted);font-size:var(--type-13);line-height:var(--line-height-relaxed)}
.project-delete-actions{display:flex;justify-content:flex-end;flex-wrap:wrap;gap:10px;margin-top:26px}

/* Expand real layout space as the tabs fade in; no fixed heights across breakpoints. */
@keyframes project-bar-expand{from{grid-template-rows:0fr}to{grid-template-rows:1fr}}
@keyframes project-bar-enter{from{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:translateY(0)}}
@media(prefers-reduced-motion:reduce){.project-bar:not([hidden]),.project-bar:not([hidden]) .project-bar-inner{animation:none}.project-tab-item{transition:none}}
