/* Projetos e Tarefas · biblioteca de modelos */
.task-template-library-modal {
  width: min(1040px, calc(100vw - 32px));
  max-width: 1040px;
}

.task-template-library {
  display: grid;
  gap: 18px;
}

.task-template-library-head,
.task-template-card header,
.task-template-card footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.task-template-library-head > div {
  display: grid;
  gap: 3px;
}

.task-template-library-head span,
.task-template-card header span,
.task-template-card header small {
  color: var(--muted);
  font-size: 12px;
}

.task-template-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.task-template-card {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--mix-radius-card, 12px);
  background: var(--surface, #fff);
  box-shadow: var(--mix-shadow-soft, 0 8px 24px rgba(16, 42, 67, .06));
}

.task-template-card header > div {
  min-width: 0;
}

.task-template-card h3,
.task-template-card p {
  margin: 0;
}

.task-template-card h3 {
  overflow: hidden;
  color: var(--text);
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-template-card p {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.task-template-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.task-template-facts span,
.mix-inline-notice {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
}

.task-template-facts svg,
.mix-inline-notice svg,
.task-template-library-head .mix-btn svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.task-template-card footer {
  justify-content: flex-start;
  margin-top: auto;
}

.task-template-card footer .mix-btn {
  flex: 1;
}

.task-template-card footer .mix-icon-button {
  flex: 0 0 auto;
}

@media (max-width: 760px) {
  .task-template-library-modal {
    width: min(100%, calc(100vw - 16px));
  }

  .task-template-grid,
  .task-template-facts {
    grid-template-columns: 1fr;
  }

  .task-template-library-head {
    align-items: stretch;
    flex-direction: column;
  }
}
