/**
 * DAM workflow Kanban (P2).
 */

.dam-workflow-board {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
  flex: 1;
}

.dam-workflow-board-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.dam-workflow-board-head .muted {
  margin: 0;
  max-width: 52ch;
}

.dam-workflow-kanban {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 8px;
  min-height: min(72vh, 640px);
  -webkit-overflow-scrolling: touch;
}

.dam-kanban-column {
  flex: 0 0 min(280px, 82vw);
  display: flex;
  flex-direction: column;
  min-height: 200px;
  max-height: min(72vh, 680px);
  border: 1px solid var(--line);
  border-radius: var(--studio-radius-lg);
  background: rgba(255, 255, 255, 0.72);
}

.dam-kanban-column-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(27, 24, 20, 0.03);
}

.dam-kanban-column-head h4 {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 700;
}

.dam-kanban-count {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 8px;
  background: #fff;
}

.dam-kanban-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  overflow-y: auto;
  min-height: 120px;
  flex: 1;
}

.dam-kanban-empty {
  margin: 8px 4px;
  font-size: 0.78rem;
}

.dam-kanban-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.dam-kanban-card-head {
  display: flex;
  align-items: flex-start;
  gap: 4px;
}

.dam-kanban-card-head .dam-kanban-card-open {
  flex: 1;
  min-width: 0;
}

.dam-kanban-card-menu {
  flex: 0 0 auto;
  margin: 6px 6px 0 0;
  width: 28px;
  height: 28px;
  padding: 0;
  font-size: 1.1rem;
  line-height: 1;
}

.dam-kanban-card-open {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 10px;
  cursor: pointer;
  color: inherit;
  font: inherit;
}

.dam-kanban-card-open:hover {
  background: rgba(11, 90, 59, 0.05);
}

.dam-kanban-card-thumb {
  height: 88px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #eef0f2 center / cover no-repeat;
  margin-bottom: 8px;
  overflow: hidden;
}

.dam-kanban-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.dam-workspace--workflow-drawer-open .dam-workflow-kanban {
  margin-right: min(420px, 38vw);
  transition: margin-right 0.18s ease;
}

.dam-kanban-card-thumb--file {
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 0.62rem;
  text-transform: uppercase;
  color: var(--muted);
  background: #f4f5f6;
}

.dam-kanban-card-title {
  margin: 0 0 6px;
  font-size: 0.82rem;
  font-weight: 650;
  line-height: 1.35;
  word-break: break-word;
}

.dam-kanban-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 10px 10px;
  border-top: 1px solid rgba(27, 24, 20, 0.06);
}

.dam-kanban-card-actions .ghost {
  font-size: 0.72rem;
  padding: 6px 10px;
}

.dam-kanban-transition:disabled {
  opacity: 0.5;
  cursor: wait;
}

#damTabPanelWorkflow {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

#damTabPanelWorkflow.is-active {
  display: flex;
}

#damTabPanelWorkflow .dam-workflow-board {
  flex: 1;
  min-height: 0;
  padding: 0 4px 12px;
}

@media (max-width: 900px) {
  .dam-workflow-kanban {
    min-height: 55vh;
  }

  .dam-kanban-column {
    max-height: 55vh;
  }
}
