/* ALP PLATFORM — Workspace shell: tab strip + favourites/history dropdowns.
   Tokens come from enterprise.css (--navy/--blue/--border/--surface/etc). */

#alp-tab-strip{
  display:flex;align-items:stretch;gap:0;
  background:var(--surface,#fff);border-bottom:1px solid var(--border,#D8DDE6);
  padding:0 8px;overflow-x:auto;overflow-y:hidden;min-height:34px;
}
.alp-tab{
  display:flex;align-items:center;gap:6px;padding:0 10px;
  border-right:1px solid var(--border,#D8DDE6);
  font-size:12px;color:var(--muted,#5B6472);cursor:pointer;white-space:nowrap;
  /* Browser-tab behaviour: tabs COMPRESS to fit the strip instead of
     overflowing off the right edge (the fixed 34px band clips the
     horizontal scrollbar, so overflowed tabs were unreachable). Labels
     ellipsize as tabs narrow. */
  flex:0 1 auto;min-width:56px;max-width:200px;overflow:hidden;
  /* no vertical nudge — a 1px top offset overflowed the fixed 34px band and
     summoned a vertical scrollbar over the right-most tabs */
}
.alp-tab[draggable="true"]{ cursor:grab; }
.alp-tab-dragging{ opacity:.45; cursor:grabbing; background:var(--bg,#F2F4F7); }
/* Highlight the strip when a page is dragged in from the sidebar to open a new tab. */
#alp-tab-strip.alp-tab-droptarget{ box-shadow:inset 0 0 0 2px var(--blue,#2C46C6); background:color-mix(in srgb,var(--blue,#2C46C6) 8%,transparent); }
.alp-tab-label{ min-width:0; flex:0 1 auto; }
.alp-tab-icon, .alp-tab-close{ flex-shrink:0; }
.alp-tab-add{ flex-shrink:0; }
.alp-tab:hover{ background:var(--bg,#F2F4F7); color:var(--text,#1F2733); }
.alp-tab.active{
  color:var(--blue,#22327D);font-weight:bold;
  border-bottom:2px solid var(--blue,#22327D);
}
.alp-tab-icon{ display:inline-flex; width:14px; height:14px; flex-shrink:0; }
.alp-tab-icon svg{ width:100%; height:100%; }
.alp-tab-label{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.alp-tab-close{
  margin-left:2px;opacity:.5;font-size:13px;line-height:1;
  border-radius:3px;padding:0 3px;
}
.alp-tab-close:hover{ opacity:1; background:var(--border,#D8DDE6); }
.alp-tab-add{
  border:none;background:none;color:var(--muted,#5B6472);cursor:pointer;
  padding:0 10px;display:flex;align-items:center;
}
.alp-tab-add:hover{ color:var(--blue,#22327D); }

.alp-ws-controls{ display:inline-flex; align-items:center; gap:2px; }

.alp-ws-dropdown{
  position:fixed;width:260px;max-height:400px;overflow:auto;
  background:var(--surface,#fff);border:1px solid var(--border,#D8DDE6);
  border-radius:var(--radius,6px);box-shadow:0 8px 24px rgba(0,0,0,.15);
  z-index:1001;display:none;
}
.alp-ws-dropdown.open{ display:block; }
.alp-ws-dropdown-title{
  padding:8px 12px;font-size:11px;font-weight:bold;text-transform:uppercase;
  letter-spacing:.04em;color:var(--muted,#5B6472);border-bottom:1px solid var(--border,#D8DDE6);
}
.alp-ws-dropdown-list a{
  display:flex;align-items:center;gap:8px;padding:8px 12px;font-size:13px;
  color:var(--text,#1F2733);text-decoration:none;
}
.alp-ws-dropdown-list a:hover{ background:var(--bg,#F2F4F7); }
.alp-ws-item-icon{ display:inline-flex; width:14px; height:14px; flex-shrink:0; }
.alp-ws-item-icon svg{ width:100%; height:100%; }
.alp-ws-item-remove{ margin-left:auto; opacity:.5; padding:0 3px; }
.alp-ws-item-remove:hover{ opacity:1; }
.alp-ws-empty{ padding:14px 12px; font-size:12px; color:var(--muted,#5B6472); }

/* ── Quick Access panel (rail-anchored: Pinned / Favourites / Recent) ── */
.alp-qa{ width:290px; max-height:440px; display:none; flex-direction:column; }
.alp-qa.open{ display:flex; }
.alp-qa .alp-ws-dropdown-list{ overflow-y:auto; }
.alp-qa-filter{
  margin:8px 10px 6px; padding:6px 10px; font:inherit; font-size:12.5px;
  border:1px solid var(--border-strong,#C3CAD6); border-radius:4px; outline:none;
  background:var(--bg-input,#fff); color:var(--text,#1F2733);
}
.alp-qa-filter:focus{ border-color:var(--blue,#22327D); }
.alp-qa-sec-title{
  padding:8px 12px 3px; font-size:10px; font-weight:bold; text-transform:uppercase;
  letter-spacing:.06em; color:var(--muted,#5B6472);
}

/* History rows: label takes the slack so the relative time sits hard right. */
.alp-qa-label{ flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.alp-qa-when{
  flex-shrink:0; margin-left:8px; font-size:10.5px; color:var(--muted,#5B6472);
  opacity:.8; font-variant-numeric:tabular-nums;
}

.is-fav svg{ fill:currentColor; }

@media(max-width:768px){
  #alp-tab-strip{ display:none; } /* mobile keeps the simpler single-page flow */
}
