/* ============================================================
   Styles OWNED by the Pipeline (kanban) module
   (convention: css/modules/<module-name>.css)
   Mobile first: columns are near-full-width with snap scrolling;
   desktop gets fixed 240px columns.
   ============================================================ */

/* Board: one column per stage, horizontal scroll + snap on phones */
.pl-board {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  overflow-x: auto;
  padding-bottom: 12px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}

.pl-col {
  flex: 0 0 80vw;
  width: 80vw;
  max-width: 280px;
  scroll-snap-align: start;
  background: #eef0f4;
  border: 2px solid transparent;
  border-radius: 10px;
  padding: 10px;
}

@media (min-width: 992px) {
  .pl-col {
    flex: 0 0 240px;
    width: 240px;
    max-width: none;
  }
}

/* Highlight the column a card is dragged over */
.pl-col.drag-over {
  border-color: #0d6efd;
  background: #e7f0ff;
}

.pl-col-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2px;
}

.pl-col-total {
  color: #5d6778;
  font-weight: 600;
  margin-bottom: 8px;
}

.pl-col-body {
  min-height: 60px;
  max-height: calc(100dvh - 380px);
  overflow-y: auto;
}

@media (min-width: 992px) {
  .pl-col-body {
    max-height: calc(100dvh - 320px);
  }
}

/* Deal card */
.pl-card {
  background: #fff;
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 8px;
  box-shadow: 0 1px 3px rgba(30, 37, 48, 0.1);
}

/* Draggable card: no text selection / no iOS callout while holding */
.pl-card.pl-grab {
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

/* The original card while its ghost is being dragged */
.pl-card.dragging {
  opacity: 0.35;
}

/* Floating copy that follows the finger / cursor */
.pl-ghost {
  position: fixed;
  z-index: 2000;
  margin: 0;
  pointer-events: none;
  opacity: 0.95;
  transform: translate(0, 0);
  box-shadow: 0 12px 28px rgba(30, 37, 48, 0.3);
  rotate: 2deg;
}

.pl-card-title {
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.3;
  word-break: break-word;
}

.pl-owner {
  max-width: 110px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pl-empty {
  text-align: center;
  padding: 16px 0;
}

/* Bigger touch target for the per-card "..." stage menu on phones */
@media (max-width: 991.98px) {
  .pl-card .dropdown > .btn {
    padding: 4px 8px !important;
  }
}
