// Planning header's leftovers basket — an icon button that toggles a // popover of this week's still-available leftover pools. Same "absolutely // positioned panel hanging off a relative wrapper" shape as // `.calendar-popover` (week-navigator.scss). .leftovers-basket { position: relative; &__toggle { display: inline-flex; align-items: center; gap: var(--space-xs); padding: var(--space-xs) var(--space-sm); font-size: var(--font-size-base); line-height: 1; cursor: pointer; border: 1px solid var(--color-border); border-radius: var(--radius-base); background: var(--color-surface); color: var(--color-text); } // Small pill showing how many source items still have leftovers. &__count { min-width: 1.1rem; padding: 0 var(--space-xs); font-size: var(--font-size-xs); font-weight: 700; text-align: center; border-radius: 999px; background: var(--color-primary); color: var(--color-surface); } &__popover { position: absolute; top: calc(100% + var(--space-xs)); right: 0; z-index: 10; width: 20rem; padding: var(--space-md); background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); box-shadow: var(--shadow-md); } &__heading { margin: 0 0 var(--space-sm); font-size: var(--font-size-sm); font-weight: 700; } &__empty { margin: 0; color: var(--color-text-muted); font-size: var(--font-size-sm); } &__list { display: flex; flex-direction: column; gap: var(--space-sm); margin: 0; padding: 0; list-style: none; } &__line { display: flex; align-items: center; gap: var(--space-sm); &.is-dragging { opacity: 0.5; } } // Grip handle — the only part that starts a drag, so a click on "Jeter" // never gets hijacked. `touch-action: none` lets @dnd-kit's PointerSensor // own the gesture on touch devices. &__drag-handle { flex-shrink: 0; padding: 0 var(--space-xs); font-size: var(--font-size-base); line-height: 1; cursor: grab; color: var(--color-text-muted); background: none; border: none; touch-action: none; &:active { cursor: grabbing; } } &__meta { display: flex; flex-direction: column; flex: 1; min-width: 0; } &__recipe { font-weight: 600; } &__origin { color: var(--color-text-muted); font-size: var(--font-size-xs); } &__qty { flex-shrink: 0; font-size: var(--font-size-sm); color: var(--color-text-muted); } &__discard { flex-shrink: 0; padding: var(--space-xs) var(--space-sm); font-size: var(--font-size-sm); cursor: pointer; border: 1px solid var(--color-border); border-radius: var(--radius-base); background: var(--color-surface); color: var(--color-text-muted); &:hover:not(:disabled) { color: var(--color-error); border-color: var(--color-error); } &:disabled { opacity: 0.6; cursor: default; } } }