.automation-list {
  display: flex;
  flex-direction: column;
}

.automation-empty {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  margin-top: 14px;
  padding: 18px;
}

.automation-row-managed {
  align-items: flex-start;
  border-bottom: 1px solid var(--line);
  grid-template-columns: 42px minmax(0, 1fr);
}

.automation-row-managed:last-child {
  border-bottom: 0;
}

.automation-copy b {
  display: block;
  line-height: 1.35;
}

.automation-copy small {
  font-size: 11px;
  line-height: 1.45;
  margin-top: 4px;
}

.automation-thumb {
  display: grid;
  overflow: hidden;
  place-items: center;
}

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

.automation-row-managed .row-stat,
.automation-row-managed .on,
.automation-row-managed .paused,
.automation-actions {
  grid-column: 2;
}

.automation-row-managed .on,
.automation-row-managed .paused {
  display: inline-flex;
  font-size: 11px;
}

.automation-row-managed .paused {
  color: var(--muted);
}

.automation-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}

.automation-actions .text-button {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink);
  cursor: pointer;
  font: 600 12px 'DM Sans';
  min-height: 44px;
  padding: 0 12px;
}

.automation-actions .text-button:hover {
  border-color: #cfcac0;
}

.automation-actions .text-button:focus-visible {
  outline: 3px solid #ffb69f;
  outline-offset: 3px;
}

.automation-actions .text-button:disabled {
  cursor: wait;
  opacity: .55;
}

.danger-action {
  color: var(--danger) !important;
}

@media (min-width: 768px) {
  .automation-row-managed {
    align-items: center;
    grid-template-columns: 42px minmax(0, 1fr) 80px 74px minmax(188px, auto);
  }

  .automation-row-managed .row-stat,
  .automation-row-managed .on,
  .automation-row-managed .paused,
  .automation-actions {
    grid-column: auto;
  }

  .automation-actions {
    justify-content: flex-end;
    margin-top: 0;
  }

  .automation-actions .text-button {
    min-height: 44px;
  }
}
