/* ---------- Center content (3-part split: dial · groups · reserved) ---------- */
.content {
  /* --reserved-h = height of the reserved "shutter". JS (app.js resizer) sets this in
     px on load and while dragging: the DEFAULT is content-driven (header + one pinned
     card, or just the header). The 25% here is only a pre-JS fallback.
     Not persisted — resets to the content-driven default on every load. */
  --reserved-h: 25%;
  min-height: 0;
  overflow: hidden;
  /* the middle group area scrolls internally, not the whole pane */
  display: flex;
  flex-direction: column;
  /* no gap: the .reserved-resizer handle is the divider between the two blocks */
  padding: 4px;
  /* animates the small upward nudge applied at full-expand (.shutter-max) so the handle
     settles near the topbar in sync with the reserved-block's flex-basis snap. */
  transition: margin-top 0.34s cubic-bezier(0.16, 1, 0.3, 1);
}

/* At full expand, pull the whole center column up into the layout's top breathing room so
   the shutter handle sits just under the topbar (the bookmarks/widgets are fully covered
   anyway). Scoped to .content only, so the side panels keep their normal top alignment. */
.content.shutter-max {
  margin-top: -10px;
}

/* 1 — Quick dial: smallest, never grows */
.dial-block {
  flex: 0 0 auto;
}

/* 2 — Group dashboard: fills whatever height the reserved shutter leaves */
.folder-block {
  /* large flex-shrink: when the shutter is dragged up past its normal range this collapses
     to 0 FIRST (before the widgets band, whose flex-shrink is just 1), so the shutter eats
     the bookmark groups, then slides over the widgets band on its way to the topbar. */
  flex: 1 1000 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  /* clip the heading/crumbs when the shutter is dragged to the extreme-up position
     and this block shrinks to 0 — otherwise block-head overflows and stays visible */
  overflow: hidden;
}

.block-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 12px;
}

.block-title {
  font-size: var(--fs-md);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.block-hint {
  font-size: var(--fs-sm);
  color: var(--faint);
}

.block-empty {
  font-size: var(--fs-sm);
  color: var(--muted);
  padding: 6px 2px;
}

/* Speed dial — Windows 11 taskbar style: icon-only tiles, packed tight */
.speed-dial {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.dial-item {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink);
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.dial-item:hover {
  background: var(--surface-2);
  border-color: var(--border);
}

.dial-item:active {
  transform: scale(0.92);
}

.dial-item.dragging {
  opacity: 0.45;
}

.dial-fav {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  object-fit: contain;
}

.dial-remove {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 18px;
  height: 18px;
  border-radius: var(--r-pill);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--ink);
  color: var(--bg);
  font-size: 10px;
  line-height: 1;
  border: 2px solid var(--surface);
  opacity: 0;
  transition: opacity var(--dur) var(--ease), background var(--dur) var(--ease);
}

.dial-item:hover .dial-remove {
  opacity: 1;
}

.dial-remove:hover {
  background: var(--danger);
}

.dial-drop-line {
  box-shadow: -2px 0 0 var(--accent);
}

/* Breadcrumbs */
.crumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 3px;
  font-size: var(--fs-md);
}

.crumb {
  font-weight: 500;
  color: var(--muted);
  padding: 3px 7px;
  border-radius: var(--r-sm);
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}

.crumb:hover {
  background: var(--surface-2);
  color: var(--ink);
}

.crumb.current {
  color: var(--ink);
  font-weight: 600;
}

.crumb-sep {
  color: var(--faint);
}

/* Group dashboard — multi-column masonry of folder boxes (start-page style) */
.folder-grid {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  /* the scroller: fixed height, vertical only */
  overflow-x: hidden;
  /* columns are width-bound — never scroll sideways */
  padding: 2px;
  padding-right: 4px;
  /* breathing room for the scrollbar */
}

/* Masonry columns built in JS (renderCenter): a flex row of equal-width columns,
   each stacking its boxes vertically. Packs tight (no row gaps) and never overflows
   sideways — the outer .folder-grid handles vertical scroll. */
.folder-grid-cols {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.folder-col {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* One folder's box */
.bm-group {
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.bm-group.drop-into {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}

.bm-group-head {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}

.bm-group-ico {
  font-size: 15px;
  line-height: 1;
  flex-shrink: 0;
}

.bm-group-name {
  flex: 1;
  min-width: 0;
  font-weight: 600;
  font-size: var(--fs-base);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bm-group-count {
  flex-shrink: 0;
  font-size: var(--fs-xs);
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  padding-left: 6px;
}

/* Bookmark rows inside a box */
.bm-group-list {
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.bm-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 8px;
  border-radius: var(--r-sm);
  color: var(--ink);
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}

.bm-row:hover {
  background: var(--surface-2);
}

.bm-row:hover .bm-row-title {
  color: var(--accent-text);
}

.bm-row-fav {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  object-fit: contain;
  flex-shrink: 0;
}

.bm-row-fav.fav-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
}

.bm-row-title {
  min-width: 0;
  font-size: var(--fs-base);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Shutter handle — drag to resize the reserved area (acts as the divider) */
.reserved-resizer {
  flex: 0 0 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: row-resize;
  touch-action: none;
  /* don't let the grab-bar steal scroll/selection */
  user-select: none;
}

/* hide the handle on the Projects tab (reserved block is hidden there) */
.content:has(.reserved-block[hidden]) .reserved-resizer {
  display: none;
}

.reserved-grip {
  width: 44px;
  height: 4px;
  border-radius: var(--r-pill);
  background: var(--border-strong);
  transition: background 0.15s ease, width 0.15s ease;
}

.reserved-resizer:hover .reserved-grip,
.content.is-resizing .reserved-grip,
.content.shutter-min .reserved-grip,
.content.shutter-max .reserved-grip {
  background: var(--accent);
  width: 64px;
}

/* while dragging: kill selection + force the resize cursor everywhere (no margin animation
   mid-drag — it only animates on release-snap) */
.content.is-resizing {
  cursor: row-resize;
  user-select: none;
  transition: none;
}

/* 3 — Reserved bottom strip — now hosts the Activity Tracker (src/activities.js) */
.reserved-block {
  flex: 0 0 var(--reserved-h, 25%);
  min-height: 0;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
  overflow: hidden;
  /* powerful, decisive snap: when released near a rest position the shutter
     springs into place (easeOutExpo). Disabled mid-drag so it tracks the pointer. */
  transition: flex-basis 0.34s cubic-bezier(0.16, 1, 0.3, 1);
}

.content.is-resizing .reserved-block {
  transition: none;
}

@media (prefers-reduced-motion: reduce) {
  .reserved-block {
    transition: none;
  }
}

.reserved-block[hidden] {
  display: none !important;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--muted);
}

.empty-state svg {
  width: 38px;
  height: 38px;
  color: var(--faint);
  margin: 0 auto 12px;
}

.empty-title {
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
}

.empty-sub {
  font-size: var(--fs-sm);
  color: var(--muted);
}

.empty-action {
  margin-top: 16px;
}

